-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (50 loc) · 1.48 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Shaderpulse tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout repository with submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Cache LLVM build
uses: actions/cache@v3
id: llvm-cache
with:
path: llvm-project/build
key: ${{ runner.os }}-llvm-${{ hashFiles('llvm-project/mlir/CMakeLists.txt') }}
restore-keys: |
${{ runner.os }}-llvm-
- name: Install Ninja
run: brew install ninja
- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v1
with:
cmake-version: '3.25'
- name: Build LLVM and MLIR
if: steps.llvm-cache.outputs.cache-hit != 'true'
run: |
mkdir -p llvm-project/build
cd llvm-project/build
cmake -G Ninja ../llvm \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_BUILD_EXAMPLES=ON \
-DLLVM_TARGETS_TO_BUILD="Native" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON
cmake --build .
- name: Configure CMake for Shaderpulse
run: cmake -B build -DENABLE_CODEGEN=ON -DCMAKE_BUILD_TYPE=Release
- name: Build Shaderpulse
run: cmake --build build --config Release
- name: Run CTest
run: ctest --test-dir build/test --output-on-failure
- name: Run CodeGen tests
run: |
cd test/CodeGen/
CI=1 ./run_tests.sh