forked from wxWidgets/wxWidgets
-
Notifications
You must be signed in to change notification settings - Fork 1
170 lines (151 loc) · 4.83 KB
/
ci_msw.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
166
167
168
169
170
# CI workflow building wxMSW under Windows.
name: MSW builds
on:
push:
branches:
- master
paths-ignore:
- '.circleci/**'
- '.github/ISSUE_TEMPLATE/**'
- '.github/workflows/ci.yml'
- '.github/workflows/ci_cmake.yml'
- '.github/workflows/ci_mac.yml'
- '.github/workflows/ci_msw_cross.yml'
- '.github/workflows/docs_update.yml'
- 'build/tools/appveyor*.bat'
- 'distrib/**'
- 'docs/**'
- 'interface/**'
- 'include/wx/gtk/**'
- 'include/wx/osx/**'
- 'locale/**'
- 'src/gtk/**'
- 'src/osx/**'
- '*.md'
- '*.yml'
pull_request:
branches:
- master
paths-ignore:
- '.circleci/**'
- '.github/ISSUE_TEMPLATE/**'
- '.github/workflows/ci.yml'
- '.github/workflows/ci_cmake.yml'
- '.github/workflows/ci_mac.yml'
- '.github/workflows/ci_msw_cross.yml'
- '.github/workflows/docs_update.yml'
- 'build/tools/appveyor*.bat'
- 'distrib/**'
- 'docs/**'
- 'interface/**'
- 'include/wx/gtk/**'
- 'include/wx/osx/**'
- 'locale/**'
- 'src/gtk/**'
- 'src/osx/**'
- '*.md'
- '*.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
msw-msvs:
runs-on: windows-${{ matrix.vsversion }}
name: wxMSW vs${{ matrix.vsversion }} ${{ matrix.configuration }} ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
include:
- configuration: 'DLL Debug'
platform: 'x64'
vsversion: 2022
use_utf8: true
- configuration: 'Debug'
platform: 'Win32'
vsversion: 2019
- configuration: 'DLL Release'
platform: 'x64'
vsversion: 2019
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Configure build options
working-directory: include/wx/msw
run: |
$use_utf8 = "${{ matrix.use_utf8 }}" ? 1 : 0
if ( $use_utf8 ) {
$txt = Get-Content setup.h
Write-Output $txt |
%{$_ -replace "define wxUSE_UNICODE_UTF8 0", "define wxUSE_UNICODE_UTF8 $use_utf8"} |
Set-Content setup.h
}
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
with:
vs-prerelease: true
- name: Build
run: |
msbuild /noLogo /m '/p:Configuration=${{ matrix.configuration }}' /p:Platform=${{ matrix.platform }} build\msw\wx_vc16.sln
if ( '${{ matrix.configuration }}'.IndexOf('DLL') -ne -1 ) {
$dlldir = Join-Path (Get-Location) 'lib\vc_${{ matrix.platform }}_dll'
Write-Output "Adding $dlldir to the PATH"
$dlldir | Out-File -Append $env:GITHUB_PATH
}
- name: Build minimal sample
run: |
msbuild /noLogo /m '/p:Configuration=${{ matrix.configuration }}' /p:Platform=${{ matrix.platform }} samples\minimal\minimal_vc16.sln
- name: Build tests
run: |
msbuild /noLogo /m '/p:Configuration=${{ matrix.configuration }}' /p:Platform=${{ matrix.platform }} tests\test_vc16.sln
- name: Run tests
working-directory: tests
run: |
.\vc*msw*\test.exe
- name: Build GUI tests
run: |
msbuild /noLogo /m '/p:Configuration=${{ matrix.configuration }}' /p:Platform=${{ matrix.platform }} tests\test_gui_vc16.sln
- name: Run GUI tests
working-directory: tests
run: |
.\vc*msw*\test_gui.exe
msw-msys2-clang:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: true
install: mingw-w64-x86_64-cmake mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang
- name: Configuring
run: |
clang --version
cmake --version
mkdir build_cmake
pushd build_cmake
cmake -G "MinGW Makefiles" \
-DCMAKE_C_COMPILER=clang.exe \
-DCMAKE_CXX_COMPILER=clang++.exe \
-DCMAKE_CXX_FLAGS=-Werror \
-DCMAKE_BUILD_TYPE=Release \
-DwxBUILD_SAMPLES=ALL \
-DwxBUILD_TESTS=ALL \
-DwxBUILD_DEMOS=ON \
-DwxUSE_WEBVIEW_EDGE=ON \
..
- name: Building
working-directory: build_cmake
run: |
wxPROC_COUNT=`../build/tools/proc_count.sh`
cmake --build . -- -j$wxPROC_COUNT