From 3be93c8eae7795c9513b22058b85119a6b584577 Mon Sep 17 00:00:00 2001 From: Till Schneidereit Date: Tue, 21 Jan 2025 15:27:52 +0100 Subject: [PATCH] Use rust-cache action for more Actions jobs Signed-off-by: Till Schneidereit --- .github/workflows/build.yml | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 10a73e43b..3f7af4f5a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -195,15 +195,19 @@ jobs: - uses: actions/checkout@v3 # Install all the toolchain dependencies - - name: Install Rust wasm target - run: rustup target add wasm32-wasip1 wasm32-unknown-unknown + - name: setup dependencies + uses: ./.github/actions/spin-ci-dependencies + with: + rust: true + rust-wasm: true + rust-cache: true + tinygo: true + tinygo-version: '0.35.0' + - uses: goto-bus-stop/setup-zig@v2 - uses: actions/setup-go@v4 with: go-version: '1.22' - - uses: acifani/setup-tinygo@v2 - with: - tinygo-version: '0.35.0' - uses: actions/setup-node@v3 with: node-version: '20.x' @@ -269,20 +273,19 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Install Rust toolchain - shell: bash - run: | - rustup toolchain install ${{ env.RUST_VERSION }} --no-self-update - rustup default ${{ env.RUST_VERSION }} + - name: setup dependencies + uses: ./.github/actions/spin-ci-dependencies + with: + rust: true + rust-wasm: true + rust-cache: true + openssl-windows: "${{ matrix.os == 'windows-latest' }}" - name: Install target if: matrix.config.target != '' shell: bash run: rustup target add --toolchain ${{ env.RUST_VERSION }} ${{ matrix.config.target }} - - name: "Install Wasm Rust target" - run: rustup target add wasm32-wasip1 wasm32-unknown-unknown --toolchain ${{ env.RUST_VERSION }} - - name: setup for cross-compiled linux aarch64 build if: matrix.config.target == 'aarch64-unknown-linux-gnu' run: | @@ -292,11 +295,6 @@ jobs: echo 'linker = "aarch64-linux-gnu-gcc"' >> ${HOME}/.cargo/config.toml echo 'rustflags = ["-Ctarget-feature=+fp16"]' >> ${HOME}/.cargo/config.toml - - name: setup dependencies - uses: ./.github/actions/spin-ci-dependencies - with: - openssl-windows: "${{ matrix.os == 'windows-latest' }}" - - name: build release shell: bash run: cargo build --release ${{ matrix.config.extraArgs }}