-
-
Notifications
You must be signed in to change notification settings - Fork 148
165 lines (149 loc) · 6.83 KB
/
main.yml
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
name: Build
concurrency:
group: build-${{ github.head_ref }}
cancel-in-progress: true
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
# Build job for Ubuntu
build-ubuntu:
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu 22-04 GCC QT5
image: ubuntu-22.04
cc: gcc
cxx: g++
build-type: Debug
experimental: false
qt-packages: "qttools5-dev qttools5-dev-tools"
- name: Ubuntu 22-04 GCC QT6
image: ubuntu-22.04
cc: gcc
cxx: g++
build-type: Debug
experimental: false
qt-packages: "qt6-base-dev qt6-tools-dev qt6-tools-dev-tools libqt6core5compat6-dev qt6-l10n-tools linguist-qt6"
- name: Ubuntu 22-04 Clang QT5
image: ubuntu-22.04
cc: clang
cxx: clang++
build-type: Debug
experimental: true
qt-packages: "qttools5-dev qttools5-dev-tools"
- name: Ubuntu 20-04 GCC (for AppImage comp)
image: ubuntu-20.04
cc: gcc
cxx: g++
build-type: Debug
experimental: false
qt-packages: "qttools5-dev qttools5-dev-tools"
name: ${{ matrix.name }} ${{ matrix.build-type }}
runs-on: ${{ matrix.image }}
continue-on-error: ${{ matrix.experimental }}
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install extra-cmake-modules libsdl2-dev libxi-dev libxtst-dev libx11-dev itstool gettext ninja-build ${{ matrix.qt-packages }}
- name: Configure CMake
run: cmake -GNinja -DCHECK_FOR_UPDATES=ON -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -B ${{ github.workspace }}/build
env:
CXX: ${{ matrix.cxx }}
CC: ${{ matrix.cc }}
- name: Build AntiMicroX
run: cmake --build ${{ github.workspace }}/build
# Build job for Windows
build-windows:
strategy:
fail-fast: false
matrix:
include:
- name: WinServer2019 MinGW QT5
image: windows-2019
qt-version: "5.15.2"
shell: msys2 {0}
build-type: Debug
qt-arch: "win64_mingw81"
experimental: false
- name: WinServer2019 MinGW QT6
image: windows-2019
qt-version: "6.7"
shell: msys2 {0}
build-type: Debug
qt-arch: "win64_mingw"
experimental: false
- name: WinServer2019 MSVC QT5
image: windows-2019
qt-version: "5.15.2"
shell: cmd
cmake-args: -G "Visual Studio 16 2019" "-DSDL2_PATH=%WORKSPACE_DIR%/sdl2/" "-DSDL2_LIBRARY=%WORKSPACE_DIR%/sdl2/lib/x64/SDL2.lib" "-DSDL2_INCLUDE_DIR=%WORKSPACE_DIR%/sdl2/" "-DSDL2_DLL_LOCATION_DIR=%WORKSPACE_DIR%/sdl2/lib/x64/SDL2.dll"
build-type: Debug
qt-arch: "win64_msvc2019_64"
experimental: false
- name: WinServer2019 MSVC QT6
image: windows-2019
qt-version: "6.7"
shell: cmd
cmake-args: -G "Visual Studio 16 2019" "-DSDL2_PATH=%WORKSPACE_DIR%/sdl2/" "-DSDL2_LIBRARY=%WORKSPACE_DIR%/sdl2/lib/x64/SDL2.lib" "-DSDL2_INCLUDE_DIR=%WORKSPACE_DIR%/sdl2/" "-DSDL2_DLL_LOCATION_DIR=%WORKSPACE_DIR%/sdl2/lib/x64/SDL2.dll"
build-type: Debug
qt-arch: "win64_msvc2019_64"
experimental: false
name: ${{ matrix.name }} ${{ matrix.build-type }}
runs-on: ${{ matrix.image }}
continue-on-error: ${{ matrix.experimental }}
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- uses: actions/checkout@v4
- name: Install Dependencies (msys2)
if: startsWith(matrix.shell, 'msys2')
uses: msys2/setup-msys2@v2
with:
install: >-
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-ninja
msystem: mingw64
release: false
#mingw-w64-x86_64-SDL2 not installed above because of: https://github.com/AntiMicroX/antimicrox/issues/465
- name: Install sdl2 (mingw-w64)
if: startsWith(matrix.shell, 'msys2')
run: |
curl -L -o mingw-w64-x86_64-SDL2-2.30.6-1-any.pkg.tar.zst https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-SDL2-2.30.6-1-any.pkg.tar.zst
pacman --noconfirm -U mingw-w64-x86_64-SDL2-2.30.6-1-any.pkg.tar.zst
- name: Install sdl2 (msvc)
if: startsWith(matrix.shell, 'cmd')
run: |
curl -L -o SDL2-devel-2.30.6-VC.zip https://github.com/libsdl-org/SDL/releases/download/release-2.30.6/SDL2-devel-2.30.6-VC.zip
unzip SDL2-devel-2.30.6-VC.zip
mv "${{ github.workspace }}/SDL2-2.30.6" "${{ github.workspace }}/sdl2"
mklink /J "${{ github.workspace }}\sdl2\SDL2" "${{ github.workspace }}\sdl2\include"
- name: Install MSVC
if: startsWith(matrix.shell, 'cmd')
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64
toolset: 14.1
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt-version }}
host: "windows"
target: "desktop"
arch: ${{ matrix.qt-arch }}
dir: "${{ github.workspace }}/qt/"
install-deps: "true"
- name: Configure CMake
run: cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -B "${{ github.workspace }}/build" ${{ matrix.cmake-args }}
env:
CMAKE_PREFIX_PATH: "${{ env.QT_ROOT_DIR }}/lib/cmake"
WORKSPACE_DIR: ${{ github.workspace }}
- name: Build
run: cmake --build "${{ github.workspace }}/build" --parallel 8