diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0e63336..a3e30b3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,13 +6,6 @@ on: - "v*" jobs: - test: - name: Test - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - run: cargo test build-and-release: name: Build and upload runs-on: ${{ matrix.os }} @@ -20,17 +13,13 @@ jobs: strategy: matrix: include: - - build: linux - os: ubuntu-22.04 + - os: ubuntu-22.04 target: x86_64-unknown-linux-musl - - build: macos - os: macos-latest + - os: macos-latest target: x86_64-apple-darwin - - build: macos - os: macos-latest + - os: macos-latest target: aarch64-apple-darwin - # - build: windows-gnu - # os: windows-latest + # - os: windows-latest # target: x86_64-pc-windows-gnu steps: - name: Checkout @@ -42,8 +31,9 @@ jobs: with: toolchain: stable target: ${{ matrix.target }} + - run: cargo test - name: Build the project - run: cargo build --release + run: cargo build --release --target ${{ matrix.target }} - name: Build archive shell: bash if: startsWith(github.ref, 'refs/tags/') diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 40dc763..9eb7268 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -6,7 +6,19 @@ on: jobs: test: name: Test - runs-on: ubuntu-24.04 + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - build: linux + os: ubuntu-22.04 + target: x86_64-unknown-linux-musl + - build: macos + os: macos-latest + target: x86_64-apple-darwin + - build: macos + os: macos-latest + target: aarch64-apple-darwin steps: - uses: actions/checkout@v4 - uses: actions-rust-lang/setup-rust-toolchain@v1