From 2748ef2c177b6ecddfdd0fdecd329c7631c2f313 Mon Sep 17 00:00:00 2001 From: Vaughn Dice Date: Tue, 15 Aug 2023 15:10:35 -0600 Subject: [PATCH 1/2] ci(.github): remove unmaintained rust toolchain action Signed-off-by: Vaughn Dice --- .../actions/spin-ci-dependencies/action.yml | 9 ++++----- .github/workflows/release.yml | 19 +++++++++++++------ 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.github/actions/spin-ci-dependencies/action.yml b/.github/actions/spin-ci-dependencies/action.yml index 8552ec3ed..0be6c8ecf 100644 --- a/.github/actions/spin-ci-dependencies/action.yml +++ b/.github/actions/spin-ci-dependencies/action.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5ce4d4725..0a935a8d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,6 +6,9 @@ on: tags: - "v*" +env: + RUST_VERSION: 1.68 + jobs: build-and-sign: name: build and sign release assets @@ -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' From 77afa7313b37ded821fe7afe25f19c4cc5194a4e Mon Sep 17 00:00:00 2001 From: Vaughn Dice Date: Tue, 15 Aug 2023 16:32:16 -0600 Subject: [PATCH 2/2] ci(release.yml): replace unmaintained actions-rs/cargo action Signed-off-by: Vaughn Dice --- .github/workflows/release.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0a935a8d9..0ca767bec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -110,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