Skip to content

Update 7-Zip to Version 26.02 #184

Update 7-Zip to Version 26.02

Update 7-Zip to Version 26.02 #184

Workflow file for this run

name: Build binaries
on: [push, pull_request]
jobs:
linux:
strategy:
matrix:
arch: [ x64, arm64 ]
include:
- arch: x64
is_arm: false
runner: ubuntu-latest
- arch: arm64
is_arm: true
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v6
- name: Configure build system (uasm)
if: ${{ !matrix.is_arm }}
run: |
wget -q "https://github.com/Terraspace/UASM/releases/download/v2.57r/uasm257_linux64.zip"
unzip uasm257_linux64.zip uasm
sudo install -m 755 uasm /usr/bin
- name: Build via clang
run: |
cd ${{ github.workspace }}/CPP
CC="clang" CXX="clang++" OUTDIR="$PWD/build-clang" ./build-lx.sh
- name: Build via gcc
run: |
cd ${{ github.workspace }}/CPP
CC="gcc" CXX="g++" OUTDIR="$PWD/build-gcc" ./build-lx.sh
- name: Test with clang binary
run: |
Z7_PATH="CPP/build-clang/7z" tclsh tests/7z-test.tcl -verbose tpsem
- name: Test with gcc binary
run: |
Z7_PATH="CPP/build-gcc/7z" tclsh tests/7z-test.tcl -verbose tpsem
- name: Upload Build Artifacts (gcc)
uses: actions/upload-artifact@v6
with:
path: ${{ github.workspace }}/CPP/build-gcc/*
name: linux-gcc-${{ matrix.arch }}
- name: Upload Build Artifacts (clang)
uses: actions/upload-artifact@v6
with:
path: ${{ github.workspace }}/CPP/build-clang/*
name: linux-clang-${{ matrix.arch }}
windows:
strategy:
matrix:
arch: [ x64, x86, arm64 ]
darkmode: [darkmode, '']
include:
- arch: x86
#is_arm: false
runner: windows-2025-vs2026
subsys: "5.01"
platform: "x86"
- arch: x64
#is_arm: false
runner: windows-2025-vs2026
subsys: "5.02"
platform: "x64"
- arch: arm64
#is_arm: true
runner: windows-11-arm
subsys: "6.02"
platform: "arm64"
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v6
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v3
with:
msbuild-architecture: ${{ matrix.arch }}
- name: Find vcvarsall path (to init Developer Command Prompt at compile phase)
shell: cmd
run: |
for /f "usebackq tokens=*" %%i in (`vswhere -latest -property installationPath`) do (
echo VCVARSALL_PATH=%%i\VC\Auxiliary\Build\vcvarsall.bat >> %GITHUB_ENV%
)
- name: Pre-requirements
shell: cmd
run: |
@if "${{matrix.darkmode}}" == "darkmode" (
@if exist DarkMode\lib\src (
@echo use DarkMode/lib
) else (
@echo checkout darkmodelib module ...
git submodule update --init --recursive DarkMode/lib
if %errorlevel% neq 0 (
@echo checkout module failed, clone ...
git clone https://github.com/ozone10/darkmodelib.git DarkMode/lib
)
)
)
- name: Compiling ${{ matrix.arch }}
shell: cmd
run: |
call "%VCVARSALL_PATH%" ${{ matrix.arch }}
set WDIR=%cd%
set PLATFORM=${{matrix.platform}}
set SUBSYS=${{matrix.subsys}}
set ROOT=%cd%\CPP\7zip
set OUTDIR=%WDIR%\build\bin-%PLATFORM%
@if "${{matrix.darkmode}}" == "darkmode" (
if "${{matrix.subsys}}" lss "6.00" set SUBSYS=6.00
set ZIP7_DARKMODE=1
) else (
set OUTDIR=%OUTDIR%-ndm
set ZIP7_DARKMODE=0
)
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 OUTDIR=build\bin-%PLATFORM%
if "${{matrix.darkmode}}" == "" set OUTDIR=%OUTDIR%-ndm
set Z7_PATH=%OUTDIR%\7z.exe
tclsh tests\7z-test.tcl -verbose tpsem
- name: Upload a Build Artifact
uses: actions/upload-artifact@v6
with:
path: ${{ github.workspace }}\build\**\*
name: binary-${{ matrix.arch }}-${{ matrix.darkmode }}
do-release:
runs-on: windows-latest
needs: windows
steps:
- uses: actions/download-artifact@v7
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@176a747ab7e287e3ff4787bf8a148716375ca118 # v6.0.0
with:
name: binary-*
- uses: actions/upload-artifact@v6
with:
name: 7-Zip ZS Release binaries
path: |
artifact\*.exe
artifact\*.7z