CI updates and cleanups

This commit is contained in:
Markus F.X.J. Oberhumer
2023-11-03 17:52:46 +01:00
parent 2c4b1d8a8c
commit 4f0f977f04
25 changed files with 209 additions and 127 deletions
+10 -5
View File
@@ -92,13 +92,13 @@ jobs:
if: ${{ matrix.use_m32 }}
run: 'make build/extra/gcc-m32/debug'
- name: 'Build cmake extra/gcc-m32/release'
if: ${{ matrix.use_m32 }}
if: ${{ matrix.use_m32 && (success() || failure()) }} # run this step even if the previous step failed
run: 'make build/extra/gcc-m32/release'
- name: 'Build cmake extra/cross-windows-mingw32/release'
if: ${{ matrix.use_m32 }}
if: ${{ matrix.use_m32 && (success() || failure()) }} # run this step even if the previous step failed
run: 'make build/extra/cross-windows-mingw32/release'
- name: 'Build cmake extra/cross-windows-mingw64/release'
if: ${{ matrix.use_m32 }}
if: ${{ matrix.use_m32 && (success() || failure()) }} # run this step even if the previous step failed
run: 'make build/extra/cross-windows-mingw64/release'
- name: 'Make artifact'
run: |
@@ -206,7 +206,8 @@ jobs:
if: ${{ !contains(matrix.os, 'macos-13') }} # FIXME: UPX on macos-13 is broken => disable self-test for now
run: |
make -C build/extra/clang/debug test
# make -C build/extra/clang/release test
#make -C build/extra/clang/release test
for f in ./build/extra/*/*/upx; do echo "===== $f"; $f --sysinfo -v; done
- name: 'Run file system test suite'
if: ${{ matrix.testsuite }} # for coreutils readlink
run: |
@@ -235,6 +236,7 @@ jobs:
- { name: windows-2019-amd64, os: windows-2019, vsversion: 2019, arch: amd64 }
- { name: windows-2022-amd64, os: windows-2022, vsversion: 2022, arch: amd64 }
steps:
- run: git config --global core.autocrlf false
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
@@ -283,7 +285,6 @@ jobs:
env:
C: ${{ matrix.name }}
B: release
H: 'd:\a\upx\upx'
strategy:
fail-fast: false
matrix:
@@ -297,6 +298,7 @@ jobs:
- { name: i386-win32-vs2019, os: windows-2019, vsversion: 2019, arch: amd64_x86 }
- { name: i386-win32-vs2022, os: windows-2022, vsversion: 2022, arch: amd64_x86 }
steps:
- run: git config --global core.autocrlf false
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
@@ -305,6 +307,8 @@ jobs:
run: |
git clone --depth=1 https://github.com/upx/upx-testsuite ../deps/upx-testsuite
mkdir -p -v build/$C/$B/{bzip2,ucl,upx,zlib,zstd}
repo_name="${GITHUB_REPOSITORY##*/}" # basename
echo "H=d:\\a\\$repo_name\\$repo_name" >> $GITHUB_ENV
- name: 'Set up Developer Command Prompt'
uses: ilammy/msvc-dev-cmd@cec98b9d092141f74527d0afa6feb2af698cfe89 # v1.12.1
with:
@@ -370,6 +374,7 @@ jobs:
cd $Env:H\build\$Env:C\$Env:B\upx
$Env:UPX = "--no-color --no-progress"
.\upx.exe --version
.\upx.exe --sysinfo -v
.\upx.exe upx.exe -o upx_packed.exe
dir *.exe
.\upx.exe -l upx_packed.exe
+2 -2
View File
@@ -21,7 +21,7 @@ jobs:
- name: ${{ format('Build clang {0}', matrix.container) }}
run: |
apk update && apk upgrade && apk add clang cmake make
wget https://github.com/upx/upx/releases/download/v4.2.0/upx-4.2.0-src.tar.xz
wget https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-src.tar.xz
tar -xoaf upx-*-src.tar.xz
cd upx-*-src
make build/debug CC="clang -static" CXX="clang++ -static"
@@ -48,7 +48,7 @@ jobs:
- name: ${{ format('Build gcc {0}', matrix.container) }}
run: |
apk update && apk upgrade && apk add cmake g++ make
wget https://github.com/upx/upx/releases/download/v4.2.0/upx-4.2.0-src.tar.xz
wget https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-src.tar.xz
tar -xoaf upx-*-src.tar.xz
cd upx-*-src
make build/debug CC="gcc -static" CXX="g++ -static"
+2
View File
@@ -51,6 +51,7 @@ jobs:
cmake-nmake:
runs-on: windows-2022
steps:
- run: git config --global core.autocrlf false
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
@@ -100,6 +101,7 @@ jobs:
cmake-vsstudio-multi-config:
runs-on: windows-2022
steps:
- run: git config --global core.autocrlf false
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
+16 -3
View File
@@ -141,7 +141,7 @@ jobs:
cd "upx with space"/build/by-hand
bash "$testsuite"
job-by-hand-windows-gcc: # uses a POSIX-compliant shell
job-by-hand-windows: # uses a POSIX-compliant shell
# ...and also uses a subdirectory "upx with space" in order to detect possible quoting issues
if: github.repository_owner == 'upx'
strategy:
@@ -150,16 +150,29 @@ jobs:
include:
- { os: windows-2019 }
- { os: windows-2022 }
name: ${{ format('by-hand gcc {0}', matrix.os) }}
name: ${{ format('by-hand cc {0}', matrix.os) }}
runs-on: ${{ matrix.os }}
steps:
- run: git config --global core.autocrlf false
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
shell: bash
run: |
git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" "upx with space"
git -C "upx with space" submodule update --init
- name: 'Build by-hand with bash'
- name: 'Build by-hand with bash - clang'
shell: bash
run: |
xflags="-static -Wall -Wextra -Werror"
# clang uses the MSVC headers, adjust settings
xflags="$xflags -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS"
export zlib_extra_flags="-DHAVE_VSNPRINTF"
export AR=false # link without using $AR
CC="clang $xflags" CXX="clang++ -std=gnu++17 $xflags" bash "./upx with space/misc/scripts/build_upx_by_hand.sh"
ls -l build/by-hand || true
- name: 'Build by-hand with bash - gcc'
if: success() || failure() # run this step even if the previous step failed
shell: bash
run: |
xflags="-static -Wall -Wextra -Werror"
# gcc uses the MingGW headers, so no extra settings are needed
CC="gcc $xflags" CXX="g++ -std=gnu++17 $xflags" bash "./upx with space/misc/scripts/build_upx_by_hand.sh"
@@ -47,7 +47,9 @@ jobs:
if: ${{ matrix.run_test }}
run: |
ctest --test-dir build/xcode -C Debug
# ctest --test-dir build/xcode -C Release
#ctest --test-dir build/xcode -C Release
./build/xcode/Debug/upx --sysinfo -v
./build/xcode/Release/upx --sysinfo -v
- name: 'Run install tests'
run: |
(cd build/xcode && DESTDIR=$PWD/Install-default cmake --install .)
@@ -43,6 +43,7 @@ jobs:
name: ${{ format('{0} {1} {2}', matrix.cc, matrix.vsversion, matrix.arch) }}
runs-on: ${{ matrix.os }}
steps:
- run: git config --global core.autocrlf false
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
@@ -64,6 +65,7 @@ jobs:
ls -l build/xtarget/$xtarget/debug/upx.exe
file build/xtarget/$xtarget/debug/upx.exe || true
- name: 'Build cmake Make Release'
if: success() || failure() # run this step even if the previous step failed
shell: bash
run: |
make UPX_XTARGET=$xtarget xtarget/release
@@ -88,6 +90,8 @@ jobs:
run: |
ctest --test-dir build/xtarget/$xtarget/debug
ctest --test-dir build/xtarget/$xtarget/release
./build/xtarget/$xtarget/debug/upx.exe --sysinfo -v
./build/xtarget/$xtarget/release/upx.exe --sysinfo -v
- name: 'Run install tests'
shell: bash
run: |
@@ -41,6 +41,7 @@ jobs:
name: ${{ format('{0} {1} {2}', matrix.cc, matrix.vsversion, matrix.arch) }}
runs-on: ${{ matrix.os }}
steps:
- run: git config --global core.autocrlf false
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
@@ -63,6 +64,7 @@ jobs:
ls -l build/xtarget/$xtarget/debug/upx.exe
file build/xtarget/$xtarget/debug/upx.exe || true
- name: 'Build cmake Ninja Release'
if: success() || failure() # run this step even if the previous step failed
shell: bash
run: |
make UPX_XTARGET=$xtarget xtarget/release
@@ -87,6 +89,8 @@ jobs:
run: |
ctest --test-dir build/xtarget/$xtarget/debug
ctest --test-dir build/xtarget/$xtarget/release
./build/xtarget/$xtarget/debug/upx.exe --sysinfo -v
./build/xtarget/$xtarget/release/upx.exe --sysinfo -v
- name: 'Run install tests'
shell: bash
run: |
@@ -18,6 +18,7 @@ jobs:
matrix:
include:
# clang-cl
- { os: windows-2019, vsversion: 2019, arch: amd64, clang_cl: true }
- { os: windows-2022, vsversion: 2022, arch: amd64, clang_cl: true }
# msvc
- { os: windows-2019, vsversion: 2019, arch: amd64 }
@@ -29,6 +30,7 @@ jobs:
name: ${{ format('vs{0} {1} {2}', matrix.vsversion, matrix.arch, matrix.clang_cl && 'clang-cl' || '') }}
runs-on: ${{ matrix.os }}
steps:
- run: git config --global core.autocrlf false
- name: 'Check out code'
uses: actions/checkout@v4
with: { submodules: true }
@@ -46,6 +48,7 @@ jobs:
nmake
dir *.exe
- name: 'Build cmake NMake Release'
if: success() || failure() # run this step even if the previous step failed
shell: cmd
run: |
set X=${{ matrix.clang_cl && '-DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl' || '' }}
@@ -72,6 +75,8 @@ jobs:
run: |
ctest --test-dir build/debug
ctest --test-dir build/release
.\build\debug\upx.exe --sysinfo -v
.\build\release\upx.exe --sysinfo -v
- name: 'Run install tests'
run: |
env DESTDIR=./Install-debug cmake --install build/debug
@@ -112,6 +112,7 @@ jobs:
wine=wine64
tt='./upx.exe'
$wine ./upx.exe --version-short
$wine ./upx.exe --sysinfo -v
$wine ./upx.exe -3 $tt -o tt.packed.exe
$wine ./upx.exe -l tt.packed.exe
$wine ./upx.exe -t tt.packed.exe
@@ -130,6 +131,7 @@ jobs:
wine=wine64
tt='./upx.exe'
$wine ./upx.exe --version-short
$wine ./upx.exe --sysinfo -v
$wine ./upx.exe -3 $tt -o tt.packed.exe
$wine ./upx.exe -l tt.packed.exe
$wine ./upx.exe -t tt.packed.exe
@@ -148,6 +150,7 @@ jobs:
wine=wine64
tt='./upx.exe'
$wine ./upx.exe --version-short
$wine ./upx.exe --sysinfo -v
$wine ./upx.exe -3 $tt -o tt.packed.exe
$wine ./upx.exe -l tt.packed.exe
$wine ./upx.exe -t tt.packed.exe
@@ -166,6 +169,7 @@ jobs:
wine=wine64
tt='./upx.exe'
$wine ./upx.exe --version-short
$wine ./upx.exe --sysinfo -v
$wine ./upx.exe -3 $tt -o tt.packed.exe
$wine ./upx.exe -l tt.packed.exe
$wine ./upx.exe -t tt.packed.exe
@@ -26,12 +26,12 @@ jobs:
- name: llvm-mingw-20230614-ucrt
llvm_version: 16.0.6
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20230614/llvm-mingw-20230614-ucrt-ubuntu-20.04-x86_64.tar.xz'
- name: llvm-mingw-20231017-msvcrt
llvm_version: 17.0.3
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20231017/llvm-mingw-20231017-msvcrt-ubuntu-20.04-x86_64.tar.xz'
- name: llvm-mingw-20231017-ucrt
llvm_version: 17.0.3
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20231017/llvm-mingw-20231017-ucrt-ubuntu-20.04-x86_64.tar.xz'
- name: llvm-mingw-20231031-msvcrt
llvm_version: 17.0.4
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20231031/llvm-mingw-20231031-msvcrt-ubuntu-20.04-x86_64.tar.xz'
- name: llvm-mingw-20231031-ucrt
llvm_version: 17.0.4
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20231031/llvm-mingw-20231031-ucrt-ubuntu-20.04-x86_64.tar.xz'
name: ${{ format('{0} {1}', matrix.name, matrix.llvm_version) }}
runs-on: ubuntu-latest
steps: