Skip to content

Commit a83c63b

Browse files
authored
Merge PR #108 from tudasc/devel
Release 1.7
2 parents e563d3d + 57bd61f commit a83c63b

File tree

266 files changed

+7380
-2985
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

266 files changed

+7380
-2985
lines changed

.github/workflows/basic-ci.yml

Lines changed: 54 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ on:
66
pull_request:
77

88
env:
9-
CXX: clang++-10
10-
CC: clang-10
11-
EXTERNAL_LIT: /usr/lib/llvm-10/build/utils/lit/lit.py
9+
CXX: clang++
10+
CC: clang
1211
OMP_NUM_THREAD: 2
1312

1413
jobs:
@@ -23,151 +22,117 @@ jobs:
2322
find demo lib test \
2423
-type f \
2524
-a \( -name "*.c" -o -name "*.cpp" -o -name "*.h" \) \
26-
-not -path "*/lulesh/*" \
25+
-not -path "*/lulesh/*" -not -path "*/CallSite.h" \
2726
-print0 \
2827
| xargs -0 clang-format-10 -i
2928
30-
- name: List newly formatted files
31-
run: git status --porcelain --untracked-files=no
29+
- name: Format check
30+
run: |
31+
git status --porcelain --untracked-files=no
32+
git status --porcelain --untracked-files=no | xargs -o -I {} test -z \"{}\"
3233
33-
- name: Check format
34-
run: git status --porcelain --untracked-files=no | xargs -o -I {} test -z \"{}\"
34+
codespell:
35+
runs-on: ubuntu-20.04
36+
37+
steps:
38+
- uses: actions/checkout@v2
39+
- uses: codespell-project/actions-codespell@master
40+
with:
41+
path: demo lib test
42+
skip: ./.git,*.py,*/lulesh
3543

3644
lit-suite:
3745
runs-on: ubuntu-20.04
38-
if: "!contains(github.event.head_commit.message, '[ci skip]')"
46+
3947
strategy:
4048
fail-fast: false
4149
matrix:
42-
config:
43-
- {
44-
name: Thread-safe-safeptr,
45-
build_type: Debug,
46-
safe_ptr: true,
47-
tsan: true,
48-
}
49-
- {
50-
name: Thread-safe,
51-
build_type: Debug,
52-
safe_ptr: false,
53-
tsan: true,
54-
}
55-
- {
56-
name: Thread-unsafe,
57-
build_type: Debug,
58-
thread_unsafe: true,
59-
tsan: false,
60-
}
61-
- {
62-
name: Coverage-thread-safe-safeptr,
63-
build_type: Debug,
64-
safe_ptr: true,
65-
coverage: true,
66-
tsan: false,
67-
}
68-
- {
69-
name: Coverage-thread-safe,
70-
build_type: Debug,
71-
safe_ptr: false,
72-
coverage: true,
73-
tsan: false,
74-
}
75-
- {
76-
name: Coverage-thread-unsafe,
77-
build_type: Debug,
78-
thread_unsafe: true,
79-
coverage: true,
80-
tsan: false,
81-
}
82-
- {
83-
name: Thread-safe-libc++,
84-
build_type: Debug,
85-
cxxflags: -stdlib=libc++,
86-
skip_test: true,
87-
tsan: true,
88-
}
50+
llvm-version: [ 10, 11, 12 ]
51+
preset:
52+
- name: ci-thread-safe-safeptr
53+
- name: ci-thread-safe
54+
- name: ci-thread-unsafe
55+
- name: ci-cov-thread-safe-safeptr
56+
coverage: true
57+
- name: ci-cov-thread-safe
58+
coverage: true
59+
- name: ci-cov-thread-unsafe
60+
coverage: true
61+
- name: ci-libcxx
62+
libcxx: true
63+
skip_test: true
8964

9065
steps:
9166
- uses: actions/checkout@v2
9267

68+
- name: Update apt
69+
run: sudo apt-get update
70+
9371
- name: Install LLVM
94-
run: sudo apt-get install libllvm10 llvm-10 llvm-10-dev
72+
run: sudo apt-get install libllvm${{ matrix.llvm-version }} llvm-${{ matrix.llvm-version }} llvm-${{ matrix.llvm-version }}-dev
9573

9674
- name: Install LLVM OpenMP runtime
97-
run: sudo apt-get install libomp-10-dev libomp5-10
75+
run: sudo apt-get install libomp-${{ matrix.llvm-version }}-dev libomp5-${{ matrix.llvm-version }}
9876

9977
- name: Install Clang
100-
run: sudo apt-get install clang-10 clang-tidy-10
78+
run: sudo apt-get install clang-${{ matrix.llvm-version }} clang-tidy-${{ matrix.llvm-version }}
10179

10280
- name: Install libc++
103-
if: contains(matrix.config.cxxflags, '-stdlib=libc++')
104-
run: sudo apt-get install --no-install-recommends libc++-10-dev libc++abi-10-dev
81+
if: matrix.preset.libcxx
82+
run: sudo apt-get install --no-install-recommends libc++-${{ matrix.llvm-version }}-dev libc++abi-${{ matrix.llvm-version }}-dev
10583

10684
- name: Install OpenMPI
10785
run: sudo apt-get install libopenmpi-dev openmpi-bin
10886

10987
- name: Install lcov
110-
if: matrix.config.coverage
88+
if: matrix.preset.coverage
11189
run: sudo apt-get install lcov
11290

11391
- name: Setup env
11492
run: |
115-
sudo ln -f -s /usr/bin/clang-10 /usr/bin/clang
116-
sudo ln -f -s /usr/bin/clang++-10 /usr/bin/clang++
117-
sudo ln -f -s /usr/bin/opt-10 /usr/bin/opt
118-
sudo ln -f -s /usr/bin/FileCheck-10 /usr/bin/FileCheck
119-
sudo ln -f -s /usr/bin/llc-10 /usr/bin/llc
120-
sudo ln -f -s /usr/bin/clang-tidy-10 /usr/bin/clang-tidy
93+
sudo ln -f -s /usr/bin/clang-${{ matrix.llvm-version }} /usr/bin/clang
94+
sudo ln -f -s /usr/bin/clang++-${{ matrix.llvm-version }} /usr/bin/clang++
95+
echo "LLVM_CMAKE_DIR=/usr/lib/llvm-${{ matrix.llvm-version }}/cmake" >> $GITHUB_ENV
96+
echo "EXTERNAL_LIT=/usr/lib/llvm-${{ matrix.llvm-version }}/build/utils/lit/lit.py" >> $GITHUB_ENV
12197
12298
- name: Configure TypeART
123-
run: |
124-
cmake -B build \
125-
-DTEST_CONFIG=ON -DSOFTCOUNTERS=ON \
126-
-DENABLE_CODE_COVERAGE=${{ matrix.config.coverage }} \
127-
-DENABLE_TSAN=${{ matrix.config.tsan }} \
128-
-DENABLE_ASAN=${{ matrix.config.tsan == false }} \
129-
-DENABLE_UBSAN=${{ matrix.config.tsan == false }} \
130-
-DENABLE_SAFEPTR=${{ matrix.config.safe_ptr }} \
131-
-DDISABLE_THREAD_SAFETY=${{ matrix.config.thread_unsafe }} \
132-
-DLLVM_EXTERNAL_LIT=${EXTERNAL_LIT} \
133-
-DCMAKE_CXX_FLAGS="${{ matrix.config.cxxflags }}" \
134-
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }}
99+
run: cmake -B build --preset ${{ matrix.preset.name }} -DLLVM_DIR=${LLVM_CMAKE_DIR} -DLLVM_EXTERNAL_LIT=${EXTERNAL_LIT}
135100

136101
- name: Build TypeART
137102
run: cmake --build build --parallel 2
138103

139104
- name: Prepare TypeART coverage
140-
if: matrix.config.coverage
105+
if: matrix.preset.coverage
141106
run: cmake --build build --target lcov-clean
142107

143108
- name: Test TypeART lit-suite
144-
if: matrix.config.skip_test == false
109+
if: matrix.preset.skip_test == false
145110
run: cmake --build build --target lit-pass-test
146111

147112
- name: Build coverage report
148-
if: matrix.config.coverage
113+
if: matrix.preset.coverage
149114
run: cmake --build build --target lcov-html
150115

151116
- name: Prepare coverage artifact
152-
if: matrix.config.coverage
117+
if: matrix.preset.coverage
153118
run: |
154-
mkdir -p artifact/${{ matrix.config.name }}
155-
mv build/profiles/ artifact/${{ matrix.config.name }}
119+
mkdir -p artifact/${{ matrix.preset.name }}-${{ matrix.llvm-version }}
120+
mv build/profiles/ artifact/${{ matrix.preset.name }}-${{ matrix.llvm-version }}
156121
157122
- name: Upload test coverage artifact
158-
if: matrix.config.coverage
123+
if: matrix.preset.coverage
159124
uses: actions/upload-artifact@v2
160125
with:
161126
name: typeart-ci-coverage
162127
path: artifact
163128

164129
- name: Coveralls (parallel)
165-
if: matrix.config.coverage
130+
if: matrix.preset.coverage
166131
uses: coverallsapp/github-action@master
167132
with:
168133
github-token: ${{ secrets.GITHUB_TOKEN }}
169134
path-to-lcov: build/typeart.coverage
170-
flag-name: ${{ matrix.config.name }}
135+
flag-name: ${{ matrix.preset.name }}-${{ matrix.llvm-version }}
171136
parallel: true
172137

173138
finish-coverage:

0 commit comments

Comments
 (0)