-
Notifications
You must be signed in to change notification settings - Fork 7
157 lines (128 loc) · 4.99 KB
/
basic-ci.yml
File metadata and controls
157 lines (128 loc) · 4.99 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: TypeART-CI
on:
push:
branches: [ master, devel ]
pull_request:
env:
CXX: clang++
CC: clang
OMP_NUM_THREAD: 2
jobs:
format-check:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-18 main" | sudo tee /etc/apt/sources.list.d/llvm-18.list
- name: Install clang-format
run: sudo apt-get install clang-format-18
- name: Format source code
run: |
find demo lib test \
-type f \
-a \( -name "*.c" -o -name "*.cpp" -o -name "*.h" \) \
-not -path "*/lulesh/*" -not -path "*/CallSite.h" \
-print0 \
| xargs -0 clang-format-18 -i
- name: Format check
run: |
git status --porcelain --untracked-files=no
git status --porcelain --untracked-files=no | xargs -o -I {} test -z \"{}\"
codespell:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- uses: codespell-project/actions-codespell@v2
lit-suite:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, ubuntu-24.04 ]
llvm-version: [ 14, 18, 19 ]
typeart-typegen-legacy: [ 0, 1 ]
preset:
- name: ci-thread-safe-safeptr
- name: ci-thread-safe
- name: ci-thread-unsafe
- name: ci-cov-thread-safe-safeptr
coverage: true
- name: ci-cov-thread-safe
coverage: true
- name: ci-cov-thread-unsafe
coverage: true
- name: ci-libcxx
libcxx: true
skip_test: true
exclude:
- llvm-version: 14
os: ubuntu-24.04
- llvm-version: 18
os: ubuntu-22.04
- llvm-version: 18
typeart-typegen-legacy: 1
- llvm-version: 19
os: ubuntu-22.04
- llvm-version: 19
typeart-typegen-legacy: 1
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- name: LLVM apt
if: ${{ matrix.llvm-version == 19 }}
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-19 main" | sudo tee /etc/apt/sources.list.d/llvm-19.list
- name: Update apt
run: sudo apt-get update
- name: Install LLVM
run: sudo apt-get install libllvm${{ matrix.llvm-version }} llvm-${{ matrix.llvm-version }} llvm-${{ matrix.llvm-version }}-dev
- name: Install LLVM OpenMP runtime
run: sudo apt-get install libomp-${{ matrix.llvm-version }}-dev libomp5-${{ matrix.llvm-version }}
- name: Install Clang
run: sudo apt-get install clang-${{ matrix.llvm-version }} clang-tidy-${{ matrix.llvm-version }}
- name: Install libc++
if: matrix.preset.libcxx
run: sudo apt-get install --no-install-recommends libc++-${{ matrix.llvm-version }}-dev libc++abi-${{ matrix.llvm-version }}-dev
- name: Install OpenMPI
run: sudo apt-get install libopenmpi-dev openmpi-bin
- name: Install lcov
if: matrix.preset.coverage
run: sudo apt-get install lcov
- name: Setup env
run: |
sudo ln -f -s /usr/bin/clang-${{ matrix.llvm-version }} /usr/bin/clang
sudo ln -f -s /usr/bin/clang++-${{ matrix.llvm-version }} /usr/bin/clang++
echo "LLVM_CMAKE_DIR=/usr/lib/llvm-${{ matrix.llvm-version }}/cmake" >> $GITHUB_ENV
echo "EXTERNAL_LIT=/usr/lib/llvm-${{ matrix.llvm-version }}/build/utils/lit/lit.py" >> $GITHUB_ENV
echo "TYPEART_TYPEGEN_IR=${{ matrix.typeart-typegen-legacy }}" >> $GITHUB_ENV
- name: Configure TypeART
run: cmake -B build --preset ${{ matrix.preset.name }} -DLLVM_DIR=${LLVM_CMAKE_DIR} -DLLVM_EXTERNAL_LIT=${EXTERNAL_LIT}
- name: Build TypeART
run: cmake --build build --parallel 2
- name: Prepare TypeART coverage
if: matrix.preset.coverage
run: cmake --build build --target typeart-lcov-clean
- name: Test TypeART lit-suite
if: matrix.preset.skip_test == false
run: cmake --build build --target check-typeart
- name: Build coverage report
if: matrix.preset.coverage
run: cmake --build build --target typeart-lcov-html
- name: Coveralls (parallel)
if: matrix.preset.coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: build/typeart.coverage
flag-name: ${{ matrix.preset.name }}-${{ matrix.llvm-version }}-${{ matrix.typeart-typegen-legacy }}
parallel: true
finish-coverage:
needs: lit-suite
runs-on: ubuntu-22.04
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true