summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2025-01-30 17:05:01 +0100
committerLinus Färnstrand <linus@mullvad.net>2025-02-04 14:22:57 +0100
commitac5ff328db4f9ec49373bd68de468d530a952713 (patch)
treede7e4aa6e69861eb0b68c80f845dfcdf8f3c19e6
parent4114246c35ddf7e30160bed6e8e67c6ae36f885f (diff)
downloadmullvadvpn-ac5ff328db4f9ec49373bd68de468d530a952713.tar.xz
mullvadvpn-ac5ff328db4f9ec49373bd68de468d530a952713.zip
Set toolchain and target directly with Rustup
-rw-r--r--.github/workflows/cargo-vendor.yml6
-rw-r--r--.github/workflows/clippy.yml6
-rw-r--r--.github/workflows/daemon.yml19
-rw-r--r--.github/workflows/desktop-e2e.yml11
-rw-r--r--.github/workflows/frontend.yml7
-rw-r--r--.github/workflows/ios-build-xcode-16.yml2
-rw-r--r--.github/workflows/ios-end-to-end-tests.yml6
-rw-r--r--.github/workflows/ios-rust-ffi.yml12
-rw-r--r--.github/workflows/ios-screenshots-creation.yml2
-rw-r--r--.github/workflows/ios-screenshots-tests.yml2
-rw-r--r--.github/workflows/ios-validate-build-schemas.yml2
-rw-r--r--.github/workflows/ios.yml2
-rw-r--r--.github/workflows/rust-unused-dependencies.yml19
-rw-r--r--.github/workflows/rustfmt.yml7
-rw-r--r--.github/workflows/testframework-clippy.yml12
-rw-r--r--.github/workflows/testframework-rustfmt.yml7
-rw-r--r--.github/workflows/testframework.yml6
-rw-r--r--.github/workflows/translations-converter.yml6
-rw-r--r--.github/workflows/translations.yml6
19 files changed, 14 insertions, 126 deletions
diff --git a/.github/workflows/cargo-vendor.yml b/.github/workflows/cargo-vendor.yml
index 14d2da7790..31177c725d 100644
--- a/.github/workflows/cargo-vendor.yml
+++ b/.github/workflows/cargo-vendor.yml
@@ -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
diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml
index ec1ccb030e..135f58044d 100644
--- a/.github/workflows/clippy.yml
+++ b/.github/workflows/clippy.yml
@@ -51,12 +51,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: |
diff --git a/.github/workflows/daemon.yml b/.github/workflows/daemon.yml
index f37b6c6d54..929eb6d989 100644
--- a/.github/workflows/daemon.yml
+++ b/.github/workflows/daemon.yml
@@ -81,7 +81,7 @@ jobs:
git submodule update --init --recursive --depth=1 wireguard-go-rs
# The container image already has rustup and Rust, but only the stable toolchain
- name: Install Rust toolchain
- run: rustup default ${{ matrix.rust }}
+ run: rustup override set ${{ matrix.rust }}
- name: Build and test crates
run: ./ci/check-rust.sh
@@ -102,12 +102,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:
@@ -168,17 +162,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
diff --git a/.github/workflows/desktop-e2e.yml b/.github/workflows/desktop-e2e.yml
index a23cdbd602..2a334ab52d 100644
--- a/.github/workflows/desktop-e2e.yml
+++ b/.github/workflows/desktop-e2e.yml
@@ -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
@@ -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
diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml
index 8b80e3b5e0..a65f3523f9 100644
--- a/.github/workflows/frontend.yml
+++ b/.github/workflows/frontend.yml
@@ -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:
diff --git a/.github/workflows/ios-build-xcode-16.yml b/.github/workflows/ios-build-xcode-16.yml
index e871046310..dcb8e06f10 100644
--- a/.github/workflows/ios-build-xcode-16.yml
+++ b/.github/workflows/ios-build-xcode-16.yml
@@ -47,8 +47,6 @@ jobs:
xcode-version: '16.1'
- name: Configure Rust
run: |
- rustup default stable
- rustup update stable
rustup target add aarch64-apple-ios-sim
- name: Configure Xcode project
diff --git a/.github/workflows/ios-end-to-end-tests.yml b/.github/workflows/ios-end-to-end-tests.yml
index f177c28bf0..bbc70d8588 100644
--- a/.github/workflows/ios-end-to-end-tests.yml
+++ b/.github/workflows/ios-end-to-end-tests.yml
@@ -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
diff --git a/.github/workflows/ios-rust-ffi.yml b/.github/workflows/ios-rust-ffi.yml
index 07c52412a6..6d1457d4f1 100644
--- a/.github/workflows/ios-rust-ffi.yml
+++ b/.github/workflows/ios-rust-ffi.yml
@@ -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
@@ -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
diff --git a/.github/workflows/ios-screenshots-creation.yml b/.github/workflows/ios-screenshots-creation.yml
index 64c64ac270..95fb59aad9 100644
--- a/.github/workflows/ios-screenshots-creation.yml
+++ b/.github/workflows/ios-screenshots-creation.yml
@@ -34,8 +34,6 @@ jobs:
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
- name: Configure Xcode project
diff --git a/.github/workflows/ios-screenshots-tests.yml b/.github/workflows/ios-screenshots-tests.yml
index bef9a9ab02..70f031b189 100644
--- a/.github/workflows/ios-screenshots-tests.yml
+++ b/.github/workflows/ios-screenshots-tests.yml
@@ -46,8 +46,6 @@ jobs:
xcode-version: '16.1'
- name: Configure Rust
run: |
- rustup default stable
- rustup update stable
rustup target add aarch64-apple-ios-sim
- name: Configure Xcode project
diff --git a/.github/workflows/ios-validate-build-schemas.yml b/.github/workflows/ios-validate-build-schemas.yml
index 8b40e71b4e..3a0476299b 100644
--- a/.github/workflows/ios-validate-build-schemas.yml
+++ b/.github/workflows/ios-validate-build-schemas.yml
@@ -47,8 +47,6 @@ jobs:
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
- name: Configure Xcode project
diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml
index 70b094cebb..2565e91f01 100644
--- a/.github/workflows/ios.yml
+++ b/.github/workflows/ios.yml
@@ -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
diff --git a/.github/workflows/rust-unused-dependencies.yml b/.github/workflows/rust-unused-dependencies.yml
index bd6057caab..aed6d4ea22 100644
--- a/.github/workflows/rust-unused-dependencies.yml
+++ b/.github/workflows/rust-unused-dependencies.yml
@@ -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:
@@ -82,18 +82,16 @@ jobs:
git submodule update --init --recursive --depth=1 wireguard-go-rs
- name: Install nightly Rust
- uses: actions-rs/toolchain@v1.0.6
- with:
- toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
- profile: minimal
- target: aarch64-linux-android
+ run: |
+ rustup override set ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
+ rustup target add aarch64-linux-android
- uses: taiki-e/install-action@v2
with:
tool: cargo-udeps
- name: Check for unused dependencies
- run: cargo +${{ env.RUST_NIGHTLY_TOOLCHAIN }} udeps --target aarch64-linux-android --package mullvad-jni
+ run: cargo udeps --target aarch64-linux-android --package mullvad-jni
cargo-udeps:
strategy:
@@ -126,10 +124,7 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install nightly Rust
- uses: actions-rs/toolchain@v1.0.6
- with:
- toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
- profile: minimal
+ run: rustup override set ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
- uses: taiki-e/install-action@v2
with:
@@ -143,4 +138,4 @@ jobs:
- name: Check for unused dependencies
shell: bash
- run: cargo +${{ env.RUST_NIGHTLY_TOOLCHAIN }} udeps --workspace
+ run: cargo udeps --workspace
diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml
index 85f88a667a..54c39aaf3e 100644
--- a/.github/workflows/rustfmt.yml
+++ b/.github/workflows/rustfmt.yml
@@ -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
diff --git a/.github/workflows/testframework-clippy.yml b/.github/workflows/testframework-clippy.yml
index 3ebd0fa274..9a5040d882 100644
--- a/.github/workflows/testframework-clippy.yml
+++ b/.github/workflows/testframework-clippy.yml
@@ -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: |
@@ -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
diff --git a/.github/workflows/testframework-rustfmt.yml b/.github/workflows/testframework-rustfmt.yml
index 27996c6e2b..a21d86f694 100644
--- a/.github/workflows/testframework-rustfmt.yml
+++ b/.github/workflows/testframework-rustfmt.yml
@@ -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: |-
diff --git a/.github/workflows/testframework.yml b/.github/workflows/testframework.yml
index 6f6b874811..4bfefb5a65 100644
--- a/.github/workflows/testframework.yml
+++ b/.github/workflows/testframework.yml
@@ -83,12 +83,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
diff --git a/.github/workflows/translations-converter.yml b/.github/workflows/translations-converter.yml
index fc24845cc7..abc674d31f 100644
--- a/.github/workflows/translations-converter.yml
+++ b/.github/workflows/translations-converter.yml
@@ -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
diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml
index 7e0c7e7d46..ee5eafb27a 100644
--- a/.github/workflows/translations.yml
+++ b/.github/workflows/translations.yml
@@ -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