From 22f282fde836e41af8b04dddec8cb9a55b58b606 Mon Sep 17 00:00:00 2001 From: Saulius Grigaitis Date: Tue, 23 Apr 2024 14:40:06 +0300 Subject: [PATCH] Added Github worflow for release --- .github/workflows/ci.yml | 12 ++++++++++++ .github/workflows/release.yml | 24 ++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94793adb..717d0e6e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,18 @@ jobs: # The `ubuntu-22.04` image already includes Rustup: # # Running `rustc` or Cargo should automatically install the toolchain specified in `rust-toolchain.toml`. + - name: Build x86_64-unknown-linux-gnu + uses: actions-rs/cargo@v1 + with: + use-cross: true + command: build + args: --bin grandine --target x86_64-unknown-linux-gnu --features default-networks --profile release # --profile compact + - name: Build aarch64-unknown-linux-gnu + uses: actions-rs/cargo@v1 + with: + use-cross: true + command: build + args: --bin grandine --target aarch64-unknown-linux-gnu --features default-networks --profile release # --profile compact - uses: Swatinem/rust-cache@v2 - name: Check if code is formatted run: cargo fmt --check diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..8abe316a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,24 @@ +name: Release + +on: + push: + tags: + - 'release*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + lfs: true + # There should be no need to install Rustup or a Rust toolchain explicitly. + # The `ubuntu-22.04` image already includes Rustup: + # + # Running `rustc` or Cargo should automatically install the toolchain specified in `rust-toolchain.toml`. + - uses: Swatinem/rust-cache@v2 + - name: Build x86_64-unknown-linux-gnu + run: cross build --bin grandine --target x86_64-unknown-linux-gnu --features default-networks --profile release # --profile compact + - name: Build x86_64-unknown-linux-gnu + run: cross build --bin grandine --target aarch64-unknown-linux-gnu --features default-networks --profile release # --profile compact