Skip to content

Commit

Permalink
Merge pull request #1697 from vdice/ci/rm-rust-toolchain-action
Browse files Browse the repository at this point in the history
ci(.github): discontinue use of unmaintained actions
  • Loading branch information
vdice authored Aug 16, 2023
2 parents 0594d20 + 77afa73 commit 45b14fb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
9 changes: 4 additions & 5 deletions .github/actions/spin-ci-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,11 @@ runs:
using: "composite"
steps:
- name: Install latest Rust stable toolchain
uses: actions-rs/toolchain@v1
shell: bash
if: ${{ inputs.rust == 'true' }}
with:
toolchain: ${{ inputs.rust-version }}
default: true
components: clippy, rustfmt
run: |
rustup toolchain install ${{ inputs.rust-version }} --component clippy --component rustfmt
rustup default ${{ inputs.rust-version }}
- name: "Install Wasm Rust target"
run: rustup target add wasm32-wasi && rustup target add wasm32-unknown-unknown
Expand Down
25 changes: 15 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
tags:
- "v*"

env:
RUST_VERSION: 1.68

jobs:
build-and-sign:
name: build and sign release assets
Expand Down Expand Up @@ -85,14 +88,18 @@ jobs:
cosign-release: v2.0.0

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: 1.68
default: true
target: ${{ matrix.config.target }}
shell: bash
run: |
rustup toolchain install ${{ env.RUST_VERSION }}
rustup default ${{ env.RUST_VERSION }}
- 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-wasi --toolchain 1.68 && rustup target add wasm32-unknown-unknown --toolchain 1.68
run: rustup target add wasm32-wasi --toolchain ${{ env.RUST_VERSION }} && rustup target add wasm32-unknown-unknown --toolchain ${{ env.RUST_VERSION }}

- name: setup for cross-compiled linux aarch64 build
if: matrix.config.target == 'aarch64-unknown-linux-gnu'
Expand All @@ -103,10 +110,8 @@ jobs:
echo 'linker = "aarch64-linux-gnu-gcc"' >> ${HOME}/.cargo/config.toml
- name: build release
uses: actions-rs/cargo@v1
with:
command: build
args: "--all-features --release ${{ matrix.config.extraArgs }}"
shell: bash
run: cargo build --all-features --release ${{ matrix.config.extraArgs }}

- name: Sign the binary with GitHub OIDC token
shell: bash
Expand Down

0 comments on commit 45b14fb

Please sign in to comment.