Skip to content

Commit 01a5e79

Browse files
committed
Update CI build to use CMake presets
1 parent b2e05d5 commit 01a5e79

File tree

1 file changed

+31
-36
lines changed

1 file changed

+31
-36
lines changed

.github/workflows/build.yml

Lines changed: 31 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -21,40 +21,31 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
# https://github.com/actions/virtual-environments#available-environments
24-
os: [ubuntu-20.04, windows-latest, macos-latest]
24+
os: [ubuntu-latest, windows-latest, macos-latest]
25+
qt: ['6.2.4']
2526
include:
26-
- os: ubuntu-20.04 # Oldest LTS for appimage support
27-
qt: '6.2.4' # Qt6 LTS
28-
qt_modules: 'qtmultimedia'
27+
- os: ubuntu-latest
28+
qt_modules: 'qtmultimedia qtcharts'
2929
dependencies: |
30-
sudo apt-get install mesa-common-dev libgl1-mesa-dev libpcap-dev libgstreamer-gl1.0-0 libgstreamer-plugins-base1.0-0 libxkbcommon-x11-0 -y
31-
installer_setup: |
32-
sudo gem install --no-document fpm
33-
make_cmd: make
30+
sudo apt-get install mesa-common-dev libgl1-mesa-dev libpcap-dev libgstreamer-gl1.0-0 libgstreamer-plugins-base1.0-0 libxkbcommon-x11-0 libfuse2 -y
3431
artifact: |
35-
install/linux/sACNView*.AppImage
36-
install/linux/*.deb
32+
out/build/sacnview*.deb
33+
out/build/sACNView*.AppImage
3734
3835
- os: windows-latest
39-
qt: '6.2.4' # Qt6 LTS
40-
qt_modules: 'qtmultimedia'
41-
installer_setup: |
42-
Invoke-WebRequest -Uri "https://nsis.sourceforge.io/mediawiki/images/e/e0/NSIS_Simple_Firewall_Plugin_Unicode_1.21.zip" -OutFile "NSIS_Simple_Firewall_Plugin_Unicode.zip"
43-
7z e NSIS_Simple_Firewall_Plugin_Unicode.zip -o"C:\Program Files (x86)\NSIS\Plugins\x86-unicode"
44-
arch: win64_msvc2019
45-
make_cmd: nmake
36+
qt_modules: 'qtmultimedia qtcharts'
37+
dependencies : |
38+
choco install -y winflexbison3
39+
arch: amd64
4640
artifact: |
47-
install/win64/sACNView*.exe
48-
release/*.pdb
41+
out/build/sACNView*.exe
42+
out/build/src/Release/sACNView*.pdb
4943
5044
- os: macos-latest
51-
qt: '6.2.4' # Qt6 LTS
52-
qt_modules: 'qtmultimedia'
53-
installer_setup: |
54-
brew install create-dmg
45+
qt_modules: 'qtmultimedia qtcharts'
5546
xcode: latest-stable
56-
make_cmd: make
57-
artifact: install/mac/sACNView*.dmg
47+
artifact:
48+
out/build/src/sACNView
5849

5950
steps:
6051
- name: Checkout
@@ -71,33 +62,37 @@ jobs:
7162
aqtversion: '==2.0.0'
7263

7364
- name: Dependencies
74-
run: ${{ matrix.dependencies }}
75-
76-
- name: Setup Installer
77-
run: ${{ matrix.installer_setup }}
65+
run: ${{ matrix.dependencies }}
7866

7967
- name: Environment Setup (MSVC)
8068
if: runner.os == 'Windows'
8169
uses: ilammy/msvc-dev-cmd@v1
70+
with:
71+
arch: ${{ matrix.arch }}
8272

8373
- name: Environment Setup (Xcode)
8474
if: runner.os == 'macOS'
8575
uses: maxim-lobanov/setup-xcode@v1
8676
with:
8777
xcode-version: ${{ matrix.xcode }}
8878

89-
- name: Run qmake
79+
- name: Configure Build (MSVC)
80+
if: runner.os == 'Windows'
9081
shell: bash
9182
run: |
92-
if [[ -n "${Qt5_DIR}" ]]; then export QTDIR=${Qt5_DIR}; fi
93-
if [[ -n "${Qt6_DIR}" ]]; then export QTDIR=${Qt6_DIR}; fi
94-
qmake sACNView.pro
83+
if [[ -n "${Qt6_DIR}" ]]; then export CMAKE_PREFIX_PATH=${Qt6_DIR}; fi
84+
cmake --preset windows-x64-release
9585
96-
- name: Run make
97-
run: ${{ matrix.make_cmd }}
86+
- name: Build (MSVC)
87+
if: runner.os == 'Windows'
88+
run: cmake --build --preset windows-release
89+
90+
- name: Pack (Windows)
91+
if: runner.os == 'Windows'
92+
run: cpack --preset windows-installer
9893

9994
- name: Upload Artifact(s)
10095
uses: actions/upload-artifact@v3
10196
with:
10297
name: ${{ runner.os }}
103-
path: ${{ matrix.artifact }}
98+
path: ${{ matrix.artifact }}

0 commit comments

Comments
 (0)