-
Notifications
You must be signed in to change notification settings - Fork 20
103 lines (83 loc) · 2.38 KB
/
build.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
# Copyright 2015 - 2024, GIBIS-Unifesp and the WiRedPanda contributors
# SPDX-License-Identifier: GPL-3.0-or-later
name: Build
on: [push]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
qt_version: [5.12.12, 5.13.2, 5.14.2, 5.15.2, 6.2.4, 6.3.2, 6.4.3, 6.5.3, 6.6.3, 6.7.2]
# =================================
runs-on: ${{ matrix.os }}
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install Qt5
if: startsWith(matrix.qt_version, '5')
uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt_version }}
cache: true
aqtversion: ==3.1.*
- name: Install Qt6
if: startsWith(matrix.qt_version, '6')
uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt_version }}
modules: qtmultimedia
cache: true
aqtversion: ==3.1.*
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ matrix.os }}
# =================================
- name: Build Ubuntu
if: runner.os == 'Linux'
run: |
sudo apt install libgstreamer-gl1.0-0
mkdir build
cd build
qmake ../WPanda.pro
make -j2
- name: Test Ubuntu
if: runner.os == 'Linux'
run: |
cd build/test
./WPanda-test -platform offscreen
# =================================
- name: Setup MSVC Toolchain
if: runner.os == 'Windows'
uses: pbeast/gha-setup-vsdevenv@master
- name: Build Windows
if: runner.os == 'Windows'
run: |
choco install jom
mkdir build
cd build
qmake ../WPanda.pro
jom
- name: Test Windows
if: runner.os == 'Windows'
run: |
cd build
jom check
# =================================
# https://bugreports.qt.io/browse/QTBUG-117225
- name: Build macOS
if: runner.os == 'macOS'
run: |
mkdir build
cd build
qmake ../WPanda.pro -early QMAKE_DEFAULT_LIBDIRS=$(xcrun -show-sdk-path)/usr/lib
make -j3
- name: Test macOS
if: runner.os == 'macOS'
run: |
cd build
make check