From 2221f644e192d6e165bf1a9a7feb106b3c6f546e Mon Sep 17 00:00:00 2001 From: Jonas Jelonek Date: Thu, 9 Jan 2025 23:38:46 +0100 Subject: [PATCH] actions: switch to new workflow Signed-off-by: Jonas Jelonek --- .github/workflows/rust-multiarch.yml | 41 ++++++++++++++++++++++++++++ .github/workflows/rust.yml | 26 ------------------ 2 files changed, 41 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/rust-multiarch.yml delete mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust-multiarch.yml b/.github/workflows/rust-multiarch.yml new file mode 100644 index 0000000..62fef65 --- /dev/null +++ b/.github/workflows/rust-multiarch.yml @@ -0,0 +1,41 @@ +name: Build tftp (multi-arch) + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + name: Build - ${{ matrix.platform.os-name }} + strategy: + matrix: + platform: + - os-name: Linux-x86_64 + runs-on: ubuntu-latest + target: x86_64-unknown-linux-musl + - os-name: Linux-aarch64 + runs-on: ubuntu-latest + target: aarch64-unknown-linux-musl + - os-name: macOS-x86_64 + runs-on: macOS-latest + target: x86_64-apple-darwin + - os-name: macOS-arm64 + runs-on: macOS-latest + target: aarch64-apple-darwin + + runs-on: ${{ matrix.platform.runs-on }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build binary + uses: houseabsolute/actions-rust-cross@v1 + with: + command: build + target: ${{ matrix.platform.target }} + args: "--release --all-features" + strip: false diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index e44f179..0000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Rust - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -env: - CARGO_TERM_COLOR: always - -jobs: - build: - name: Build tftp - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - override: true - - uses: actions-rs/cargo@v1 - with: - command: build - args: --release --verbose