Skip to content

Commit

Permalink
ci: test with cranelift
Browse files Browse the repository at this point in the history
  • Loading branch information
KisaragiEffective authored Jun 20, 2024
1 parent dd2714f commit e7efa87
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
- rustc_channel: nightly
# renovate: rustc-nightly
rustc_version: '2024-06-12'
- rustc_channel: nightly
codegen: default
- rustc_channel: nightly
codegen: cranelift

runs-on: ${{ matrix.os }}

Expand All @@ -42,16 +46,25 @@ jobs:
rustup component add clippy --toolchain ${{ matrix.rustc_version }}
rustup override set ${{ matrix.rustc_version }}
fi
rustup show
shell: bash
- name: Install cranelift if necessary
run: |
rustup component add rustc-codegen-cranelift-preview --toolchain nightly-${{ matrix.rustc_version }}
shell: bash
if: ${{ matrix.codegen == 'cranelift' && matrix.rustc_channel == 'nightly' }}
- 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' }}
- 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 e7efa87

Please sign in to comment.