Skip to content

Commit

Permalink
Manually parse Rust toolchain spec
Browse files Browse the repository at this point in the history
b/c actions-rs/toolchain doesn't support rust-toolchain.toml, see
actions-rs/toolchain#209
  • Loading branch information
atodorov committed Oct 11, 2023
1 parent f33922b commit 90433d2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Configure rustc version
run: |
RUSTC_VERSION=$(cat rust-toolchain.toml | grep channel | tail -n1 | tr -d " " | cut -f2 -d'"')
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUSTC_VERSION }}
profile: minimal
override: true
components: rustfmt
Expand All @@ -40,9 +46,15 @@ jobs:
steps:
- uses: actions/checkout@v4

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

- name: Configure rustc version
run: |
RUSTC_VERSION=$(cat rust-toolchain.toml | grep channel | tail -n1 | tr -d " " | cut -f2 -d'"')
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUSTC_VERSION }}
target: wasm32-unknown-unknown
profile: minimal
override: true
Expand Down

0 comments on commit 90433d2

Please sign in to comment.