Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin rust version with toolchain file #7547

Merged
3 changes: 1 addition & 2 deletions .github/workflows/android-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ jobs:

- name: Use default container image and resolve digest
if: ${{ github.event.inputs.override_container_image == '' }}
run: |
echo "inner_container_image=$(cat ./building/android-container-image.txt)" >> $GITHUB_ENV
run: echo "inner_container_image=$(cat ./building/android-container-image.txt)" >> $GITHUB_ENV

outputs:
container_image: ${{ env.inner_container_image }}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/android-kotlin-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ jobs:

- name: Use default container image and resolve digest
if: ${{ github.event.inputs.override_container_image == '' }}
run: |
echo "inner_container_image=$(cat ./building/android-container-image.txt)" >> $GITHUB_ENV
run: echo "inner_container_image=$(cat ./building/android-container-image.txt)" >> $GITHUB_ENV

outputs:
container_image: ${{ env.inner_container_image }}
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/cargo-vendor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,5 @@ jobs:
with:
submodules: true

- name: Install Rust
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
default: true

- name: Vendor Rust dependencies
run: cargo vendor
9 changes: 1 addition & 8 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ jobs:

- name: Use default container image and resolve digest
if: ${{ github.event.inputs.override_container_image == '' }}
run: |
echo "inner_container_image_android=$(cat ./building/android-container-image.txt)" >> $GITHUB_ENV
run: echo "inner_container_image_android=$(cat ./building/android-container-image.txt)" >> $GITHUB_ENV

outputs:
container_image_android: ${{ env.inner_container_image_android }}
Expand All @@ -51,12 +50,6 @@ jobs:
git submodule update --init --depth=1 dist-assets/binaries
git submodule update --init --recursive --depth=1 wireguard-go-rs

- uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
components: clippy
override: true

- name: Install build dependencies
if: matrix.os == 'ubuntu-latest'
run: |
Expand Down
30 changes: 11 additions & 19 deletions .github/workflows/daemon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ jobs:

- name: Use default container image and resolve digest
if: ${{ github.event.inputs.override_container_image == '' }}
run: |
echo "inner_container_image=$(cat ./building/linux-container-image.txt)" >> $GITHUB_ENV
run: echo "inner_container_image=$(cat ./building/linux-container-image.txt)" >> $GITHUB_ENV

outputs:
container_image: ${{ env.inner_container_image }}
Expand Down Expand Up @@ -79,9 +78,15 @@ jobs:
git config --global --add safe.directory '*'
git submodule update --init --depth=1 dist-assets/binaries
git submodule update --init --recursive --depth=1 wireguard-go-rs
# The container image already has rustup and Rust, but only the stable toolchain

# The container image already has rustup and the pinned version of Rust
- name: Install Rust toolchain
run: rustup default ${{ matrix.rust }}
# When running this job for "stable" test against our pinned rust version
# instead of the stable channel.
# TODO: Improve this so both "stable" and the pinned version are tested if
# they differ.
if: ${{ matrix.rust != 'stable' }}
run: rustup override set ${{ matrix.rust }}

- name: Build and test crates
run: ./ci/check-rust.sh
Expand All @@ -102,12 +107,6 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Rust
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
default: true

- name: Install Go
uses: actions/setup-go@v3
with:
Expand Down Expand Up @@ -168,17 +167,10 @@ jobs:
# TODO: Remove once fixed
- name: Install Rust x64 target
if: ${{ matrix.config.arch == 'arm64' }}
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
target: x86_64-pc-windows-msvc
run: rustup target add x86_64-pc-windows-msvc

- name: Install Rust
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
target: i686-pc-windows-msvc
default: true
run: rustup target add i686-pc-windows-msvc

- name: Install msbuild
uses: microsoft/setup-msbuild@v1.0.2
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/desktop-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,7 @@ jobs:
cache: 'npm'
cache-dependency-path: desktop/package-lock.json
- name: Install Rust
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
target: i686-pc-windows-msvc
default: true
run: rustup target add i686-pc-windows-msvc
- name: Install latest zig
uses: mlugg/setup-zig@v1
- name: Install msbuild
Expand Down Expand Up @@ -287,11 +283,6 @@ jobs:
node-version-file: desktop/package.json
cache: 'npm'
cache-dependency-path: desktop/package-lock.json
- name: Install Rust
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
default: true
- name: Build app
run: ./build.sh
- name: Build test executable
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ jobs:
- name: Checkout wireguard-go submodule
run: git submodule update --init --depth=1 wireguard-go-rs

- name: Install Rust
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
default: true
profile: minimal

- name: Setup node
uses: actions/setup-node@v4
with:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/ios-build-xcode-16.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ jobs:
with:
xcode-version: '16.1'
- name: Configure Rust
run: |
rustup default stable
rustup update stable
rustup target add aarch64-apple-ios-sim
run: rustup target add aarch64-apple-ios-sim

- name: Configure Xcode project
run: |
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/ios-end-to-end-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,7 @@ jobs:
ref: ${{ env.COMMIT_HASH }}

- name: Configure Rust
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
override: true
target: aarch64-apple-ios
run: rustup target add aarch64-apple-ios

- name: Build iOS end to end tests action
uses: ./.github/actions/build-ios-e2e-tests
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/ios-rust-ffi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Rust
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
target: ${{ matrix.target }}
default: true
run: rustup target add ${{ matrix.target }}

- name: Build and test crates
shell: bash
Expand Down Expand Up @@ -58,11 +54,7 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Rust
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
target: ${{ matrix.target }}
default: true
run: rustup target add ${{ matrix.target }}

- name: Clippy check
shell: bash
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/ios-screenshots-creation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ jobs:
with:
xcode-version: '16.1'
- name: Configure Rust
run: |
rustup default stable
rustup update stable
rustup target add aarch64-apple-ios-sim x86_64-apple-ios
run: rustup target add aarch64-apple-ios-sim x86_64-apple-ios

- name: Configure Xcode project
run: |
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/ios-screenshots-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ jobs:
with:
xcode-version: '16.1'
- name: Configure Rust
run: |
rustup default stable
rustup update stable
rustup target add aarch64-apple-ios-sim
run: rustup target add aarch64-apple-ios-sim

- name: Configure Xcode project
run: |
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/ios-validate-build-schemas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ jobs:
with:
xcode-version: '16.1'
- name: Configure Rust
run: |
rustup default stable
rustup update stable
rustup target add aarch64-apple-ios-sim x86_64-apple-ios
run: rustup target add aarch64-apple-ios-sim x86_64-apple-ios

- name: Configure Xcode project
run: |
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ jobs:
run: |
brew bundle dump
brew bundle
rustup default stable
rustup update stable
rustup target add aarch64-apple-ios-sim

- name: Configure Xcode project
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/rust-unused-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
git submodule update --init --recursive --depth=1 wireguard-go-rs

- name: Install nightly Rust toolchain
run: rustup default $RUST_NIGHTLY_TOOLCHAIN
run: rustup override set $RUST_NIGHTLY_TOOLCHAIN

- uses: taiki-e/install-action@v2
with:
Expand Down Expand Up @@ -81,9 +81,9 @@ jobs:
git config --global --add safe.directory '*'
git submodule update --init --recursive --depth=1 wireguard-go-rs

- name: Install nightly Rust toolchain
- name: Install nightly Rust
run: |
rustup default $RUST_NIGHTLY_TOOLCHAIN
rustup override set ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
rustup target add aarch64-linux-android

- uses: taiki-e/install-action@v2
Expand Down Expand Up @@ -123,12 +123,8 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Rust
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
default: true
profile: minimal
- name: Install nightly Rust
run: rustup override set ${{ env.RUST_NIGHTLY_TOOLCHAIN }}

- uses: taiki-e/install-action@v2
with:
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/rustfmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ jobs:
- name: Checkout wireguard-go submodule
run: git submodule update --init --depth=1 wireguard-go-rs

- name: Install nightly Rust
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
components: rustfmt
default: true

- name: Check formatting
run: |-
rustfmt --version
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/testframework-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
components: clippy
override: true

- name: Install build dependencies
if: matrix.os == 'ubuntu-latest'
run: |
Expand Down Expand Up @@ -61,12 +55,6 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
components: clippy
override: true

- name: Clippy check
working-directory: test
shell: bash
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/testframework-rustfmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
components: rustfmt
default: true

- name: Check formatting
working-directory: test
run: |-
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/testframework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ jobs:

- name: Use default container image and resolve digest
if: ${{ github.event.inputs.override_container_image == '' }}
run: |
echo "inner_container_image=$(cat ./building/linux-container-image.txt)" >> $GITHUB_ENV
run: echo "inner_container_image=$(cat ./building/linux-container-image.txt)" >> $GITHUB_ENV

outputs:
container_image: ${{ env.inner_container_image }}
Expand Down Expand Up @@ -83,12 +82,6 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Rust
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
default: true

- name: Build test runner
working-directory: test
run: cargo build --locked
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/translations-converter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
default: true

- name: Build and test translations converter tool
working-directory: android/translations-converter
run: cargo test
6 changes: 0 additions & 6 deletions .github/workflows/translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ jobs:
shell: bash
run: npm ci

- name: Install Rust
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
default: true

- name: Verify translations
shell: bash
run: scripts/localization verify
1 change: 1 addition & 0 deletions .github/workflows/verify-locked-down-signatures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- test/Cargo.lock
- deny.toml
- test/deny.toml
- rust-toolchain.toml
- desktop/package-lock.json
- wireguard-go-rs/libwg/go.sum
- ci/keys/**
Expand Down
Loading
Loading