Skip to content

Commit

Permalink
Use rust-cache action for more Actions jobs
Browse files Browse the repository at this point in the history
Signed-off-by: Till Schneidereit <[email protected]>
  • Loading branch information
tschneidereit committed Jan 21, 2025
1 parent c4aa295 commit 3be93c8
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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: |
Expand All @@ -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 }}

0 comments on commit 3be93c8

Please sign in to comment.