Skip to content

Commit

Permalink
Pull out llvm version
Browse files Browse the repository at this point in the history
  • Loading branch information
Pat-Lafon committed Jan 22, 2024
1 parent 3b6a74e commit 8ccc888
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,26 @@ on:

name: Workflow checks for rust code

env:
LLVM_VERSION : "17.0"

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
test-code:
- "cd bril-rs && make test TURNTARGS=-v"
- "cd bril-rs && make features"
- "cd brilirs && make test TURNTARGS=-v"
- "cd brilirs && make benchmark TURNTARGS=-v"
- "cd brilift && cargo build --release && make rt.o && make test TURNTARGS=-v"
- "cd brilift && cargo build --release && make rt.o && make benchmark TURNTARGS=-v"
- "cd bril-rs/brillvm && make rt"
# Code requiring additional dependencies are separated out
include:
- test-code: "cd bril-rs && make features"
needs_cargo_hack: true
- test-code: "cd bril-rs/brillvm && make rt"
needs_llvm: true
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
Expand All @@ -47,13 +54,13 @@ jobs:

- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
if: matrix.test-code == 'cd bril-rs/brillvm && make rt'
if: matrix.needs_llvm
with:
version: "17.0"
version: ${{ env.LLVM_VERSION }}

- name: Install cargo-hack for feature-flag checking
run: cargo install cargo-hack
if: matrix.test-code == 'cd bril-rs && make features'
if: matrix.needs_cargo_hack

- uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -99,7 +106,7 @@ jobs:
uses: KyleMayes/install-llvm-action@v1
if: matrix.path == 'bril-rs/brillvm/Cargo.toml'
with:
version: "17.0"
version: ${{ env.LLVM_VERSION }}

- name: cargo check
run: cargo check --manifest-path ${{ matrix.path }} --all-targets
Expand Down

0 comments on commit 8ccc888

Please sign in to comment.