Merge branch 'fix-gh-406--mt-switch': fixes wrong and different behav… #299
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################################################################## | |
# 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% | |
set ERRFILE= | |
set STOP_ON_ERROR=1 | |
echo "********" | |
echo "Working Dir: %WDIR%" | |
echo "Platform: %PLATFORM%" | |
echo "SUBSYS: %SUBSYS%" | |
@echo off | |
call CPP\build-it.cmd -no-init | |
IF %errorlevel% NEQ 0 EXIT 1 | |
REM Will be by the do-release action | |
copy %WDIR%\.github\workflows\do-release.cmd %WDIR%\build\do-release.cmd | |
- name: Test | |
shell: cmd | |
run: | | |
set PLATFORM=${{matrix.platform}} | |
set 7Z_PATH=build\bin-%PLATFORM%\7z.exe | |
tclsh tests\7z-test.tcl -verbose tpsem | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{ github.workspace }}\build\**\* | |
name: binary-${{ matrix.arch }} | |
do-release: | |
runs-on: windows-2019 | |
needs: build | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
path: artifact | |
pattern: binary-* | |
merge-multiple: true | |
- name: Generate binaries for release | |
shell: cmd | |
run: | | |
cd artifact | |
do-release.cmd | |
- uses: geekyeggo/delete-artifact@v5 | |
with: | |
name: binary-* | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: 7-Zip ZS Release binaries | |
path: | | |
artifact\*.exe | |
artifact\*.7z |