Skip to content

Commit

Permalink
ci: update RUSTFLAGS before restoring cache
Browse files Browse the repository at this point in the history
  • Loading branch information
KisaragiEffective authored Jun 20, 2024
1 parent 8f8a609 commit ba70752
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,22 @@ jobs:
run: |
rustup component add rustc-codegen-cranelift-preview --toolchain nightly-${{ matrix.rustc_version }}
shell: bash
if: ${{ matrix.codegen == 'cranelift' && matrix.rustc_channel == 'nightly' && matrix.os == 'ubuntu-24.04' }}
if: ${{ matrix.codegen == 'cranelift' }}
- name: Setup codegen unstable flag
run: |
printf 'CODEGEN_SELECTION=-Zcodegen-backend=cranelift' >> "$GITHUB_ENV"
if: ${{ matrix.codegen == 'cranelift' }}
- name: Build RUSTFLAGS
run: |
printf 'RUSTFLAGS=${{ env.CODEGEN_SELECTION }}' >> "$GITHUB_ENV"
shell: bash
- name: Rust Cache
uses: Swatinem/[email protected]
with:
prefix-key: ${{ matrix.os }}-${{ matrix.rustc_version }}-${{ env.CI_RUST_CACHE_VERSION }}-${{ hashFiles('**/Cargo.lock') }}
# See rust-wasm.yml for CI details about those package
- name: Setup codegen unstable flag
run: |
printf 'CODEGEN_SELECTION=-Zcodegen-backend=cranelift' >> "$GITHUB_ENV"
if: ${{ matrix.codegen == 'cranelift' && matrix.rustc_channel == 'nightly' && matrix.os == 'ubuntu-24.04' }}
- name: Build package
run: cargo build --workspace --exclude origlang-interop --exclude origlang-interop-frontend-webserver --verbose
env:
RUSTFLAGS: '${{ env.CODEGEN_SELECTION }}'
- name: Lint with clippy
run: cargo clippy --workspace --exclude origlang-interop --exclude origlang-interop-frontend-webserver --verbose
- name: Run tests
Expand Down

0 comments on commit ba70752

Please sign in to comment.