-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (52 loc) · 1.8 KB
/
buildAndTest.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
name: Build and Test
on: [push, pull_request]
jobs:
build-scalehls:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Get ScaleHLS
uses: actions/checkout@v2
with:
submodules: recursive
- name: Clang Format
uses: DoozyX/[email protected]
with:
exclude: './polygeist ./samples ./test'
clangFormatVersion: 11
style: llvm
- name: Get LLVM Hash
id: get-llvm-hash
run: echo "::set-output name=hash::$(git -C ./polygeist rev-parse @:./llvm-project)"
- name: Cache LLVM
id: cache-llvm
uses: actions/cache@v2
with:
path: polygeist/llvm-project/build
key: ${{ runner.os }}-llvm-${{ steps.get-llvm-hash.outputs.hash }}
- name: Rebuild LLVM
if: steps.cache-llvm.outputs.cache-hit != 'true'
run: |
mkdir -p polygeist/llvm-project/build
cd polygeist/llvm-project/build
cmake ../llvm \
-DLLVM_ENABLE_PROJECTS="mlir" \
-DLLVM_TARGETS_TO_BUILD="host" \
-DCMAKE_BUILD_TYPE=RELEASE \
-DLLVM_USE_LINKER=lld \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++
cmake --build . -j $(nproc)
- name: Build and Test ScaleHLS
run: |
mkdir -p build
cd build
cmake .. \
-DMLIR_DIR="$PWD/../polygeist/llvm-project/build/lib/cmake/mlir" \
-DLLVM_DIR="$PWD/../polygeist/llvm-project/build/lib/cmake/llvm" \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCMAKE_BUILD_TYPE=DEBUG \
-DLLVM_USE_LINKER=lld \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++
cmake --build . --target check-scalehls -j $(nproc)