Skip to content

Commit e563d3d

Browse files
authored
Merge PR #79 from tudasc/devel
Release 1.6 changes to support OpenMP and array cookies
2 parents 71d7993 + 0a5d109 commit e563d3d

File tree

137 files changed

+5729
-1413
lines changed

Some content is hidden

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

137 files changed

+5729
-1413
lines changed

.clang-format

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
Language: Cpp
1+
Language: Cpp
22
# BasedOnStyle: Google
33
AccessModifierOffset: -1
44
AlignAfterOpenBracket: Align
55
AlignConsecutiveAssignments: true
66
AlignEscapedNewlinesLeft: true
7-
AlignOperands: true
7+
AlignOperands: true
88
AlignTrailingComments: true
99
AllowAllParametersOfDeclarationOnNextLine: true
1010
AllowShortBlocksOnASingleLine: false
@@ -20,7 +20,7 @@ BreakBeforeTernaryOperators: true
2020
BreakConstructorInitializersBeforeComma: false
2121
BinPackParameters: true
2222
BinPackArguments: true
23-
ColumnLimit: 120
23+
ColumnLimit: 120
2424
ConstructorInitializerAllOnOneLineOrOnePerLine: true
2525
ConstructorInitializerIndentWidth: 4
2626
DerivePointerAlignment: false
@@ -43,31 +43,31 @@ PenaltyReturnTypeOnItsOwnLine: 200
4343
PointerAlignment: Left
4444
SpacesBeforeTrailingComments: 2
4545
Cpp11BracedListStyle: true
46-
Standard: Cpp11
47-
IndentWidth: 2
48-
TabWidth: 2
49-
UseTab: Never
46+
Standard: Cpp11
47+
IndentWidth: 2
48+
TabWidth: 2
49+
UseTab: Never
5050
BreakBeforeBraces: Attach
5151
SpacesInParentheses: false
5252
SpacesInSquareBrackets: false
53-
SpacesInAngles: false
53+
SpacesInAngles: false
5454
SpaceInEmptyParentheses: false
5555
SpacesInCStyleCastParentheses: false
5656
SpaceAfterCStyleCast: false
5757
SpacesInContainerLiterals: true
5858
SpaceBeforeAssignmentOperators: true
5959
ContinuationIndentWidth: 4
60-
CommentPragmas: '^ IWYU pragma:'
61-
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
60+
CommentPragmas: '^ IWYU pragma:'
61+
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
6262
SpaceBeforeParens: ControlStatements
63-
DisableFormat: false
63+
DisableFormat: false
6464
IncludeBlocks: Regroup
6565
IncludeCategories:
66-
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
67-
Priority: 2
68-
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
69-
Priority: 3
70-
- Regex: '<[[:alnum:].]+>'
71-
Priority: 4
72-
- Regex: '.*'
73-
Priority: 1
66+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
67+
Priority: 2
68+
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
69+
Priority: 3
70+
- Regex: '<[[:alnum:].]+>'
71+
Priority: 4
72+
- Regex: '.*'
73+
Priority: 1

.github/workflows/basic-ci.yml

Lines changed: 131 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,109 @@ on:
55
branches: [ master, devel ]
66
pull_request:
77

8+
env:
9+
CXX: clang++-10
10+
CC: clang-10
11+
EXTERNAL_LIT: /usr/lib/llvm-10/build/utils/lit/lit.py
12+
OMP_NUM_THREAD: 2
13+
814
jobs:
9-
build-and-run-test:
15+
format-check:
16+
runs-on: ubuntu-20.04
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- name: Format source code
22+
run: |
23+
find demo lib test \
24+
-type f \
25+
-a \( -name "*.c" -o -name "*.cpp" -o -name "*.h" \) \
26+
-not -path "*/lulesh/*" \
27+
-print0 \
28+
| xargs -0 clang-format-10 -i
29+
30+
- name: List newly formatted files
31+
run: git status --porcelain --untracked-files=no
32+
33+
- name: Check format
34+
run: git status --porcelain --untracked-files=no | xargs -o -I {} test -z \"{}\"
35+
36+
lit-suite:
1037
runs-on: ubuntu-20.04
1138
if: "!contains(github.event.head_commit.message, '[ci skip]')"
39+
strategy:
40+
fail-fast: false
41+
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+
}
89+
1290
steps:
1391
- uses: actions/checkout@v2
1492

1593
- name: Install LLVM
1694
run: sudo apt-get install libllvm10 llvm-10 llvm-10-dev
1795

96+
- name: Install LLVM OpenMP runtime
97+
run: sudo apt-get install libomp-10-dev libomp5-10
98+
1899
- name: Install Clang
19100
run: sudo apt-get install clang-10 clang-tidy-10
20101

102+
- 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
105+
21106
- name: Install OpenMPI
22107
run: sudo apt-get install libopenmpi-dev openmpi-bin
23108

24109
- name: Install lcov
110+
if: matrix.config.coverage
25111
run: sudo apt-get install lcov
26112

27113
- name: Setup env
@@ -32,49 +118,64 @@ jobs:
32118
sudo ln -f -s /usr/bin/FileCheck-10 /usr/bin/FileCheck
33119
sudo ln -f -s /usr/bin/llc-10 /usr/bin/llc
34120
sudo ln -f -s /usr/bin/clang-tidy-10 /usr/bin/clang-tidy
35-
echo "CC=clang-10" >> $GITHUB_ENV
36-
echo "CXX=clang++-10" >> $GITHUB_ENV
37-
echo "EXTERNAL_LIT=/usr/lib/llvm-10/build/utils/lit/lit.py" >> $GITHUB_ENV
38121
39-
- name: Build TypeART
122+
- name: Configure TypeART
40123
run: |
41-
cmake -B build -DTEST_CONFIG=ON -DENABLE_CODE_COVERAGE=ON -DSOFTCOUNTERS=ON -DLLVM_EXTERNAL_LIT=${EXTERNAL_LIT}
42-
cmake --build build --parallel
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 }}
43135
44-
- name: Test TypeART with coverage
45-
run: |
46-
cmake --build build --target lcov-clean
47-
cmake --build build --target test -- ARGS=-VV
136+
- name: Build TypeART
137+
run: cmake --build build --parallel 2
138+
139+
- name: Prepare TypeART coverage
140+
if: matrix.config.coverage
141+
run: cmake --build build --target lcov-clean
142+
143+
- name: Test TypeART lit-suite
144+
if: matrix.config.skip_test == false
145+
run: cmake --build build --target lit-pass-test
48146

49147
- name: Build coverage report
148+
if: matrix.config.coverage
50149
run: cmake --build build --target lcov-html
51150

52-
- name: Build TypeART release
151+
- name: Prepare coverage artifact
152+
if: matrix.config.coverage
53153
run: |
54-
cmake -B build_lulesh -DCMAKE_BUILD_TYPE=Release -DMPI_INTERCEPT_LIB=ON -DSHOW_STATS=ON -DSOFTCOUNTERS=ON
55-
cmake --build build_lulesh --parallel
56-
57-
- name: Test TypeART release on lulesh
58-
working-directory: build_lulesh
59-
run: ctest -V -R lulesh -O lulesh2.0_build.log
154+
mkdir -p artifact/${{ matrix.config.name }}
155+
mv build/profiles/ artifact/${{ matrix.config.name }}
60156
61-
- name: Prepare artifact
62-
run: |
63-
mkdir -p artifact/lulesh
64-
mkdir -p artifact/coverage
65-
mv build_lulesh/lulesh2.0_build.log artifact/lulesh/
66-
mv test/lulesh/lulesh2.0_out.log artifact/lulesh/
67-
mv test/lulesh/types.yaml artifact/lulesh/lulesh2.0_types.yaml
68-
mv build/profiles/ artifact/coverage
69-
70-
- name: Upload lulesh test artifact
157+
- name: Upload test coverage artifact
158+
if: matrix.config.coverage
71159
uses: actions/upload-artifact@v2
72160
with:
73-
name: typeart-ci
161+
name: typeart-ci-coverage
74162
path: artifact
75163

76-
- name: Coveralls
164+
- name: Coveralls (parallel)
165+
if: matrix.config.coverage
77166
uses: coverallsapp/github-action@master
78167
with:
79168
github-token: ${{ secrets.GITHUB_TOKEN }}
80169
path-to-lcov: build/typeart.coverage
170+
flag-name: ${{ matrix.config.name }}
171+
parallel: true
172+
173+
finish-coverage:
174+
needs: lit-suite
175+
runs-on: ubuntu-20.04
176+
steps:
177+
- name: Coveralls Finished
178+
uses: coverallsapp/github-action@master
179+
with:
180+
github-token: ${{ secrets.GITHUB_TOKEN }}
181+
parallel-finished: true

0 commit comments

Comments
 (0)