name: Rust CI on: push env: LLVM_SYS_191_PREFIX: /usr/lib/llvm-19/ RUST_BACKTRACE: 1 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 clang-19 llvm-19 libpolly-19-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 clang-19 llvm-19 libpolly-19-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 clang-19 llvm-19 libpolly-19-dev valgrind - name: Install Rust run: | rustup install stable rustup default stable - name: Run cargo test run: ${{matrix.opts}} cargo test