forked from arch1t3cht/Aegisub
-
Notifications
You must be signed in to change notification settings - Fork 1
158 lines (140 loc) · 5 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
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
name: Windows Build & Package
on:
push:
branches:
- master
- feature
- cibuilds
paths:
- '**'
- '!.github/workflows/**'
- '.github/workflows/windows.yml'
- '!docs/**'
- '!packages/**'
- 'packages/meson.build'
- 'packages/desktop/**'
- '!packages/desktop/aegisub.appdata**'
- '!packages/desktop/aegisub.desktop**'
- 'packages/win_installer/**'
- '!src/osx/**'
- '!tools/osx-**'
pull_request:
branches:
- master
- feature
paths:
- '**'
- '!.github/workflows/**'
- '.github/workflows/windows.yml'
- '!docs/**'
- '!packages/**'
- 'packages/meson.build'
- 'packages/desktop/**'
- '!packages/desktop/aegisub.appdata**'
- '!packages/desktop/aegisub.desktop**'
- 'packages/win_installer/**'
- '!src/osx/**'
- '!tools/osx-**'
workflow_dispatch:
jobs:
build:
name: ${{ matrix.name }} (${{ matrix.arch }}${{ matrix.extra-args && ', wx master' }})
runs-on: windows-2025
strategy:
fail-fast: false
matrix:
arch: ['x86', 'x64', 'arm64']
compiler-flag: ['-Dvsenv=true']
extra-args: ['', "-Dwx_version='3.3.0'"]
include:
- buildtype: release
- args: >-
-Ddefault_library=static
--force-fallback-for=zlib,harfbuzz,freetype2,fribidi,libpng
-Dfreetype2:harfbuzz=disabled
-Dharfbuzz:freetype=disabled
-Dharfbuzz:cairo=disabled
-Dharfbuzz:glib=disabled
-Dharfbuzz:gobject=disabled
-Dharfbuzz:tests=disabled
-Dharfbuzz:docs=disabled
-Dharfbuzz:icu=disabled
-Dfribidi:tests=false
-Dfribidi:docs=false
-Dlibass:fontconfig=disabled
-Dffmpeg:libdav1d=enabled
-Davisynth=enabled
-Dbestsource=enabled
-Dvapoursynth=enabled
- name: Windows MSVC Release
msvc: true
#- {
# name: Windows MinGW,
# os: windows-latest,
# msvc: false
#}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Setup Meson
run: pipx install meson
- name: Setup MSVC
if: matrix.msvc == true
uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: ${{ matrix.arch }}
- name: Install dependencies
run: |
choco install ninja innosetup nasm
$moonscripturl = "https://github.com/leafo/moonscript/releases/download/win32-v0.5.0/moonscript-187bac54ee5a7450013e9c38e005a0e671b76f45.zip"
mkdir moonscript
Invoke-WebRequest -Uri $moonscripturl -OutFile ".\moonscript\moonscript.zip"
pushd moonscript
7z e moonscript.zip
Get-Location | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
popd
$gettexturl = "https://github.com/mlocati/gettext-iconv-windows/releases/download/v0.23-v1.17/gettext0.23-iconv1.17-static-64.zip"
Invoke-WebRequest -Uri $gettexturl -OutFile ".\gettext.zip"
Expand-Archive ".\gettext.zip" -DestinationPath gettext
pushd gettext/bin
Get-Location | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
popd
- name: Configure
run: |
meson setup build ${{ matrix.args }} ${{ matrix.compiler-flag }} ${{ matrix.extra-args }} -Dbuildtype=${{ matrix.buildtype }}
meson configure build
- name: Build
run: meson compile -C build
- name: Run test
run: meson test -C build --verbose "gtest main"
# Windows artifacts
- name: Generate Windows installer
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run:
meson compile win-installer -C build
- name: Generate Windows portable installer
run: cd build && ninja win-portable
- name: Upload artifacts - win_installer
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }} (${{ matrix.arch }}${{ matrix.extra-args && ' wx master' }}) ${{ github.actor }} - installer
path: build/Aegisub-*.exe
if-no-files-found: error
- name: Upload artifacts - portable.zip
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }} (${{ matrix.arch }}${{ matrix.extra-args && ' wx master' }}) ${{ github.actor }} - portable
path: build/aegisub-portable/
- name: Upload artifacts - portable slim.zip
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }} (${{ matrix.arch }}${{ matrix.extra-args && ' wx master' }}) ${{ github.actor }} - portable slim
path: |
build/aegisub-portable/
!build/aegisub-portable/Microsoft.CRT
!build/aegisub-portable/Redist