Skip to content

Commit 3be93c8

Browse files
committed
Use rust-cache action for more Actions jobs
Signed-off-by: Till Schneidereit <[email protected]>
1 parent c4aa295 commit 3be93c8

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,19 @@ jobs:
195195
- uses: actions/checkout@v3
196196

197197
# Install all the toolchain dependencies
198-
- name: Install Rust wasm target
199-
run: rustup target add wasm32-wasip1 wasm32-unknown-unknown
198+
- name: setup dependencies
199+
uses: ./.github/actions/spin-ci-dependencies
200+
with:
201+
rust: true
202+
rust-wasm: true
203+
rust-cache: true
204+
tinygo: true
205+
tinygo-version: '0.35.0'
206+
200207
- uses: goto-bus-stop/setup-zig@v2
201208
- uses: actions/setup-go@v4
202209
with:
203210
go-version: '1.22'
204-
- uses: acifani/setup-tinygo@v2
205-
with:
206-
tinygo-version: '0.35.0'
207211
- uses: actions/setup-node@v3
208212
with:
209213
node-version: '20.x'
@@ -269,20 +273,19 @@ jobs:
269273
steps:
270274
- uses: actions/checkout@v3
271275

272-
- name: Install Rust toolchain
273-
shell: bash
274-
run: |
275-
rustup toolchain install ${{ env.RUST_VERSION }} --no-self-update
276-
rustup default ${{ env.RUST_VERSION }}
276+
- name: setup dependencies
277+
uses: ./.github/actions/spin-ci-dependencies
278+
with:
279+
rust: true
280+
rust-wasm: true
281+
rust-cache: true
282+
openssl-windows: "${{ matrix.os == 'windows-latest' }}"
277283

278284
- name: Install target
279285
if: matrix.config.target != ''
280286
shell: bash
281287
run: rustup target add --toolchain ${{ env.RUST_VERSION }} ${{ matrix.config.target }}
282288

283-
- name: "Install Wasm Rust target"
284-
run: rustup target add wasm32-wasip1 wasm32-unknown-unknown --toolchain ${{ env.RUST_VERSION }}
285-
286289
- name: setup for cross-compiled linux aarch64 build
287290
if: matrix.config.target == 'aarch64-unknown-linux-gnu'
288291
run: |
@@ -292,11 +295,6 @@ jobs:
292295
echo 'linker = "aarch64-linux-gnu-gcc"' >> ${HOME}/.cargo/config.toml
293296
echo 'rustflags = ["-Ctarget-feature=+fp16"]' >> ${HOME}/.cargo/config.toml
294297
295-
- name: setup dependencies
296-
uses: ./.github/actions/spin-ci-dependencies
297-
with:
298-
openssl-windows: "${{ matrix.os == 'windows-latest' }}"
299-
300298
- name: build release
301299
shell: bash
302300
run: cargo build --release ${{ matrix.config.extraArgs }}

0 commit comments

Comments
 (0)