-
Notifications
You must be signed in to change notification settings - Fork 13
85 lines (81 loc) · 2.64 KB
/
windows-mingw.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
#
# Licensed under the GNU General Public License v. 3 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.gnu.org/licenses/gpl-3.0.html
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Copyright (C) 2023-2023 xqyjlj<xqyjlj@126.com>
#
# @author xqyjlj
# @file windows-mingw.yml
#
# Change Logs:
# Date Author Notes
# ------------ ---------- -----------------------------------------------
# 2023-06-29 xqyjlj initial version
#
name: windows mingw
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: 🔧 build
runs-on: windows-latest
strategy:
matrix:
include:
- qt_arch: win32_mingw81
qt_ver: 5.15.2
qt_tools: "tools_ninja tools_mingw,qt.tools.win32_mingw810"
qt_tools_mingw_install: mingw810_32
- qt_arch: win64_mingw81
qt_ver: 5.15.2
qt_tools: "tools_ninja tools_mingw,qt.tools.win64_mingw810"
qt_tools_mingw_install: mingw810_64
env:
QT_ASSUME_STDERR_HAS_CONSOLE: 1
steps:
- name: ⬇️ install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
arch: ${{ matrix.qt_arch }}
tools: ${{ matrix.qt_tools }}
cache: "true"
- name: ⬇️ checkout csp
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 1
- name: ⬇️ install xmake
uses: xmake-io/github-action-setup-xmake@v1
- name: 👷 build
shell: pwsh
run: |
$env:Path = "${{ env.IQTA_TOOLS }}/${{ matrix.qt_tools_mingw_install }}/bin/;" + $env:Path
$env:Path = "${{ env.IQTA_TOOLS }}/Ninja/;" + $env:Path
$env:Path = "${{ env.Qt5_Dir }}/bin/;" + $env:Path
mkdir build
pushd build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=ninja `
-DCMAKE_CXX_COMPILER=g++ `
-DCMAKE_C_COMPILER=gcc
ninja -v -j $(Get-WmiObject -Class Win32_Processor).NumberOfLogicalProcessors
popd
- name: 🩺 test
shell: pwsh
run: |
pushd build
ctest --output-on-failure
popd