|
3 | 3 | branches: |
4 | 4 | - 'build/*' |
5 | 5 | tags: [ 'v*' ] |
| 6 | + pull_request: |
| 7 | + types: [ opened, synchronize, reopened, labeled ] |
6 | 8 | workflow_dispatch: |
7 | 9 |
|
8 | | -name: Build x86_64 |
| 10 | +name: Build |
9 | 11 |
|
10 | 12 | jobs: |
11 | 13 | build: |
12 | | - name: Build |
13 | | - runs-on: macos-11 |
| 14 | + name: Build ${{ matrix.os.arch }} |
| 15 | + if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'CI-build') }} |
| 16 | + runs-on: ${{ matrix.os.name }} |
14 | 17 | strategy: |
15 | 18 | fail-fast: false |
16 | 19 | matrix: |
| 20 | + os: |
| 21 | + - name: macos-11 |
| 22 | + arch: x86_64 |
| 23 | + - name: macos-14 |
| 24 | + arch: aarch64 |
17 | 25 | target: |
18 | 26 | - x86_64-unknown-linux-gnu |
19 | 27 | - x86_64-unknown-linux-musl |
@@ -56,21 +64,21 @@ jobs: |
56 | 64 | run: | |
57 | 65 | set -ex |
58 | 66 | cd /Volumes/tools |
59 | | - tar czf ${{ matrix.target }}-x86_64-darwin.tar.gz ${{ matrix.target }} |
| 67 | + tar czf ${{ matrix.target }}-${{ matrix.os.arch }}-darwin.tar.gz ${{ matrix.target }} |
60 | 68 | cd - |
61 | | - mv /Volumes/tools/${{ matrix.target }}-x86_64-darwin.tar.gz . |
62 | | - sha256sum ${{ matrix.target }}-x86_64-darwin.tar.gz | tee ${{ matrix.target }}-x86_64-darwin.tar.gz.sha256 |
| 69 | + mv /Volumes/tools/${{ matrix.target }}-${{ matrix.os.arch }}-darwin.tar.gz . |
| 70 | + sha256sum ${{ matrix.target }}-${{ matrix.os.arch }}-darwin.tar.gz | tee ${{ matrix.target }}-${{ matrix.os.arch }}-darwin.tar.gz.sha256 |
63 | 71 | - name: Upload Toolchain |
64 | | - uses: actions/upload-artifact@v3 |
| 72 | + uses: actions/upload-artifact@v4 |
65 | 73 | with: |
66 | | - name: toolchains |
67 | | - path: ${{ matrix.target }}-x86_64-darwin.tar.gz |
| 74 | + name: toolchain-${{ matrix.target }}-${{ matrix.os.arch }}-darwin |
| 75 | + path: ${{ matrix.target }}-${{ matrix.os.arch }}-darwin.tar.gz |
68 | 76 | if-no-files-found: error |
69 | 77 | - name: Upload Toolchain to GitHub Release |
70 | 78 | uses: svenstaro/upload-release-action@v2 |
71 | 79 | if: "startsWith(github.ref, 'refs/tags/')" |
72 | 80 | with: |
73 | 81 | repo_token: ${{ secrets.GITHUB_TOKEN }} |
74 | | - file: ${{ matrix.target }}-x86_64-darwin.tar.gz* |
| 82 | + file: ${{ matrix.target }}-${{ matrix.os.arch }}-darwin.tar.gz* |
75 | 83 | file_glob: true |
76 | 84 | tag: ${{ github.ref }} |
0 commit comments