testcases in concrete_driver examples includes check phase for linearity check coverage #387
Workflow file for this run
This file contains 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: | |
branches: [main] | |
pull_request: | |
merge_group: | |
types: [checks_requested] | |
jobs: | |
check: | |
name: clippy | |
runs-on: ubuntu-latest | |
env: | |
MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/ | |
LLVM_SYS_180_PREFIX: /usr/lib/llvm-18/ | |
TABLEGEN_180_PREFIX: /usr/lib/llvm-18/ | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/[email protected] | |
with: | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@v2 | |
- name: add llvm deb repository | |
uses: myci-actions/add-deb-repo@10 | |
with: | |
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main | |
repo-name: llvm-repo | |
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key | |
- name: Install LLVM | |
run: sudo apt-get install llvm-18 llvm-18-dev llvm-18-runtime clang-18 clang-tools-18 lld-18 libpolly-18-dev libmlir-18-dev mlir-18-tools | |
- name: Clippy | |
run: make check | |
fmt: | |
name: rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/[email protected] | |
with: | |
components: rustfmt | |
- run: cargo fmt --all -- --check | |
test: | |
name: test (linux, amd64) | |
runs-on: ubuntu-latest | |
env: | |
MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/ | |
LLVM_SYS_180_PREFIX: /usr/lib/llvm-18/ | |
TABLEGEN_180_PREFIX: /usr/lib/llvm-18/ | |
RUST_LOG: debug | |
steps: | |
- uses: actions/checkout@v3 | |
- name: free HDD space | |
run: | | |
# deleting space | |
sudo rm -rf /usr/share/dotnet/ | |
sudo rm -rf /usr/local/lib/android | |
- name: Setup rust env | |
uses: dtolnay/[email protected] | |
- name: Retreive cached dependecies | |
uses: Swatinem/rust-cache@v2 | |
- name: add llvm deb repository | |
uses: myci-actions/add-deb-repo@10 | |
with: | |
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main | |
repo-name: llvm-repo | |
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key | |
- name: Install LLVM | |
run: sudo apt-get install llvm-18 llvm-18-dev llvm-18-runtime clang-18 clang-tools-18 lld-18 libpolly-18-dev libmlir-18-dev mlir-18-tools | |
- name: Install Link deps | |
run: sudo apt-get install libc-dev build-essential | |
- name: test | |
run: make test | |
test-macos: | |
name: test (macOS) | |
runs-on: macos-14 | |
env: | |
CARGO_TERM_COLOR: always | |
LIBRARY_PATH: /opt/homebrew/lib | |
MLIR_SYS_180_PREFIX: /opt/homebrew/opt/llvm@18 | |
LLVM_SYS_180_PREFIX: /opt/homebrew/opt/llvm@18 | |
TABLEGEN_180_PREFIX: /opt/homebrew/opt/llvm@18 | |
RUST_LOG: debug | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Rustup toolchain install | |
uses: dtolnay/[email protected] | |
- uses: homebrew/actions/setup-homebrew@master | |
- name: install llvm | |
run: brew install llvm@18 | |
- name: Run tests | |
run: make test | |
coverage: | |
name: coverage | |
runs-on: ubuntu-latest | |
env: | |
CARGO_TERM_COLOR: always | |
MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/ | |
LLVM_SYS_180_PREFIX: /usr/lib/llvm-18/ | |
TABLEGEN_180_PREFIX: /usr/lib/llvm-18/ | |
RUST_LOG: debug | |
steps: | |
- uses: actions/checkout@v3 | |
- name: free HDD space | |
run: | | |
# deleting space | |
sudo rm -rf /usr/share/dotnet/ | |
sudo rm -rf /usr/local/lib/android | |
- name: Setup rust env | |
uses: dtolnay/[email protected] | |
- name: Retreive cached dependecies | |
uses: Swatinem/rust-cache@v2 | |
- name: add llvm deb repository | |
uses: myci-actions/add-deb-repo@10 | |
with: | |
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main | |
repo-name: llvm-repo | |
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key | |
- name: Install LLVM | |
run: sudo apt-get install llvm-18 llvm-18-dev llvm-18-runtime clang-18 clang-tools-18 lld-18 libpolly-18-dev libmlir-18-dev mlir-18-tools | |
- name: Install Link deps | |
run: sudo apt-get install libc-dev build-essential | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: test and generate coverage | |
run: make coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: lcov.info | |
fail_ci_if_error: true | |
bench: | |
name: Bench | |
runs-on: ubuntu-latest | |
env: | |
MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/ | |
LLVM_SYS_180_PREFIX: /usr/lib/llvm-18/ | |
TABLEGEN_180_PREFIX: /usr/lib/llvm-18/ | |
steps: | |
- uses: actions/checkout@v4 | |
- name: free HDD space | |
run: | | |
# deleting space | |
sudo rm -rf /usr/share/dotnet/ | |
sudo rm -rf /usr/local/lib/android | |
- uses: dtolnay/[email protected] | |
with: | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
- name: Setup rust env | |
uses: dtolnay/[email protected] | |
- name: Retreive cached dependecies | |
uses: Swatinem/rust-cache@v2 | |
- name: add llvm deb repository | |
uses: myci-actions/add-deb-repo@11 | |
with: | |
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main | |
repo-name: llvm-repo | |
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key | |
- name: Install LLVM | |
run: sudo apt-get install llvm-18 llvm-18-dev llvm-18-runtime clang-18 clang-tools-18 lld-18 libpolly-18-dev libmlir-18-dev mlir-18-tools | |
- name: Install Link deps | |
run: sudo apt-get install libc-dev build-essential | |
- name: Run bench | |
run: ./bench/bench.sh | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' > bench.md | |
- name: Find Bench Comment | |
continue-on-error: true | |
uses: peter-evans/find-comment@v3 | |
id: fc | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-author: 'github-actions[bot]' | |
body-includes: Benchmarking | |
- name: Create or update bench comment | |
continue-on-error: true | |
uses: peter-evans/create-or-update-comment@v4 | |
with: | |
comment-id: ${{ steps.fc.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
body-path: bench.md | |
edit-mode: replace |