Skip to content

Commit

Permalink
[CI] initialize (#14)
Browse files Browse the repository at this point in the history
* [CI] initialize

* [CI] initialize

* [CI] initialize with MLIR

* [CI] initialize with MLIR

* [CI] add check
  • Loading branch information
SchrodingerZhu authored Aug 21, 2024
1 parent 6de7bca commit 9115242
Show file tree
Hide file tree
Showing 6 changed files with 142 additions and 175 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BasedOnStyle: LLVM
42 changes: 42 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
version: [18, 19, 20]
env:
RUSTFLAGS: "-Dwarnings"
MLIR_DIR: /usr/lib/llvm-${{matrix.version}}/lib/cmake/mlir/
LLVM_DIR: /usr/lib/llvm-${{matrix.version}}/
CXX: /usr/lib/llvm-${{matrix.version}}/bin/clang++
CC: /usr/lib/llvm-${{matrix.version}}/bin/clang
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install LLVM
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${{matrix.version}} all
sudo apt-get install -y mlir-${{matrix.version}}-tools libmlir-${{matrix.version}}-dev ninja-build cmake
- name: Install LLVM Lit
run: |
pip install lit
- name: Setup Rust Toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy, rustfmt
- name: ReuseIR Check
run: |
cmake -S reuse-mlir -B build -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build --target check --parallel
- name: Run Clippy
run: cargo clippy
- name: Run RustFmt
run: cargo fmt --check
- name: Run Rust Test
run: cargo test



13 changes: 13 additions & 0 deletions .github/workflows/clang-format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: clang-format Check
on: [push, pull_request]
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run clang-format style check for ReuseIR.
uses: jidicula/[email protected]
with:
clang-format-version: '18'
check-path: reuse-mlir
Loading

0 comments on commit 9115242

Please sign in to comment.