Repository navigation
108 lines (94 loc) · 3.79 KB
/
Copy pathci.yml
File metadata and controls
108 lines (94 loc) · 3.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: CI
# Builds and runs the tests on a push to main and on manual dispatch. workflow_dispatch repeats a
# run without a push. On macOS a test checks the .icns with iconutil.
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
# One configuration for each platform, the build types alternating, with the official binaries
# of Qt. aqtinstall 3.3.0, the latest release, finds no Qt 6.11 for Windows. Its support arrived
# in miurahr/aqtinstall#1000, merged after that release, so a commit of master is installed until
# the next release.
build:
name: ${{ matrix.platform }} ${{ matrix.config }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { platform: linux-gcc, os: ubuntu-latest, cc: gcc, cxx: g++, config: Release, qt-arch: linux_gcc_64 }
- { platform: linux-clang, os: ubuntu-latest, cc: clang, cxx: clang++, config: Debug, qt-arch: linux_gcc_64 }
- { platform: macos, os: macos-latest, cc: clang, cxx: clang++, config: Release, qt-arch: clang_64 }
- { platform: windows-msvc, os: windows-latest, cc: cl, cxx: cl, config: Debug, qt-arch: win64_msvc2022_64 }
- { platform: windows-clang-cl, os: windows-latest, cc: clang-cl, cxx: clang-cl, config: Release, qt-arch: win64_msvc2022_64 }
steps:
- uses: actions/checkout@v4
- name: Ninja
shell: bash
run: |
case "$RUNNER_OS" in
Linux) sudo apt-get update && sudo apt-get install -y ninja-build ;;
macOS) brew install ninja ;;
Windows) choco install ninja -y --no-progress ;;
esac
# The libraries of the system that Qt Gui requires to configure and to run with the
# offscreen platform
- name: System libraries
if: runner.os == 'Linux'
run: |
sudo apt-get install -y --no-install-recommends libgl-dev libegl-dev libxkbcommon-dev \
libxkbcommon-x11-0 libfontconfig1
- uses: ilammy/msvc-dev-cmd@v1
if: runner.os == 'Windows'
with:
arch: x64
- uses: jurplel/install-qt-action@v4
with:
version: '6.11.1'
arch: ${{ matrix.qt-arch }}
aqtsource: 'git+https://github.com/miurahr/aqtinstall.git@076e1659807d0b362a3ed684d54c2e9c775eb9c7'
cache: true
- name: Configure
shell: bash
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
run: |
cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.config }} \
"-DCMAKE_PREFIX_PATH=$QT_ROOT_DIR" -DQICONMAKER_BUILD_TESTS=ON
- name: Build
run: cmake --build build
# --no-tests=error, because ctest succeeds if it finds no test.
- name: Test
run: ctest --test-dir build --output-on-failure --no-tests=error
# MinGW with the LLVM toolchain of the CLANG64 environment of MSYS2: clang, lld, libc++ and the
# UCRT, as llvm-mingw, with the Qt of MSYS2.
mingw:
name: windows-mingw-clang ${{ matrix.config }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
config: [ Debug ]
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: CLANG64
update: false
install: >-
mingw-w64-clang-x86_64-clang
mingw-w64-clang-x86_64-cmake
mingw-w64-clang-x86_64-ninja
mingw-w64-clang-x86_64-qt6-base
mingw-w64-clang-x86_64-qt6-svg
- name: Build
shell: msys2 {0}
run: |
cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.config }} \
-DQICONMAKER_BUILD_TESTS=ON
cmake --build build
- name: Test
shell: msys2 {0}
run: ctest --test-dir build --output-on-failure --no-tests=error