Skip to content

Commit

Permalink
Force rustup to install missing toolchain b/c it broke all of our builds
Browse files Browse the repository at this point in the history
From its changelog:
https://github.com/rust-lang/rustup/blob/master/CHANGELOG.md#1280---2025-03-04

> rustup will no longer automatically install the active toolchain if it is not installed. pr#3985
> To ensure its installation, run rustup toolchain install with no arguments.
  • Loading branch information
atodorov committed Mar 4, 2025
1 parent ed5ee7d commit 5ec0d52
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 53 deletions.
45 changes: 17 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,9 @@ jobs:
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: gluwa/toolchain@dev
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUSTC_VERSION }}
profile: minimal
override: true
components: rustfmt

- name: Check formatting
Expand Down Expand Up @@ -321,13 +319,11 @@ jobs:
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: gluwa/toolchain@dev
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUSTC_VERSION }}
target: wasm32-unknown-unknown
profile: minimal
override: true
components: clippy
targets: wasm32-unknown-unknown
components: clippy, rust-src
- uses: Swatinem/rust-cache@v2

- name: Run Clippy
Expand Down Expand Up @@ -358,12 +354,10 @@ jobs:
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: gluwa/toolchain@dev
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUSTC_VERSION }}
target: wasm32-unknown-unknown
profile: minimal
override: true
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2

- name: Check Build
Expand Down Expand Up @@ -392,12 +386,11 @@ jobs:
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: gluwa/toolchain@dev
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUSTC_VERSION }}
target: wasm32-unknown-unknown
profile: minimal
override: true
targets: wasm32-unknown-unknown
components: rust-src
- uses: Swatinem/rust-cache@v2

- name: Run tests
Expand Down Expand Up @@ -434,12 +427,11 @@ jobs:
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: gluwa/toolchain@dev
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUSTC_VERSION }}
target: wasm32-unknown-unknown
profile: minimal
override: true
targets: wasm32-unknown-unknown
components: rust-src
- uses: Swatinem/rust-cache@v2
with:
shared-key: build-creditcoin-node
Expand Down Expand Up @@ -498,12 +490,11 @@ jobs:
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: gluwa/toolchain@dev
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUSTC_VERSION }}
target: wasm32-unknown-unknown
profile: minimal
override: true
targets: wasm32-unknown-unknown
components: rust-src
- uses: Swatinem/rust-cache@v2
with:
shared-key: build-creditcoin-node
Expand Down Expand Up @@ -1072,12 +1063,10 @@ jobs:
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: gluwa/toolchain@dev
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUSTC_VERSION }}
target: wasm32-unknown-unknown
profile: minimal
override: true
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2

- name: Install cargo audit
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/llvm-cov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,11 @@ jobs:
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: gluwa/toolchain@dev
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUSTC_VERSION }}
components: llvm-tools-preview
target: wasm32-unknown-unknown
profile: minimal
override: true
components: llvm-tools-preview, rust-src
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2

- name: Install cargo-llvm-cov
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,11 @@ jobs:
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: gluwa/toolchain@dev
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUSTC_VERSION }}
target: wasm32-unknown-unknown
profile: minimal
override: true
targets: wasm32-unknown-unknown
components: rust-src

- name: Install MacOS aarch64 target
if: matrix.operating-system == 'macos-13'
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/runtime-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,11 @@ jobs:
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: gluwa/toolchain@dev
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUSTC_VERSION }}
target: wasm32-unknown-unknown
profile: minimal
override: true
targets: wasm32-unknown-unknown
components: rust-src
- uses: Swatinem/rust-cache@v2

- name: Build SUT
Expand Down Expand Up @@ -404,11 +403,9 @@ jobs:
sudo apt install -y gcc
- name: Install Rust toolchain
uses: gluwa/toolchain@dev
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUSTC_VERSION }}
profile: minimal
override: true

- name: Install Subwasm
uses: gluwa/cargo@dev
Expand Down Expand Up @@ -534,11 +531,9 @@ jobs:
sudo apt install -y gcc
- name: Install Rust toolchain
uses: gluwa/toolchain@dev
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUSTC_VERSION }}
profile: minimal
override: true

- name: Install Subwasm
uses: gluwa/cargo@dev
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,9 @@ jobs:
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: gluwa/toolchain@dev
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUSTC_VERSION }}
profile: minimal
override: true

- name: Install Subwasm
uses: gluwa/cargo@dev
Expand All @@ -93,11 +91,9 @@ jobs:
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: gluwa/toolchain@dev
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUSTC_VERSION }}
profile: minimal
override: true

- name: Install Subwasm
uses: gluwa/cargo@dev
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | /bin/sh -s -- -y
COPY --chown=creditcoin:creditcoin . /creditcoin-node/
# shellcheck source=/dev/null
RUN source ~/.cargo/env && \
rustup toolchain install && \
cargo build --release ${BUILD_ARGS}


Expand Down

0 comments on commit 5ec0d52

Please sign in to comment.