diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 446ae03e..4a68ca5e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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