Skip to content

Commit 7721278

Browse files
somnergyclaude
andcommitted
qemu-eest: split rustup install into its own step
The previous attempt bundled rustup-init into the install-deps step. rustup-init's HOME-vs-euid handling left the verify step unable to find riscv-none-elf-gcc (PATH was not getting the cargo entry, suggesting the previous step terminated before \$GITHUB_PATH was written). Split rustup-init into its own step after verify, with CARGO_HOME and RUSTUP_HOME pinned to /opt so the install does not depend on HOME, and add --no-modify-path so rustup-init never touches shell rc files. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 056edc1 commit 7721278

2 files changed

Lines changed: 30 additions & 10 deletions

File tree

.github/workflows/qemu-eest-blockchain-rv64.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ jobs:
3232
xpm install @xpack-dev-tools/riscv-none-elf-gcc@latest --global --verbose
3333
echo 'export PATH=$HOME/.local/xPacks/@xpack-dev-tools/riscv-none-elf-gcc/15.2.0-1.1/.content/bin:$PATH' >> ~/.bashrc
3434
echo "PATH=$HOME/.local/xPacks/@xpack-dev-tools/riscv-none-elf-gcc/15.2.0-1.1/.content/bin:$PATH" >> $GITHUB_ENV
35-
# Rust is needed by `make eest-rlp-build` (z6m_eest_convert converter).
36-
# rustup auto-installs the toolchain in prover/rust-toolchain.toml on
37-
# the first cargo invocation, so no --default-toolchain pin here.
38-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none --profile minimal
39-
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
4035
4136
- name: Verify tool versions
4237
run: |
@@ -50,6 +45,21 @@ jobs:
5045
ctest --version
5146
qemu-system-riscv64 --version
5247
48+
- name: Install Rust toolchain
49+
env:
50+
CARGO_HOME: /opt/cargo
51+
RUSTUP_HOME: /opt/rustup
52+
# cargo is needed by `make eest-rlp-build` (z6m_eest_convert).
53+
# CARGO_HOME/RUSTUP_HOME are pinned to /opt so rustup-init does not
54+
# trip on the container's HOME vs euid-home mismatch. The toolchain
55+
# itself is resolved from prover/rust-toolchain.toml on first call.
56+
run: |
57+
mkdir -p "$CARGO_HOME" "$RUSTUP_HOME"
58+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain none --profile minimal
59+
echo "CARGO_HOME=$CARGO_HOME" >> $GITHUB_ENV
60+
echo "RUSTUP_HOME=$RUSTUP_HOME" >> $GITHUB_ENV
61+
echo "$CARGO_HOME/bin" >> $GITHUB_PATH
62+
5363
- name: Checkout repository
5464
uses: actions/checkout@v4
5565
with:

.github/workflows/qemu-eest-blockchain.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ jobs:
3232
xpm install @xpack-dev-tools/riscv-none-elf-gcc@latest --global --verbose
3333
echo 'export PATH=$HOME/.local/xPacks/@xpack-dev-tools/riscv-none-elf-gcc/15.2.0-1.1/.content/bin:$PATH' >> ~/.bashrc
3434
echo "PATH=$HOME/.local/xPacks/@xpack-dev-tools/riscv-none-elf-gcc/15.2.0-1.1/.content/bin:$PATH" >> $GITHUB_ENV
35-
# Rust is needed by `make eest-rlp-build` (z6m_eest_convert converter).
36-
# rustup auto-installs the toolchain in prover/rust-toolchain.toml on
37-
# the first cargo invocation, so no --default-toolchain pin here.
38-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none --profile minimal
39-
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
4035
4136
- name: Verify tool versions
4237
run: |
@@ -50,6 +45,21 @@ jobs:
5045
ctest --version
5146
qemu-system-riscv32 --version
5247
48+
- name: Install Rust toolchain
49+
env:
50+
CARGO_HOME: /opt/cargo
51+
RUSTUP_HOME: /opt/rustup
52+
# cargo is needed by `make eest-rlp-build` (z6m_eest_convert).
53+
# CARGO_HOME/RUSTUP_HOME are pinned to /opt so rustup-init does not
54+
# trip on the container's HOME vs euid-home mismatch. The toolchain
55+
# itself is resolved from prover/rust-toolchain.toml on first call.
56+
run: |
57+
mkdir -p "$CARGO_HOME" "$RUSTUP_HOME"
58+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain none --profile minimal
59+
echo "CARGO_HOME=$CARGO_HOME" >> $GITHUB_ENV
60+
echo "RUSTUP_HOME=$RUSTUP_HOME" >> $GITHUB_ENV
61+
echo "$CARGO_HOME/bin" >> $GITHUB_PATH
62+
5363
- name: Checkout repository
5464
uses: actions/checkout@v4
5565
with:

0 commit comments

Comments
 (0)