diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index 61e542a163..c4b8a49c9f 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -1,3 +1,11 @@ +name: Bootstrap +description: Install dependencies. + +inputs: + extra_rust_toolchains: + description: "Extra toolchains to install, but aren't used by default" + required: false + runs: using: "composite" steps: @@ -7,5 +15,7 @@ runs: shell: bash - name: Install rust. uses: ./.github/actions/install_rust + with: + extra_rust_toolchains: ${{ inputs.extra_rust_toolchains }} - name: Install cairo native. uses: ./.github/actions/setup_native_deps diff --git a/.github/actions/install_rust/action.yml b/.github/actions/install_rust/action.yml index b097ef4088..f140e6a3b2 100644 --- a/.github/actions/install_rust/action.yml +++ b/.github/actions/install_rust/action.yml @@ -1,6 +1,11 @@ -name: Bootsrap rust installation +name: Bootstrap rust installation description: Setup rust environment and its components, also caching the build results. +inputs: + extra_rust_toolchains: + description: "Extra toolchains to install, but aren't used by default" + required: false + runs: using: "composite" steps: @@ -9,6 +14,7 @@ runs: cache-base: main(-v[0-9].*)? inherit-toolchain: true bins: taplo-cli@0.9.0, cargo-machete - channel: nightly-2024-04-29 # Just install for rustfmt, rust-toolchain.toml overrides it. + # Install additional non-default toolchains (for rustfmt for example), NOP if input omitted. + channel: ${{ inputs.extra_rust_toolchains }} env: RUSTFLAGS: "-C link-arg=-fuse-ld=lld" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1f1e512d29..d28eeea648 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,6 +49,8 @@ jobs: # Install rust components. - uses: ./.github/actions/bootstrap + with: + extra_rust_toolchains: nightly-2024-04-29 - name: Setup Python venv run: |