@@ -2,24 +2,27 @@ name: OSP CI
22
33on :
44 push :
5- branches : ["*"]
5+ branches : [master]
6+ pull_request :
7+ branches : [master]
8+ types : [opened, reopened, synchronize, ready_for_review]
69
710jobs :
811 # -------------------------------------------------
9- # 1. MULTI-CONFIGURATION BUILD TESTS
12+ # 1. QUICK BUILD TESTS (Debug + Release)
1013 # -------------------------------------------------
1114 build_matrix :
1215 name : Build (${{ matrix.build_type }})
1316 runs-on : ubuntu-latest
17+ if : github.event_name == 'pull_request' || github.ref == 'refs/heads/master'
1418 strategy :
1519 matrix :
16- build_type : [Debug, RelWithDebInfo, Release, RelWithDebInfo-noEigen ]
20+ build_type : [Debug, Release]
1721
1822 steps :
1923 - uses : actions/checkout@v3
2024
2125 - name : Install dependencies
22- if : matrix.build_type != 'RelWithDebInfo-noEigen'
2326 run : |
2427 sudo apt-get update
2528 sudo apt-get install -y --no-install-recommends \
@@ -28,35 +31,21 @@ jobs:
2831 pip3 install --upgrade pip
2932 pip3 install cmake==3.21.3
3033
31- - name : Install dependencies (no Eigen)
32- if : matrix.build_type == 'RelWithDebInfo-noEigen'
33- run : |
34- sudo apt-get update
35- sudo apt-get install -y --no-install-recommends \
36- make gcc g++ git libboost-all-dev \
37- doxygen graphviz python3-pip
38- pip3 install --upgrade pip
39- pip3 install cmake==3.21.3
40-
4134 - name : Configure (${{ matrix.build_type }})
42- run : |
43- if [ "${{ matrix.build_type }}" = "RelWithDebInfo-noEigen" ]; then
44- cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
45- else
46- cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
47- fi
35+ run : cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
4836
4937 - name : Build (${{ matrix.build_type }})
5038 working-directory : ${{ github.workspace }}/build
5139 run : cmake --build . -j$(nproc)
5240
5341 # -------------------------------------------------
54- # 2. FULL BUILD + TEST + SIMPLE DAG RUN (with Eigen)
42+ # 2. FULL BUILD + TEST + SIMPLE DAG RUN + DOCS (RelWithDebInfo + Eigen)
5543 # -------------------------------------------------
5644 test_and_run :
5745 name : Build & Test (RelWithDebInfo + Eigen)
5846 runs-on : ubuntu-latest
5947 needs : build_matrix
48+ if : github.event_name == 'pull_request' || github.ref == 'refs/heads/master'
6049
6150 steps :
6251 - uses : actions/checkout@v3
@@ -98,13 +87,26 @@ jobs:
9887 --Etf --GreedyChildren --MultiHC --SarkarLockingHC \
9988 --GreedyChildrenKL --GrowLocalKL --GreedyBspHC --FunnelLocking
10089
90+ - name : Build documentation
91+ run : |
92+ cmake --build build --target doc
93+ mkdir -p public
94+ cp -r doc/html/* public
95+
96+ - name : Upload docs artifact
97+ uses : actions/upload-artifact@v4
98+ with :
99+ name : docs
100+ path : public
101+
101102 # -------------------------------------------------
102- # 3. FULL BUILD + TEST (NO EIGEN )
103+ # 3. FULL BUILD + TEST (RelWithDebInfo-noEigen )
103104 # -------------------------------------------------
104105 test_no_eigen :
105- name : Build & Test (RelWithDebInfo, no Eigen )
106+ name : Build & Test (RelWithDebInfo-noEigen )
106107 runs-on : ubuntu-latest
107108 needs : build_matrix
109+ if : github.event_name == 'pull_request' || github.ref == 'refs/heads/master'
108110
109111 steps :
110112 - uses : actions/checkout@v3
@@ -145,34 +147,3 @@ jobs:
145147 --Serial --GreedyBsp --BspLocking --GrowLocal --Variance --Cilk \
146148 --Etf --GreedyChildren --MultiHC --SarkarLockingHC \
147149 --GreedyChildrenKL --GrowLocalKL --GreedyBspHC --FunnelLocking
148-
149- # -------------------------------------------------
150- # 4. BUILD DOCUMENTATION (only on master)
151- # -------------------------------------------------
152- docs :
153- name : Build Docs
154- runs-on : ubuntu-latest
155- needs : [test_and_run, test_no_eigen]
156- if : github.ref == 'refs/heads/master'
157-
158- steps :
159- - uses : actions/checkout@v3
160-
161- - name : Install dependencies
162- run : |
163- sudo apt-get update
164- sudo apt-get install -y --no-install-recommends \
165- doxygen graphviz libeigen3-dev cmake g++
166-
167- - name : Build docs
168- run : |
169- cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
170- cmake --build build --target doc
171- mkdir -p public
172- cp -r doc/html/* public
173-
174- - name : Upload docs artifact
175- uses : actions/upload-artifact@v4
176- with :
177- name : docs
178- path : public
0 commit comments