|
6 | 6 | Build: |
7 | 7 | strategy: |
8 | 8 | matrix: |
9 | | - os: [ubuntu-latest, windows-latest, macos-latest, 'ghcr.io/cirruslabs/macos-monterey-xcode:latest'] |
| 9 | + os: |
| 10 | + - ubuntu-latest |
| 11 | + - windows-latest |
| 12 | + - macos-latest |
| 13 | + arch: |
| 14 | + - x64 |
| 15 | + - arm64 |
| 16 | + |
10 | 17 | runs-on: ${{matrix.os}} |
11 | 18 | steps: |
12 | 19 | - name: Checking out Repository |
13 | 20 | uses: actions/checkout@v3 |
14 | 21 | with: |
15 | 22 | submodules: true |
16 | 23 |
|
17 | | - - name: Installing node |
18 | | - if: ${{runner.os == 'macOS' && runner.arch == 'arm64'}} |
19 | | - uses: actions/setup-node@v3 |
| 24 | + - name: Install pnpm |
| 25 | + uses: pnpm/action-setup@v4 |
| 26 | + |
| 27 | + # linux |
| 28 | + - name: Install Rust |
| 29 | + if: ${{ matrix.os == 'ubuntu-latest' }} |
| 30 | + uses: dtolnay/rust-toolchain@master |
20 | 31 | with: |
21 | | - node-version: 16 |
| 32 | + toolchain: stable |
| 33 | + targets: ${{ matrix.arch == 'arm64' && 'aarch64-unknown-linux-gnu' || 'x86_64-unknown-linux-gnu' }} |
22 | 34 |
|
23 | | - - name: Installing yarn |
24 | | - if: ${{runner.os == 'macOS' && runner.arch == 'arm64'}} |
25 | | - run: npm install -g yarn |
| 35 | + # macos |
| 36 | + - name: Install Rust |
| 37 | + if: ${{ matrix.os == 'macos-latest' }} |
| 38 | + uses: dtolnay/rust-toolchain@master |
| 39 | + with: |
| 40 | + toolchain: stable |
| 41 | + targets: ${{ matrix.arch == 'arm64' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }} |
26 | 42 |
|
| 43 | + # windows |
27 | 44 | - name: Install Rust |
28 | | - if: ${{runner.os == 'macOS' && runner.arch == 'arm64'}} |
29 | | - uses: actions-rs/toolchain@v1 |
| 45 | + if: ${{ matrix.os == 'windows-latest' }} |
| 46 | + uses: dtolnay/rust-toolchain@master |
30 | 47 | with: |
31 | 48 | toolchain: stable |
32 | | - default: true |
| 49 | + targets: ${{ matrix.arch == 'arm64' && 'aarch64-pc-windows-msvc' || 'x86_64-pc-windows-msvc' }} |
33 | 50 |
|
34 | 51 | - name: Building |
35 | | - run: yarn install |
| 52 | + run: pnpm install |
36 | 53 |
|
37 | 54 | - name: Uploading |
38 | 55 | if: ${{github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')}} |
39 | 56 | uses: actions/upload-artifact@v3 |
40 | 57 | with: |
41 | | - name: bin-${{runner.os}}-${{runner.arch}} |
| 58 | + name: bin-${{runner.os}}-${{matrix.arch}} |
42 | 59 | path: bin/** |
43 | 60 |
|
44 | 61 | Release: |
|
0 commit comments