-
-
Notifications
You must be signed in to change notification settings - Fork 106
135 lines (108 loc) · 3.1 KB
/
Copy pathbuild.yml
File metadata and controls
135 lines (108 loc) · 3.1 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
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
# Build MapMap with Qt 6
name: Build
on:
push:
branches: [ dev, master ]
pull_request:
branches: [ dev, master ]
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install Qt 6
uses: jurplel/install-qt-action@v4
with:
cache: true
version: '6.8.0'
host: 'windows'
target: 'desktop'
arch: 'win64_mingw'
modules: 'qtmultimedia'
tools: 'tools_mingw1310'
- name: Configure with qmake
run: qmake mapmap.pro CONFIG+=release
- name: Build
run: mingw32-make -j4
- name: Build and run tests
run: |
cd tests/
qmake6 tests.pro
mingw32-make -j4
mingw32-make check
env:
QT_QPA_PLATFORM: offscreen
- name: Deploy Qt
run: windeployqt --release --no-system-d3d-compiler "MapMap\MapMap.exe"
- uses: actions/upload-artifact@v7
with:
name: MapMap-windows
path: MapMap/
build-ubuntu:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
libqt6opengl6-dev \
libqt6openglwidgets6 \
pkg-config \
qmake6 \
qt6-base-dev \
qt6-multimedia-dev \
qt6-tools-dev
- name: Configure with qmake
run: qmake6 mapmap.pro
- name: Build
run: make -j$(nproc)
- name: Build and run tests
run: |
cd tests/
qmake6 tests.pro
make -j$(nproc)
QT_QPA_PLATFORM=offscreen make check
- uses: actions/upload-artifact@v7
with:
name: MapMap-ubuntu
path: mapmap
build-macos:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
# Only the downloaded bottles are cached. Caching /opt/homebrew/Cellar is a
# trap: the files come back, but Homebrew's symlinks (/opt/homebrew/opt/qt
# and the bin/ entries) do not, so `brew --prefix qt`/bin points to a
# directory that does not exist and qmake is not found.
- name: Cache Homebrew downloads
uses: actions/cache@v5
with:
path: ~/Library/Caches/Homebrew/downloads
key: brew-${{ runner.os }}-qt-v2
# Always run: `brew install` is a no-op when Qt is already installed, and it
# is what creates the symlinks the following steps rely on.
- name: Install dependencies
run: |
brew install qt
echo "$(brew --prefix qt)/bin" >> "$GITHUB_PATH"
- name: Check Qt installation
run: qmake --version
- name: Configure with qmake
run: qmake mapmap.pro CONFIG+=release
- name: Build
run: make -j$(sysctl -n hw.logicalcpu)
- name: Build and run tests
run: |
cd tests/
qmake6 tests.pro
make -j$(sysctl -n hw.logicalcpu)
QT_QPA_PLATFORM=offscreen make check
- uses: actions/upload-artifact@v7
with:
name: MapMap-macos
path: MapMap.app/