-
Notifications
You must be signed in to change notification settings - Fork 1
170 lines (142 loc) · 5.7 KB
/
main.yml
File metadata and controls
170 lines (142 loc) · 5.7 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
158
159
160
161
162
163
164
165
166
167
168
169
170
name: OSP CI
on:
push:
branches: [master]
pull_request:
branches: [master]
types: [opened, closed, reopened, synchronize, ready_for_review]
jobs:
# -------------------------------------------------
# 1. QUICK BUILD TESTS (Debug + Release)
# -------------------------------------------------
build_matrix:
name: Build (${{ matrix.build_type }})
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master'
strategy:
matrix:
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
make gcc g++ git libboost-all-dev \
doxygen graphviz python3-pip libeigen3-dev
pip3 install --upgrade pip
pip3 install cmake==3.21.3
- name: Configure (${{ matrix.build_type }})
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
- name: Build (${{ matrix.build_type }})
working-directory: ${{ github.workspace }}/build
run: cmake --build . -j$(nproc)
# -------------------------------------------------
# 2. FULL BUILD + TEST + SIMPLE DAG RUN + COVERAGE + DOCS (RelWithDebInfo + Eigen)
# -------------------------------------------------
test_and_run:
name: Build, Test & Coverage (RelWithDebInfo + Eigen)
runs-on: ubuntu-latest
needs: build_matrix
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
make gcc g++ git libboost-all-dev \
doxygen graphviz python3-pip libeigen3-dev lcov
pip3 install --upgrade pip
pip3 install cmake==3.21.3
- name: Configure
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTS=ON -DENABLE_COVERAGE=ON
- name: Build all targets
working-directory: ${{ github.workspace }}/build
run: cmake --build . -j$(nproc)
- name: Run tests with coverage
working-directory: ${{ github.workspace }}/build
run: |
# Run tests
ctest --output-on-failure --output-junit test_results.xml
# Capture coverage ONLY from include/
lcov --capture --directory . \
--output-file coverage.info \
--ignore-errors empty,mismatch \
--include '*/OneStopParallel/include/*'
# Remove unused warnings + ignore tests/apps
lcov --remove coverage.info '*/tests/*' '*/apps/*' \
--ignore-errors unused,empty,mismatch \
--output-file coverage.info
# Generate HTML report
genhtml coverage.info --output-directory coverage_html
- name: Upload coverage artifacts
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: build/coverage_html
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: test-results
path: build/test_results.xml
- name: Run osp example
working-directory: ${{ github.workspace }}/build
run: |
./apps/osp \
--inputDag ../data/spaa/tiny/instance_bicgstab.hdag \
--inputMachine ../data/machine_params/p3.arch \
--Serial --GreedyBsp --BspLocking --GrowLocal --Variance --Cilk \
--Etf --GreedyChildren --MultiHC --SarkarLockingHC \
--GreedyChildrenKL --GrowLocalKL --GreedyBspHC --FunnelLocking
- name: Build documentation
run: |
cmake --build build --target doc
mkdir -p public
cp -r doc/html/* public
- name: Upload docs artifact
uses: actions/upload-artifact@v4
with:
name: docs
path: public
# -------------------------------------------------
# 3. FULL BUILD + TEST (RelWithDebInfo-noEigen)
# -------------------------------------------------
test_no_eigen:
name: Build & Test (RelWithDebInfo-noEigen)
runs-on: ubuntu-latest
needs: build_matrix
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
make gcc g++ git libboost-all-dev \
doxygen graphviz python3-pip
pip3 install --upgrade pip
pip3 install cmake==3.21.3
- name: Configure
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTS=ON
- name: Build all targets
working-directory: ${{ github.workspace }}/build
run: cmake --build . -j$(nproc)
- name: Run tests
working-directory: ${{ github.workspace }}/build
run: ctest --output-on-failure --output-junit test_results_no_eigen.xml
continue-on-error: true
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: test-results-no-eigen
path: build/test_results_no_eigen.xml
- name: Run osp example
working-directory: ${{ github.workspace }}/build
run: |
./apps/osp \
--inputDag ../data/spaa/tiny/instance_bicgstab.hdag \
--inputMachine ../data/machine_params/p3.arch \
--Serial --GreedyBsp --BspLocking --GrowLocal --Variance --Cilk \
--Etf --GreedyChildren --MultiHC --SarkarLockingHC \
--GreedyChildrenKL --GrowLocalKL --GreedyBspHC --FunnelLocking