1010 BUILD_TYPE : Release
1111
1212jobs :
13- build_and_test :
13+ # -------------------------------------------------
14+ # 1. MULTI-CONFIGURATION BUILD TESTS
15+ # -------------------------------------------------
16+ build_matrix :
17+ name : Build (${{ matrix.build_type }})
1418 runs-on : ubuntu-latest
19+ strategy :
20+ matrix :
21+ build_type : [Debug, RelWithDebInfo, Release]
1522
1623 steps :
1724 - uses : actions/checkout@v3
@@ -25,29 +32,52 @@ jobs:
2532 pip3 install --upgrade pip
2633 pip3 install cmake==3.21.3
2734
28- - name : Configure
29- run : cmake -S . -B build
35+ - name : Configure (${{ matrix.build_type }})
36+ run : cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
3037
31- - name : Build (core)
38+ - name : Build (${{ matrix.build_type }})
39+ working-directory : ${{ github.workspace }}/build
40+ run : cmake --build . -j$(nproc)
41+
42+ # -------------------------------------------------
43+ # 2. FULL BUILD + TEST + SIMPLE DAG RUN
44+ # -------------------------------------------------
45+ test_and_run :
46+ name : Build & Test (RelWithDebInfo)
47+ runs-on : ubuntu-latest
48+ needs : build_matrix
49+
50+ steps :
51+ - uses : actions/checkout@v3
52+
53+ - name : Install dependencies
54+ run : |
55+ sudo apt-get update
56+ sudo apt-get install -y --no-install-recommends \
57+ make gcc g++ git libboost-all-dev \
58+ doxygen graphviz python3-pip libeigen3-dev
59+ pip3 install --upgrade pip
60+ pip3 install cmake==3.21.3
61+
62+ - name : Configure (RelWithDebInfo + tests)
63+ run : cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTS=ON
64+
65+ - name : Build all targets
3266 working-directory : ${{ github.workspace }}/build
3367 run : cmake --build . -j$(nproc)
3468
3569 - name : Run tests
3670 working-directory : ${{ github.workspace }}/build
3771 run : ctest --output-on-failure --output-junit test_results.xml
3872 continue-on-error : true
39-
73+
4074 - name : Upload test results
4175 uses : actions/upload-artifact@v4
4276 with :
4377 name : test-results
4478 path : build/test_results.xml
4579
46- - name : Build all executables
47- working-directory : ${{ github.workspace }}/build
48- run : cmake --build . -j$(nproc)
49-
50- - name : Run simple DAG test
80+ - name : Run osp example (simple DAG)
5181 working-directory : ${{ github.workspace }}/build
5282 run : |
5383 ./apps/osp \
5787 --Etf --GreedyChildren --MultiHC --SarkarLockingHC \
5888 --GreedyChildrenKL --GrowLocalKL --GreedyBspHC --FunnelLocking
5989
90+ # -------------------------------------------------
91+ # 3. BUILD DOCUMENTATION (only on master)
92+ # -------------------------------------------------
6093 docs :
94+ name : Build Docs
6195 runs-on : ubuntu-latest
62- needs : build
96+ needs : test_and_run
6397 if : github.ref == 'refs/heads/master'
6498
6599 steps :
73107
74108 - name : Build docs
75109 run : |
76- cmake -S . -B build
110+ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
77111 cmake --build build --target doc
78112 mkdir -p public
79113 cp -r doc/html/* public
0 commit comments