2020-08-12 11:28:52 +03:00
|
|
|
name: Leo Release
|
|
|
|
on:
|
|
|
|
push:
|
2020-08-13 10:21:35 +03:00
|
|
|
tags:
|
|
|
|
- 'v*.*.*'
|
2020-08-13 02:20:23 +03:00
|
|
|
|
2020-08-12 11:28:52 +03:00
|
|
|
env:
|
|
|
|
RUST_BACKTRACE: 1
|
|
|
|
|
|
|
|
jobs:
|
2020-08-13 02:20:23 +03:00
|
|
|
ubuntu:
|
2020-08-12 11:28:52 +03:00
|
|
|
name: Ubuntu
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
components: rustfmt
|
|
|
|
|
|
|
|
- name: Build Leo
|
2020-08-12 11:47:45 +03:00
|
|
|
run: |
|
2021-06-16 14:23:22 +03:00
|
|
|
cargo build --package leo-lang --release --features noconfig && strip target/release/leo
|
2020-08-12 11:28:52 +03:00
|
|
|
env:
|
|
|
|
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
|
|
|
|
2020-08-15 07:36:11 +03:00
|
|
|
- id: get_version
|
|
|
|
uses: battila7/get-version-action@v2
|
|
|
|
|
2020-08-14 11:04:47 +03:00
|
|
|
- name: Zip
|
|
|
|
run: |
|
2020-08-21 11:46:48 +03:00
|
|
|
mkdir tempdir
|
|
|
|
mv target/release/leo tempdir
|
|
|
|
cd tempdir
|
|
|
|
zip -r leo-${{ steps.get_version.outputs.version }}-x86_64-unknown-linux-gnu.zip leo
|
|
|
|
cd ..
|
|
|
|
mv tempdir/leo-${{ steps.get_version.outputs.version }}-x86_64-unknown-linux-gnu.zip .
|
2020-08-13 11:39:49 +03:00
|
|
|
|
2020-08-12 11:28:52 +03:00
|
|
|
- name: Release
|
|
|
|
uses: softprops/action-gh-release@v1
|
2020-08-12 11:44:46 +03:00
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
2020-08-12 11:28:52 +03:00
|
|
|
with:
|
|
|
|
files: |
|
2020-08-21 11:46:48 +03:00
|
|
|
leo-${{ steps.get_version.outputs.version }}-x86_64-unknown-linux-gnu.zip
|
2020-08-12 11:28:52 +03:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2022-11-30 22:13:35 +03:00
|
|
|
linux-musl:
|
|
|
|
name: Linux musl
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
components: rustfmt
|
|
|
|
target: x86_64-unknown-linux-musl
|
|
|
|
default: stable-x86_64-unknown-linux-musl
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
docker pull clux/muslrust:stable
|
|
|
|
docker run -v cargo-cache:/root/.cargo/registry -v $PWD:/volume --rm -t clux/muslrust:stable cargo build --target x86_64-unknown-linux-musl --package leo-lang --release --features noconfig && ldd target/x86_64-unknown-linux-musl/release/leo
|
|
|
|
- id: get_version
|
|
|
|
uses: battila7/get-version-action@v2
|
|
|
|
|
|
|
|
- name: Zip
|
|
|
|
run: |
|
|
|
|
mkdir tempdir
|
|
|
|
cp target/x86_64-unknown-linux-musl/release/leo tempdir
|
|
|
|
strip tempdir/leo
|
|
|
|
cd tempdir
|
|
|
|
zip -r leo-${{ steps.get_version.outputs.version }}-x86_64-unknown-linux-musl.zip leo
|
|
|
|
cd ..
|
|
|
|
mv tempdir/leo-${{ steps.get_version.outputs.version }}-x86_64-unknown-linux-musl.zip .
|
|
|
|
|
|
|
|
- name: Release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
with:
|
|
|
|
files: |
|
|
|
|
leo-${{ steps.get_version.outputs.version }}-x86_64-unknown-linux-musl.zip
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2020-08-13 02:21:00 +03:00
|
|
|
macos:
|
|
|
|
name: macOS
|
2020-08-13 02:20:23 +03:00
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
components: rustfmt
|
|
|
|
|
|
|
|
- name: Build Leo
|
|
|
|
run: |
|
2021-06-16 15:05:29 +03:00
|
|
|
cargo build --package leo-lang --release && strip target/release/leo
|
2020-08-13 02:20:23 +03:00
|
|
|
env:
|
|
|
|
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
|
|
|
|
2020-08-15 07:36:11 +03:00
|
|
|
- id: get_version
|
2020-08-15 07:34:15 +03:00
|
|
|
uses: battila7/get-version-action@v2
|
|
|
|
|
2020-08-14 10:10:34 +03:00
|
|
|
- name: Zip
|
|
|
|
run: |
|
2020-08-21 11:46:48 +03:00
|
|
|
mkdir tempdir
|
|
|
|
mv target/release/leo tempdir
|
|
|
|
cd tempdir
|
|
|
|
zip -r leo-${{ steps.get_version.outputs.version }}-x86_64-apple-darwin.zip leo
|
|
|
|
cd ..
|
|
|
|
mv tempdir/leo-${{ steps.get_version.outputs.version }}-x86_64-apple-darwin.zip .
|
2020-08-13 11:39:49 +03:00
|
|
|
|
2020-08-13 02:20:23 +03:00
|
|
|
- name: Release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
with:
|
|
|
|
files: |
|
2020-08-21 11:46:48 +03:00
|
|
|
leo-${{ steps.get_version.outputs.version }}-x86_64-apple-darwin.zip
|
2020-08-13 02:20:23 +03:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2021-06-16 14:23:22 +03:00
|
|
|
macos_m1:
|
|
|
|
name: macOS M1
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- name: Xcode Select
|
|
|
|
uses: devbotsxyz/xcode-select@v1.1.0
|
|
|
|
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
target: aarch64-apple-darwin
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
components: rustfmt
|
|
|
|
|
|
|
|
- name: Build Leo
|
|
|
|
run: |
|
|
|
|
SDKROOT=$(xcrun -sdk macosx11.1 --show-sdk-path) \
|
|
|
|
MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.1 --show-sdk-platform-version) \
|
|
|
|
cargo build -p leo-lang --release --target=aarch64-apple-darwin --features noconfig && strip target/aarch64-apple-darwin/release/leo
|
|
|
|
env:
|
|
|
|
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
|
|
|
|
|
|
|
- id: get_version
|
|
|
|
uses: battila7/get-version-action@v2
|
|
|
|
|
|
|
|
- name: Zip
|
|
|
|
run: |
|
|
|
|
mkdir tempdir
|
|
|
|
mv target/aarch64-apple-darwin/release/leo tempdir
|
|
|
|
cd tempdir
|
|
|
|
zip -r leo-${{ steps.get_version.outputs.version }}-aarch64-apple-darwin.zip leo
|
|
|
|
cd ..
|
|
|
|
mv tempdir/leo-${{ steps.get_version.outputs.version }}-aarch64-apple-darwin.zip .
|
|
|
|
|
|
|
|
- name: Release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
with:
|
|
|
|
files: |
|
|
|
|
leo-${{ steps.get_version.outputs.version }}-aarch64-apple-darwin.zip
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2020-08-14 09:05:47 +03:00
|
|
|
windows:
|
|
|
|
name: Windows
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2021-06-16 14:23:22 +03:00
|
|
|
uses: actions/checkout@v2
|
2020-08-14 09:05:47 +03:00
|
|
|
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
components: rustfmt
|
|
|
|
|
2020-12-19 05:55:08 +03:00
|
|
|
- name: Install LLVM and Clang
|
|
|
|
uses: KyleMayes/install-llvm-action@v1
|
|
|
|
with:
|
2021-02-09 19:55:36 +03:00
|
|
|
version: "11"
|
|
|
|
directory: ${{ runner.temp }}/llvm
|
|
|
|
|
|
|
|
- name: Set LIBCLANG_PATH
|
|
|
|
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
|
2020-12-19 05:55:08 +03:00
|
|
|
|
2020-08-14 09:05:47 +03:00
|
|
|
- name: Build Leo
|
|
|
|
run: |
|
2021-06-16 14:23:22 +03:00
|
|
|
cargo build --package leo-lang --release --features noconfig
|
2020-08-14 09:05:47 +03:00
|
|
|
env:
|
|
|
|
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
|
|
|
|
2020-08-15 09:11:38 +03:00
|
|
|
- id: get_version
|
|
|
|
uses: battila7/get-version-action@v2
|
|
|
|
|
2020-08-14 10:10:34 +03:00
|
|
|
- name: Zip
|
|
|
|
run: |
|
2021-02-09 19:55:36 +03:00
|
|
|
Compress-Archive target/release/leo.exe leo-${{ steps.get_version.outputs.version }}-x86_64-pc-windows-msvc.zip
|
2020-08-14 09:05:47 +03:00
|
|
|
|
|
|
|
- name: Release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
with:
|
|
|
|
files: |
|
2021-02-09 19:55:36 +03:00
|
|
|
leo-${{ steps.get_version.outputs.version }}-x86_64-pc-windows-msvc.zip
|
2020-08-14 09:05:47 +03:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|