-
-
Notifications
You must be signed in to change notification settings - Fork 301
187 lines (152 loc) · 5.47 KB
/
build-win.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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
########################################################################################
# overview for supported targets:
# 12.0 https://learn.microsoft.com/en-us/visualstudio/releases/2013/vs2013-compatibility-vs
# 14.0 https://learn.microsoft.com/en-us/visualstudio/releases/2015/vs2015-compatibility-vs
# 15.0 https://learn.microsoft.com/en-us/visualstudio/releases/2017/vs2017-compatibility-vs
# 16.0 https://learn.microsoft.com/en-us/visualstudio/releases/2019/compatibility
# 17.0 https://learn.microsoft.com/en-us/visualstudio/releases/2022/compatibility
# -> we take 16.0 for now /TR
########################################################################################
name: Build Windows binaries
on: [push, pull_request]
jobs:
build:
runs-on: windows-2019
strategy:
matrix:
arch: [ amd64, amd64_x86, amd64_arm, amd64_arm64 ]
include:
- arch: amd64_x86
subsys: "5.01"
platform: "x86"
- arch: amd64
subsys: "5.02"
platform: "x64"
- arch: amd64_arm
subsys: "6.02"
platform: "arm"
- arch: amd64_arm64
subsys: "6.02"
platform: "arm64"
steps:
- uses: actions/checkout@v3
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Compiling ${{ matrix.arch }}
shell: cmd
run: |
set WDIR=%cd%
set PLATFORM=${{matrix.platform}}
set SUBSYS=${{matrix.subsys}}
set ROOT=%cd%\CPP\7zip
set OUTDIR=%WDIR%\build\bin-%PLATFORM%
set LFLAGS=/SUBSYSTEM:WINDOWS,%SUBSYS%
echo "********"
echo "Working Dir: %WDIR%"
echo "Platform: %PLATFORM%"
echo "SUBSYS: %SUBSYS%"
@echo off
set > %WDIR%\build\env-%PLATFORM%.txt
mkdir %OUTDIR%
cd %ROOT%\Bundles\Format7zExtract
nmake %OPTS%
IF %errorlevel% NEQ 0 EXIT 1
copy %PLATFORM%\7zxa.dll %OUTDIR%\7zxa.dll
cd %ROOT%\Bundles\Format7z
nmake %OPTS%
IF %errorlevel% NEQ 0 EXIT 1
copy %PLATFORM%\7za.dll %OUTDIR%\7za.dll
cd %ROOT%\Bundles\Format7zF
nmake %OPTS%
IF %errorlevel% NEQ 0 EXIT 1
copy %PLATFORM%\7z.dll %OUTDIR%\7z.dll
cd %ROOT%\UI\FileManager
nmake %OPTS%
IF %errorlevel% NEQ 0 EXIT 1
copy %PLATFORM%\7zFM.exe %OUTDIR%\7zFM.exe
cd %ROOT%\UI\GUI
nmake %OPTS%
IF %errorlevel% NEQ 0 EXIT 1
copy %PLATFORM%\7zG.exe %OUTDIR%\7zG.exe
cd %ROOT%\UI\Explorer
nmake %OPTS%
IF %errorlevel% NEQ 0 EXIT 1
copy %PLATFORM%\7-zip.dll %OUTDIR%\7-zip.dll
cd %ROOT%\Bundles\SFXWin
nmake %OPTS%
IF %errorlevel% NEQ 0 EXIT 1
copy %PLATFORM%\7z.sfx %OUTDIR%\7z.sfx
cd %ROOT%\Bundles\Codec_brotli
nmake %OPTS%
IF %errorlevel% NEQ 0 EXIT 1
copy %PLATFORM%\brotli.dll %OUTDIR%\brotli.dll
cd %ROOT%\Bundles\Codec_lizard
nmake %OPTS%
IF %errorlevel% NEQ 0 EXIT 1
copy %PLATFORM%\lizard.dll %OUTDIR%\lizard.dll
cd %ROOT%\Bundles\Codec_lz4
nmake %OPTS%
IF %errorlevel% NEQ 0 EXIT 1
copy %PLATFORM%\lz4.dll %OUTDIR%\lz4.dll
cd %ROOT%\Bundles\Codec_lz5
nmake %OPTS%
IF %errorlevel% NEQ 0 EXIT 1
copy %PLATFORM%\lz5.dll %OUTDIR%\lz5.dll
cd %ROOT%\Bundles\Codec_zstd
nmake %OPTS%
IF %errorlevel% NEQ 0 EXIT 1
copy %PLATFORM%\zstd.dll %OUTDIR%\zstd.dll
cd %ROOT%\Bundles\Codec_flzma2
nmake %OPTS%
IF %errorlevel% NEQ 0 EXIT 1
copy %PLATFORM%\flzma2.dll %OUTDIR%\flzma2.dll
cd %ROOT%\..\..\C\Util\7zipInstall
nmake %OPTS%
IF %errorlevel% NEQ 0 EXIT 1
copy %PLATFORM%\7zipInstall.exe %OUTDIR%\Install.exe
cd %ROOT%\..\..\C\Util\7zipUninstall
nmake %OPTS%
IF %errorlevel% NEQ 0 EXIT 1
copy %PLATFORM%\7zipUninstall.exe %OUTDIR%\Uninstall.exe
set LFLAGS=/SUBSYSTEM:CONSOLE,%SUBSYS%
cd %ROOT%\UI\Console
nmake %OPTS%
IF %errorlevel% NEQ 0 EXIT 1
copy %PLATFORM%\7z.exe %OUTDIR%\7z.exe
cd %ROOT%\Bundles\SFXCon
nmake %OPTS%
IF %errorlevel% NEQ 0 EXIT 1
copy %PLATFORM%\7zCon.sfx %OUTDIR%\7zCon.sfx
cd %ROOT%\Bundles\Alone
nmake %OPTS%
IF %errorlevel% NEQ 0 EXIT 1
copy %PLATFORM%\7za.exe %OUTDIR%\7za.exe
REM Will be by the do-release action
copy %WDIR%\.github\workflows\do-release.cmd %WDIR%\build\do-release.cmd
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3
with:
path: ${{ github.workspace }}\build\**\*
do-release:
runs-on: windows-2019
needs: build
steps:
- uses: actions/download-artifact@v3
- name: Generate binaries for release
shell: cmd
run: |
cd artifact
do-release.cmd
- uses: geekyeggo/delete-artifact@v2
with:
name: artifact
- uses: actions/upload-artifact@v3
with:
name: 7-Zip ZS Release binaries
path: |
artifact\*.exe
artifact\*.7z