Skip to content

Commit

Permalink
use dtolnay/rust-toolchain instead of actions-rs/toolchain (#1883)
Browse files Browse the repository at this point in the history
* use dtolnay/rust-toolchain instead of actions-rs/toolchain

* keep rust-toolchain for dev_setup.sh

* use rust-toolchain.toml instead of rust-toolchain
  • Loading branch information
yourmoonlight authored Jun 17, 2024
1 parent 8348c13 commit 0be4027
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/actions/rust-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ runs:
- run: sudo apt-get update && sudo apt-get install build-essential ca-certificates clang curl git libpq-dev libssl-dev pkg-config lsof lld --no-install-recommends --assume-yes
shell: bash

- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # pin@v1
- uses: dtolnay/rust-toolchain@1.77.2
with:
override: true
components: rustfmt, clippy
Expand Down
1 change: 0 additions & 1 deletion rust-toolchain

This file was deleted.

2 changes: 0 additions & 2 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
#we keep the `rust-toolchain` and `rust-toolchain.yaml`
#because some tools dose not support rust-toolchain.yaml yet
[toolchain]
channel = "1.77.2"
4 changes: 2 additions & 2 deletions scripts/dev_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ if [[ "$INSTALL_BUILD_TOOLS" == "false" ]] && \
INSTALL_BUILD_TOOLS="true"
fi

if [ ! -f rust-toolchain ]; then
if [ ! -f rust-toolchain.toml ]; then
echo "Unknown location. Please run this from the RoochNetwork moveos repository. Abort."
exit 1
fi
Expand Down Expand Up @@ -837,7 +837,7 @@ if [[ "$INSTALL_BUILD_TOOLS" == "true" ]]; then
install_lld

install_rustup "$BATCH_MODE"
install_toolchain "$(cat ./rust-toolchain)"
install_toolchain "$(awk -F ' = ' '/^channel/ {gsub(/"/, "", $2); print $2}' ./rust-toolchain.toml | tr -d '\n')"
install_rustup_components_and_nightly

install_cargo_sort
Expand Down

0 comments on commit 0be4027

Please sign in to comment.