on main help sign in
Fix macOS cross compilation
e7d384efabianlindfors
.github/workflows/release.yaml+12−6
@@ -9,16 +9,22 @@ env:
9
9
10jobs:
10jobs:
11 build-binary:
11 build-binary:
12− runs-on: ubuntu-latest
13 strategy:
12 strategy:
14 matrix:
13 matrix:
15 include:
14 include:
16 - name: Linux 64-bit
15 - name: Linux 64-bit
17− file_name: linux_amd64
16+ file-name: linux_amd64
18 target: x86_64-unknown-linux-gnu
17 target: x86_64-unknown-linux-gnu
18+ host: ubuntu-latest
19+ use-cross: true
19 - name: macOS
20 - name: macOS
20− file_name: darwin_amd64
21+ file-name: darwin_amd64
21 target: x86_64-apple-darwin
22 target: x86_64-apple-darwin
23+ host: macos-11
24+ use-cross: false
25+
26+ runs-on: ${{ matrix.host }}
27+
22 steps:
28 steps:
23 - name: Checkout
29 - name: Checkout
24 uses: actions/checkout@v2
30 uses: actions/checkout@v2
@@ -34,13 +40,13 @@ jobs:
34 with:
40 with:
35 command: build
41 command: build
36 args: --release
42 args: --release
37− use-cross: true
43+ use-cross: ${{ matrix.use-cross }}
38 - name: Rename binary
44 - name: Rename binary
39− run: mv target/release/reshape ./reshape-${{ matrix.file_name }}
45+ run: mv target/release/reshape ./reshape-${{ matrix.file-name }}
40 - name: Upload binary to release
46 - name: Upload binary to release
41 env:
47 env:
42 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43− run: gh release upload ${GITHUB_REF##*/} "reshape-${{ matrix.file_name }}#${{ matrix.name }}" --clobber
49+ run: gh release upload ${GITHUB_REF##*/} "reshape-${{ matrix.file-name }}#${{ matrix.name }}" --clobber
44
50
45 publish-docker:
51 publish-docker:
46 runs-on: ubuntu-latest
52 runs-on: ubuntu-latest