.radicle/ambient: Add pre-plan action for rustup
To ensure the correct toolchain is used when building and testing the project, a pre-plan action is added for `rustup`. It uses the same `channel` as defined in the `rust-toolchain.toml`. A note is left about this duplication, and the possibility of it being supported in the future. Note that this includes a workaround: ``` sed -i /components/d rust-toolchain.toml ``` which ensures that `components` are removed, since Ambient does not support `components` at this time.
This commit is contained in:
parent
1f40b32b6a
commit
9381232604
|
|
@ -1,6 +1,27 @@
|
|||
pre_plan:
|
||||
- action: cargo_fetch
|
||||
# Define the compatible toolchain channel used by `heartwood`.
|
||||
# This channel is also defined in `rust-toolchain.toml` – which hopefully can
|
||||
# be supported by ambient in the future.
|
||||
- action: rustup
|
||||
channel: 1.95.0
|
||||
- action: rustup
|
||||
channel: "1.95"
|
||||
plan:
|
||||
# Remove the components from rust-toolchain.toml. This works around the
|
||||
# inability of the rustup action to install components, and the only component
|
||||
# in the heartwood toolchain file is rust-src, which we do not need for CI,
|
||||
# so we just remove it.
|
||||
- action: shell
|
||||
shell: |
|
||||
sed -i /components/d rust-toolchain.toml
|
||||
|
||||
# Commit this to git so that the Debian package building doesn't
|
||||
# see changes outside the debian directory.
|
||||
git config set user.name "Ambient CI"
|
||||
git config set user.email "ambient@example.com"
|
||||
git commit -m "remove components from toolchain file" rust-toolchain.toml
|
||||
|
||||
- action: cargo_fmt
|
||||
- action: cargo_clippy
|
||||
- action: cargo_build
|
||||
|
|
|
|||
Loading…
Reference in New Issue