forked from wxFormBuilder/wxFormBuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
126 lines (125 loc) · 3.84 KB
/
windows.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
name: Windows
on:
push:
branches-ignore:
- '**/sources/**'
- '**/linux/**'
- '**/macos/**'
paths-ignore:
- '.github/workflows/sources.yml'
- '.github/workflows/linux.yml'
- '.github/workflows/macos.yml'
- 'data/artwork/**'
- 'data/packaging/linux/**'
- 'data/packaging/macos/**'
- 'data/platform/linux/**'
- 'data/platform/macos/**'
- 'docs/**'
- '.clang-format'
- '.git-blame-ignore-revs'
- '.git-properties'
- 'LICENSE'
- '**.md'
pull_request:
paths-ignore:
- '.github/workflows/sources.yml'
- '.github/workflows/linux.yml'
- '.github/workflows/macos.yml'
- 'data/artwork/**'
- 'data/packaging/linux/**'
- 'data/packaging/macos/**'
- 'data/platform/linux/**'
- 'data/platform/macos/**'
- 'docs/**'
- '.clang-format'
- '.git-blame-ignore-revs'
- '.git-properties'
- 'LICENSE'
- '**.md'
jobs:
installer:
name: Installer
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- { sys: mingw32, arch: i686, pkg: i686 }
- { sys: ucrt64, arch: x86_64, pkg: ucrt-x86_64 }
if: ${{ !(github.event_name == 'pull_request' && github.actor == 'dependabot[bot]') }}
steps:
- uses: actions/checkout@v4.2.1
with:
fetch-tags: true
submodules: recursive
- uses: msys2/setup-msys2@v2.24.1
with:
msystem: ${{ matrix.sys }}
release: false
update: false
install: >-
mingw-w64-${{ matrix.pkg }}-toolchain
mingw-w64-${{ matrix.pkg }}-cmake
mingw-w64-${{ matrix.pkg }}-make
mingw-w64-${{ matrix.pkg }}-wxWidgets3.2
mingw-w64-${{ matrix.pkg }}-boost
base-devel
git
- name: Configure msys2 environment
shell: msys2 {0}
run: |
git config --global core.autocrlf true
echo "project_version=`sed -n -E -e "/^project\(wxFormBuilder[[:space:]]+VERSION[[:space:]]+(.*)[[:space:]]+LANGUAGES.*$/{s//-\1/p;q}" CMakeLists.txt `" >> $GITHUB_ENV
- name: Create build system
shell: msys2 {0}
run: |
cmake -S . -B _build -G "MSYS Makefiles" --install-prefix "$PWD/_install" -DCMAKE_BUILD_TYPE=Release
- name: Package build system
if: ${{ contains(github.ref, '/build/') }}
shell: cmd
run: |
7z a -tzip -bb1 wxFormBuilder-Windows-${{ matrix.pkg }}-build.zip _build
- name: Build
shell: msys2 {0}
run: |
cmake --build _build --config Release -j `nproc`
- name: Test stage
shell: msys2 {0}
run: |
_build\\stage\\wxFormBuilder.exe -v
_build\\stage\\wxFormBuilder.exe -g test\\wxfbTest.fbp
- name: Install
shell: msys2 {0}
run: |
cmake --install _build --config Release --strip
- name: Test install
shell: cmd
run: |
_install\\wxFormBuilder.exe -v
_install\\wxFormBuilder.exe -g test\\wxfbTest.fbp
- name: Create archive
shell: cmd
run: |
cd _install
7z a -tzip -bb1 "..\\wxFormBuilder${{ env.project_version }}-${{ matrix.pkg }}.zip" .
- name: Create installer
shell: cmd
run: |
ISCC.exe /DArch=${{ matrix.arch }} /O. data\\packaging\\windows\\wxFormBuilder.iss
- uses: actions/upload-artifact@v4.4.3
if: ${{ contains(github.ref, '/build/') }}
with:
name: Windows Build Debugging ${{ matrix.pkg }}
path: |
wxFormBuilder-*-build.zip
- uses: actions/upload-artifact@v4.4.3
with:
name: Windows Archive ${{ matrix.pkg }}
path: |
wxFormBuilder-*.zip
!wxFormBuilder-*-build.zip
- uses: actions/upload-artifact@v4.4.3
with:
name: Windows Installer ${{ matrix.pkg }}
path: |
wxFormBuilder-*.exe