Skip to content

add tests for constants too #1474

add tests for constants too

add tests for constants too #1474

Workflow file for this run

name: Rust CI
on: push
env:
LLVM_SYS_181_PREFIX: /usr/lib/llvm-18/
jobs:
clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install LLVM
run: |
sudo apt-get update
sudo apt-get install llvm-18 libpolly-18-dev
- name: Install Rust
run: |
rustup install stable
rustup component add clippy
rustup default stable
- name: Run cargo clippy
run: cargo clippy -- -D warnings
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust
run: |
rustup install stable
rustup component add rustfmt
rustup default stable
- name: Run cargo fmt
run: cargo fmt -- --check
build:
name: build
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install LLVM
run: |
sudo apt-get update
sudo apt-get install llvm-18 libpolly-18-dev
- name: Install Rust
run: |
rustup install stable
rustup default stable
- name: Run cargo check
run: cargo check
test:
name: test
runs-on: ubuntu-latest
strategy:
matrix:
opts:
- TRITEST_MEMCHECK=true
- TRITEST_OPT=-O3
fail-fast: false
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install LLVM
run: |
sudo apt-get update
sudo apt-get install llvm-18 libpolly-18-dev valgrind
- name: Install Rust
run: |
rustup install stable
rustup default stable
- name: Run cargo test
run: ${{matrix.opts}} cargo test