@@ -8,8 +8,15 @@ env:
88 CARGO_TERM_COLOR: always
99
1010jobs:
11− build-linux-amd64:
11+ build-binary:
1212 runs-on: ubuntu-latest
13+ strategy:
14+ matrix:
15+ include:
16+ - name: linux_amd64
17+ target: x86_64-unknown-linux-gnu
18+ - name: macos_amd64
19+ target: x86_64-apple-darwin
1320 steps:
1421 - name: Checkout
1522 uses: actions/checkout@v2
@@ -17,6 +24,7 @@ jobs:
1724 uses: actions-rs/toolchain@v1
1825 with:
1926 toolchain: stable
27+ target: ${{ matrix.target }}
2028 - name: Use cache for Rust dependencies
2129 uses: Swatinem/rust-cache@v1
2230 - name: Build
@@ -24,14 +32,15 @@ jobs:
2432 with:
2533 command: build
2634 args: --release
35+ use-cross: true
2736 - name: Rename binary
28− run: mv target/release/reshape ./reshape-linux_amd64
37+ run: mv target/release/reshape ./reshape-${{ matrix.name }}
2938 - name: Save binary to release
3039 uses: skx/github-action-publish-binaries@master
3140 env:
3241 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3342 with:
34− args: reshape-linux_amd64
43+ args: reshape-${{ matrix.name }}
3544
3645 publish-docker:
3746 runs-on: ubuntu-latest