@@ -2,19 +2,55 @@ name: Ubuntu Linux (x86_64)
22
33on :
44 push :
5- branches :
5+ branches :
66 - " *"
77 tags :
88 - " *"
9-
9+
1010 pull_request :
11- branches :
11+ branches :
1212 - " *"
1313
1414jobs :
1515 build-shared :
16- name : Shared Library
17- runs-on : ubuntu-latest
16+ name : Build Linux (${{ matrix.artifact-name }})
17+ runs-on : ${{ matrix.runs-on }}
18+ strategy :
19+ fail-fast : false
20+ matrix :
21+ include :
22+ - shared-libs : ON
23+ boost : OFF
24+ runs-on : ubuntu-24.04
25+ artifact-name : shared-stlfs-ubuntu24
26+ - shared-libs : OFF
27+ boost : OFF
28+ runs-on : ubuntu-24.04
29+ artifact-name : static-stlfs-ubuntu24
30+ - shared-libs : ON
31+ boost : ON
32+ runs-on : ubuntu-24.04
33+ artifact-name : shared-boostfs-ubuntu24
34+ - shared-libs : OFF
35+ boost : ON
36+ runs-on : ubuntu-24.04
37+ artifact-name : static-boostfs-ubuntu24
38+ - shared-libs : ON
39+ boost : OFF
40+ runs-on : ubuntu-22.04
41+ artifact-name : shared-stlfs-ubuntu22
42+ - shared-libs : OFF
43+ boost : OFF
44+ runs-on : ubuntu-22.04
45+ artifact-name : static-stlfs-ubuntu22
46+ - shared-libs : ON
47+ boost : ON
48+ runs-on : ubuntu-22.04
49+ artifact-name : shared-boostfs-ubuntu22
50+ - shared-libs : OFF
51+ boost : ON
52+ runs-on : ubuntu-22.04
53+ artifact-name : static-boostfs-ubuntu22
1854
1955 steps :
2056 - uses : actions/checkout@v4
@@ -24,47 +60,31 @@ jobs:
2460 - name : Install Packages
2561 run : |
2662 sudo apt-get update
27- sudo apt-get install -y libgl1-mesa-dev mesa-common-dev libsdl2-dev libglm-dev libgtest-dev libgmock-dev ninja-build
28-
29- - name : Configure Build
30- run : cmake -G "Ninja Multi-Config" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=YES
31-
32- - name : Build Debug
33- run : cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --parallel
34-
35- - name : Run Unit Tests
36- run : ctest --test-dir "${{ github.workspace }}/cmake-build" --verbose --build-config "Debug"
37-
38- - name : Build Release
39- run : cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --parallel
40-
41- - name : Install
63+ sudo apt-get install --yes --no-install-recommends \
64+ libgl1-mesa-dev \
65+ mesa-common-dev \
66+ libsdl2-dev \
67+ libglm-dev \
68+ libgtest-dev \
69+ libgmock-dev \
70+ ninja-build
71+
72+ - name : Install boost-filesystem-dev
73+ if : " ${{ contains(matrix.boost, 'ON') }}"
4274 run : |
43- cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --target install
44- cmake --build "${{ github.workspace }}/cmake-build" --config "Release" --target install
45-
46- - name : Upload Artifact
47- uses : actions/upload-artifact@v4
48- with :
49- name : projectm-linux-shared-latest
50- path : install/*
51-
52- build-static :
53- name : Static Library
54- runs-on : ubuntu-latest
55-
56- steps :
57- - uses : actions/checkout@v4
58- with :
59- submodules : ' recursive'
60-
61- - name : Install Packages
62- run : |
63- sudo apt-get update
64- sudo apt-get install -y libgl1-mesa-dev mesa-common-dev libsdl2-dev libglm-dev libgtest-dev libgmock-dev ninja-build
75+ sudo apt-get install --yes --no-install-recommends \
76+ libboost-filesystem-dev
6577
6678 - name : Configure Build
67- run : cmake -G "Ninja Multi-Config" -S "${{ github.workspace }}" -B "${{ github.workspace }}/cmake-build" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=YES
79+ run : |
80+ cmake -G "Ninja Multi-Config" \
81+ -S "${{ github.workspace }}" \
82+ -B "${{ github.workspace }}/cmake-build" \
83+ -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" \
84+ -DCMAKE_VERBOSE_MAKEFILE=YES \
85+ -DBUILD_SHARED_LIBS="${{ matrix.shared-libs }}" \
86+ -DENABLE_BOOST_FILESYSTEM="${{ matrix.boost }}" \
87+ -DBUILD_TESTING=YES
6888
6989 - name : Build Debug
7090 run : cmake --build "${{ github.workspace }}/cmake-build" --config "Debug" --parallel
83103 - name : Upload Artifact
84104 uses : actions/upload-artifact@v4
85105 with :
86- name : projectm-linux-static-latest
87- path : install/*
106+ name : projectm-linux-${{ matrix.artifact-name }}
107+ path : install/*
0 commit comments