Update CI build to use CMake presets #218
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Github Actions configuration file | |
# Runs the build on Linux, Windows and MacOS | |
name: Build | |
on: | |
push: | |
pull_request: | |
page_build: | |
release: | |
types: | |
- created | |
- edited | |
- prereleased | |
- released | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# https://github.com/actions/virtual-environments#available-environments | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
qt: ['6.2.4'] | |
include: | |
- os: ubuntu-latest | |
qt_modules: 'qtmultimedia qtcharts' | |
dependencies: | | |
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 | |
artifact: | | |
out/build/sacnview*.deb | |
out/build/sACNView*.AppImage | |
- os: windows-latest | |
qt_modules: 'qtmultimedia qtcharts' | |
dependencies : | | |
choco install -y winflexbison3 | |
arch: amd64 | |
artifact: | | |
out/build/sACNView*.exe | |
out/build/src/Release/sACNView*.pdb | |
- os: macos-latest | |
qt_modules: 'qtmultimedia qtcharts' | |
xcode: latest-stable | |
artifact: | |
out/build/src/sACNView | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Install Qt | |
uses: jurplel/[email protected] | |
with: | |
version: ${{ matrix.qt }} | |
modules: ${{ matrix.qt_modules }} | |
aqtversion: '==2.0.0' | |
- name: Dependencies | |
run: ${{ matrix.dependencies }} | |
- name: Environment Setup (MSVC) | |
if: runner.os == 'Windows' | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: ${{ matrix.arch }} | |
- name: Environment Setup (Xcode) | |
if: runner.os == 'macOS' | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: ${{ matrix.xcode }} | |
- name: Configure Build (MSVC) | |
if: runner.os == 'Windows' | |
shell: bash | |
run: | | |
if [[ -n "${Qt6_DIR}" ]]; then export CMAKE_PREFIX_PATH=${Qt6_DIR}; fi | |
cmake --preset windows-x64-release | |
- name: Build (MSVC) | |
if: runner.os == 'Windows' | |
run: cmake --build --preset windows-release | |
- name: Pack (Windows) | |
if: runner.os == 'Windows' | |
run: cpack --preset windows-installer | |
- name: Upload Artifact(s) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ runner.os }} | |
path: ${{ matrix.artifact }} |