-
Notifications
You must be signed in to change notification settings - Fork 112
50 lines (45 loc) · 1.98 KB
/
ccpp.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
name: C/C++ CI
on:
push:
branches:
- main
pull_request:
branches:
- main
merge_group:
jobs:
build:
name: Integration CI LLVM ${{ matrix.llvm }} ${{ matrix.build }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
llvm: ["11", "12", "13", "14", "15", "16", "17"]
build: ["Release"] # "RelWithDebInfo"
os: [ubuntu-20.04]
timeout-minutes: 45
steps:
- name: add llvm
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/`lsb_release -c | cut -f2`/ llvm-toolchain-`lsb_release -c | cut -f2`-${{ matrix.llvm }} main" || true
sudo apt-get install -y cmake gcc g++ llvm-${{ matrix.llvm }}-dev libomp-${{ matrix.llvm }}-dev lld-${{ matrix.llvm }} clang-${{ matrix.llvm }} libclang-${{ matrix.llvm }}-dev libeigen3-dev libboost-dev libzstd-dev
sudo python3 -m pip install --upgrade pip lit
if [[ '${{ matrix.llvm }}' == '13' ]]; then
sudo sed -i 's/add_executable(llvm-omp-device-info IMPORTED)//g' /usr/lib/llvm-${{matrix.llvm}}/lib/cmake/llvm/LLVMExports*.cmake
sudo sed -i 's/llvm-omp-device-info//g' /usr/lib/llvm-${{matrix.llvm}}/lib/cmake/llvm/LLVMExports*.cmake
fi
- uses: actions/checkout@v3
- name: mkdir
run: rm -rf build && mkdir build
- name: cmake
working-directory: build
run: cmake ../enzyme -DLLVM_EXTERNAL_LIT=`which lit` -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_DIR=/usr/lib/llvm-${{ matrix.llvm }}/lib/cmake/llvm
- name: make
run: cd build && make -j `nproc` LLVMEnzyme-${{ matrix.llvm }} ClangEnzyme-${{ matrix.llvm }} LLDEnzyme-${{ matrix.llvm }}
- name: make test-cmake
working-directory: build
run: make -j `nproc` test-cmake
- name: make check-enzyme-integration
working-directory: build
run: make -j `nproc` check-enzyme-integration