test type checking #108
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build-and-test: | |
| name: Build and Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Add LLVM 20 repository | |
| run: | | |
| wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/keyrings/llvm.asc | |
| echo "deb [signed-by=/etc/apt/keyrings/llvm.asc] http://apt.llvm.org/noble/ llvm-toolchain-noble-20 main" | sudo tee /etc/apt/sources.list.d/llvm.list | |
| sudo apt-get update | |
| - name: Install and cache LLVM/MLIR dependencies | |
| uses: awalsh128/cache-apt-pkgs-action@latest | |
| with: | |
| packages: >- | |
| software-properties-common | |
| build-essential | |
| llvm-20 | |
| llvm-20-dev | |
| clang-20 | |
| clang-tools-20 | |
| libclang-20-dev | |
| lld-20 | |
| mlir-20-tools | |
| libmlir-20-dev | |
| libpolly-20-dev | |
| clang-format-20 | |
| cmake | |
| ninja-build | |
| pkg-config | |
| zlib1g-dev | |
| libxml2-dev | |
| libzstd-dev | |
| libffi-dev | |
| version: 1.0 | |
| - name: Configure LLVM alternatives | |
| run: | | |
| sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-20 100 | |
| sudo update-alternatives --set llvm-config /usr/bin/llvm-config-20 | |
| sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-20 100 | |
| sudo update-alternatives --set clang /usr/bin/clang-20 | |
| sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-20 100 | |
| sudo update-alternatives --set clang++ /usr/bin/clang++-20 | |
| sudo update-alternatives --install /usr/bin/mlir-tblgen mlir-tblgen /usr/bin/mlir-tblgen-20 100 | |
| sudo update-alternatives --set mlir-tblgen /usr/bin/mlir-tblgen-20 | |
| sudo update-alternatives --install /usr/bin/mlir-opt mlir-opt /usr/bin/mlir-opt-20 100 | |
| sudo update-alternatives --set mlir-opt /usr/bin/mlir-opt-20 | |
| sudo update-alternatives --install /usr/bin/mlir-translate mlir-translate /usr/bin/mlir-translate-20 100 | |
| sudo update-alternatives --set mlir-translate /usr/bin/mlir-translate-20 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Build project | |
| run: cargo build --verbose | |
| - name: Run tests | |
| run: cargo test --verbose |