From 3c67a6d9cb1d6cab63a9ed7dc6ddae7849779b89 Mon Sep 17 00:00:00 2001 From: raphaelcoeffic <1050031+raphaelcoeffic@users.noreply.github.com> Date: Mon, 4 Nov 2024 10:07:44 +0100 Subject: [PATCH] feat: GH actions build with cross --- .github/workflows/rust.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..545923e --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,37 @@ +name: Build + +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 + + runs-on: ${{ matrix.platform.runs-on }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build binary + uses: houseabsolute/actions-rust-cross@v0 + with: + command: ${{ matrix.platform.command }} + target: ${{ matrix.platform.target }} + args: "--locked --release" + strip: true +