-
Notifications
You must be signed in to change notification settings - Fork 369
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
base: main
Are you sure you want to change the base?
Pin rust version with toolchain file #7547
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 5 files at r1.
Reviewable status: 3 of 5 files reviewed, 1 unresolved discussion (waiting on @kl)
building/build-and-publish-container-image.sh
line 38 at r1 (raw file):
full_container_name="$REGISTRY_HOST/$REGISTRY_ORG/$container_name" RUST_VERSION=$(rg -o "channel = \"(.*)\"" -r '$1' "$REPO_DIR/rust-toolchain.toml")
We need to do the same in android/fdroid-build/init.sh
Code quote:
RUST_VERSION=$(rg -o "channel = \"(.*)\"" -r '$1' "$REPO_DIR/rust-toolchain.toml")
ac3fdeb
to
188506a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 8 files reviewed, all discussions resolved
building/build-and-publish-container-image.sh
line 38 at r1 (raw file):
Previously, albin-mullvad wrote…
We need to do the same in
android/fdroid-build/init.sh
NVM, that should be handled by the combination of the rust-toolchain.toml
file and the init script adding targets during the build process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 5 files at r1, 1 of 4 files at r2.
Reviewable status: 4 of 8 files reviewed, all discussions resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 4 of 8 files reviewed, 1 unresolved discussion (waiting on @kl)
a discussion (no related file):
We probably need to update a few more CI workflows. Search for rustup default
in the .github/
directory. All those CI jobs set up a default toolchain and expect all subsequent Rust invocation to use that toolchain. But rust-toolchain.toml
will override it. This has to be solved in a different way.
We do want to continue running CI against beta and nightly. So those CI jobs need have their overrides fixed to work. Maybe they can just locally delete rust-toolchain.toml
before building anything?
188506a
to
a1db840
Compare
8dcc83f
to
31d3cff
Compare
As part of enabling reproducible builds we need to build a given commit with a pinned Rust version.
This commit adds a minimal rust-toolchain.toml file that specifies this version (this Rust version is enforced by rustup when invoking a cargo command).
In the container we extract the version that is specified in rust-toolchain.toml to ensure that the container is pre-built with the correct Rust version (so that when buildling in the container we do not need to download the right Rust version).
This PR sets the Rust version to 1.83.0.
This change is