Skip to content

Commit 90433d2

Browse files
committed
Manually parse Rust toolchain spec
b/c actions-rs/toolchain doesn't support rust-toolchain.toml, see actions-rs/toolchain#209
1 parent f33922b commit 90433d2

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,15 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v4
2323

24+
- name: Configure rustc version
25+
run: |
26+
RUSTC_VERSION=$(cat rust-toolchain.toml | grep channel | tail -n1 | tr -d " " | cut -f2 -d'"')
27+
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
28+
2429
- name: Install Rust toolchain
2530
uses: actions-rs/toolchain@v1
2631
with:
32+
toolchain: ${{ env.RUSTC_VERSION }}
2733
profile: minimal
2834
override: true
2935
components: rustfmt
@@ -40,9 +46,15 @@ jobs:
4046
steps:
4147
- uses: actions/checkout@v4
4248

49+
- name: Configure rustc version
50+
run: |
51+
RUSTC_VERSION=$(cat rust-toolchain.toml | grep channel | tail -n1 | tr -d " " | cut -f2 -d'"')
52+
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
53+
4354
- name: Install Rust toolchain
4455
uses: actions-rs/toolchain@v1
4556
with:
57+
toolchain: ${{ env.RUSTC_VERSION }}
4658
target: wasm32-unknown-unknown
4759
profile: minimal
4860
override: true
@@ -64,9 +76,15 @@ jobs:
6476
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
6577
- uses: actions/checkout@v4
6678

79+
- name: Configure rustc version
80+
run: |
81+
RUSTC_VERSION=$(cat rust-toolchain.toml | grep channel | tail -n1 | tr -d " " | cut -f2 -d'"')
82+
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
83+
6784
- name: Install Rust toolchain
6885
uses: actions-rs/toolchain@v1
6986
with:
87+
toolchain: ${{ env.RUSTC_VERSION }}
7088
target: wasm32-unknown-unknown
7189
profile: minimal
7290
override: true

0 commit comments

Comments
 (0)