|
41 | 41 | toolchain: stable
|
42 | 42 | target: ${{ matrix.target }}
|
43 | 43 | - uses: bahmutov/[email protected]
|
44 |
| - - name: Cache Cargo |
45 |
| - uses: actions/cache@v4 |
| 44 | + - uses: Swatinem/rust-cache@v2 |
46 | 45 | with:
|
47 |
| - key: ${{ matrix.name }}-cargo-${{ hashFiles('**/Cargo.lock') }} |
48 |
| - path: | |
49 |
| - ~/.cargo/bin/ |
50 |
| - ~/.cargo/git/db/ |
51 |
| - ~/.cargo/registry/cache/ |
52 |
| - ~/.cargo/registry/index/ |
53 |
| - target/ |
54 |
| - restore-keys: ${{ matrix.name }}-cargo- |
| 46 | + shared-key: ${{ matrix.name }} |
55 | 47 | - name: Remove CommandLineTools SDKs
|
56 | 48 | if: ${{ matrix.target == 'aarch64-apple-darwin' }}
|
57 | 49 | run: sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*;
|
@@ -131,6 +123,9 @@ jobs:
|
131 | 123 | sudo apt-get update
|
132 | 124 | sudo apt-get install gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu g++-aarch64-linux-gnu -y
|
133 | 125 | - uses: bahmutov/[email protected]
|
| 126 | + - uses: Swatinem/rust-cache@v2 |
| 127 | + with: |
| 128 | + shared-key: ${{ matrix.target }} |
134 | 129 | - name: Build native packages
|
135 | 130 | run: yarn build-native-release
|
136 | 131 | env:
|
@@ -202,29 +197,29 @@ jobs:
|
202 | 197 | if: ${{ matrix.target == 'x86_64-unknown-linux-musl' }}
|
203 | 198 | run: node -e 'require("@parcel/rust")'
|
204 | 199 |
|
205 |
| - # build-and-release: |
206 |
| - # runs-on: ubuntu-20.04 |
207 |
| - # name: Build and release |
208 |
| - # needs: |
209 |
| - # - build-macos-windows |
210 |
| - # - build-linux-musl |
211 |
| - # - build-linux-gnu-arm |
212 |
| - # steps: |
213 |
| - # - uses: actions/checkout@v4 |
214 |
| - # with: |
215 |
| - # fetch-depth: 0 |
216 |
| - # - uses: bahmutov/[email protected] |
217 |
| - # - name: Build native packages |
218 |
| - # run: yarn build-native-release |
219 |
| - # - name: Download artifacts |
220 |
| - # uses: actions/download-artifact@v3 |
221 |
| - # with: |
222 |
| - # path: artifacts |
223 |
| - # - name: Move artifacts |
224 |
| - # run: for d in artifacts/*/*/*; do cp $d/*.node packages/$(basename $(dirname $d))/$(basename $d); done |
225 |
| - # - name: Debug |
226 |
| - # run: ls -l packages/*/*/*.node |
227 |
| - # - run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc |
228 |
| - # env: |
229 |
| - # NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
230 |
| - # - run: ${{ inputs.release-command }} |
| 200 | + build-and-release: |
| 201 | + runs-on: ubuntu-20.04 |
| 202 | + name: Build and release |
| 203 | + needs: |
| 204 | + - build-macos-windows |
| 205 | + - build-linux-musl |
| 206 | + - build-linux-gnu-arm |
| 207 | + steps: |
| 208 | + - uses: actions/checkout@v4 |
| 209 | + with: |
| 210 | + fetch-depth: 0 |
| 211 | + - uses: bahmutov/[email protected] |
| 212 | + - name: Build native packages |
| 213 | + run: yarn build-native-release |
| 214 | + - name: Download artifacts |
| 215 | + uses: actions/download-artifact@v3 |
| 216 | + with: |
| 217 | + path: artifacts |
| 218 | + - name: Move artifacts |
| 219 | + run: for d in artifacts/*/*/*; do cp $d/*.node packages/$(basename $(dirname $d))/$(basename $d); done |
| 220 | + - name: Debug |
| 221 | + run: ls -l packages/*/*/*.node |
| 222 | + - run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc |
| 223 | + env: |
| 224 | + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 225 | + - run: ${{ inputs.release-command }} |
0 commit comments