CI updates

This commit is contained in:
Markus F.X.J. Oberhumer
2023-11-15 13:06:29 +01:00
parent f74c225338
commit 46029bb8a0
14 changed files with 90 additions and 50 deletions
+9 -4
View File
@@ -118,13 +118,13 @@ jobs:
run: |
(cd build/extra/gcc/release && DESTDIR=$PWD/Install-with-cmake cmake --install .)
(cd build/extra/gcc/release && DESTDIR=$PWD/Install-with-make make install)
- name: 'Run basic tests'
- name: 'Run ctest tests'
run: |
make -C build/extra/gcc/debug test
make -C build/extra/gcc/release test
make -C build/extra/clang/debug test
make -C build/extra/clang/release test
- name: 'Run basic tests 32-bit'
- name: 'Run ctest tests 32-bit'
if: ${{ matrix.use_m32 }}
run: |
make -C build/extra/gcc-m32/debug test
@@ -152,6 +152,8 @@ jobs:
- { os: macos-11, gcc: gcc-10, gxx: 'g++-10', testsuite: true }
- { os: macos-12, gcc: gcc-11, gxx: 'g++-11', testsuite: true }
- { os: macos-13, gcc: gcc-12, gxx: 'g++-12', testsuite: true }
env:
UPX_CONFIG_EXPECT_THREADS: 'ON'
steps:
- name: 'Install brew packages'
if: ${{ matrix.testsuite }}
@@ -203,7 +205,7 @@ jobs:
run: |
(cd build/extra/clang/release && DESTDIR=$PWD/Install-with-cmake cmake --install .)
(cd build/extra/clang/release && DESTDIR=$PWD/Install-with-make make install)
- name: 'Run basic tests'
- name: 'Run ctest tests'
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
@@ -236,6 +238,8 @@ jobs:
include:
- { name: windows-2019-amd64, os: windows-2019, vsversion: 2019, arch: amd64 }
- { name: windows-2022-amd64, os: windows-2022, vsversion: 2022, arch: amd64 }
env:
UPX_CONFIG_EXPECT_THREADS: 'ON'
steps:
- run: git config --global core.autocrlf false
- name: 'Check out code'
@@ -265,7 +269,7 @@ jobs:
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
- name: 'Run basic tests'
- name: 'Run ctest tests'
if: ${{ matrix.arch != 'amd64_arm64' }}
run: |
ctest --test-dir build/debug -C Debug
@@ -425,6 +429,7 @@ jobs:
# { zig_target: x86_64-macos.13.0-none }
- { zig_target: x86_64-windows-gnu }
env:
UPX_CONFIG_EXPECT_THREADS: 'ON'
# for zig-cc wrapper scripts (see below):
ZIG_CPPFLAGS: -DUPX_DOCTEST_CONFIG_MULTITHREADING
ZIG_FLAGS: ${{ matrix.zig_flags }}
@@ -10,6 +10,7 @@ env:
CMAKE_VERBOSE_MAKEFILE: 'ON'
CTEST_OUTPUT_ON_FAILURE: 'ON'
DEBIAN_FRONTEND: noninteractive
UPX_CONFIG_EXPECT_THREADS: 'ON'
jobs:
job-cmake-macos-xcode: # uses cmake + xcodebuild
@@ -44,7 +45,7 @@ jobs:
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
- name: 'Run basic tests'
- name: 'Run ctest tests'
if: ${{ matrix.run_test }}
run: |
ctest --test-dir build/xcode -C Debug
@@ -10,6 +10,7 @@ env:
CMAKE_VERBOSE_MAKEFILE: 'ON'
CTEST_OUTPUT_ON_FAILURE: 'ON'
DEBIAN_FRONTEND: noninteractive
UPX_CONFIG_EXPECT_THREADS: 'ON'
UPX_CMAKE_BUILD_FLAGS: --verbose
UPX_CMAKE_CONFIG_FLAGS: -G "Unix Makefiles"
@@ -85,7 +86,7 @@ jobs:
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
- name: 'Run basic tests'
- name: 'Run ctest tests'
if: ${{ matrix.arch != 'amd64_arm64' }}
shell: bash
run: |
@@ -10,6 +10,7 @@ env:
CMAKE_VERBOSE_MAKEFILE: 'ON'
CTEST_OUTPUT_ON_FAILURE: 'ON'
DEBIAN_FRONTEND: noninteractive
UPX_CONFIG_EXPECT_THREADS: 'ON'
UPX_CMAKE_BUILD_FLAGS: --verbose
UPX_CMAKE_CONFIG_FLAGS: -G Ninja
@@ -84,7 +85,7 @@ jobs:
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
- name: 'Run basic tests'
- name: 'Run ctest tests'
if: ${{ matrix.arch != 'amd64_arm64' }}
shell: bash
run: |
@@ -10,6 +10,7 @@ env:
CMAKE_VERBOSE_MAKEFILE: 'ON'
CTEST_OUTPUT_ON_FAILURE: 'ON'
DEBIAN_FRONTEND: noninteractive
UPX_CONFIG_EXPECT_THREADS: 'ON'
jobs:
job-cmake-windows-nmake: # uses cmake + nmake
@@ -44,7 +45,7 @@ jobs:
shell: cmd
run: |
set X=${{ matrix.clang_cl && '-DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl' || '' }}
cmake -S . -B build/debug -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug %X%
cmake -S . -B build/debug -G "NMake Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Debug %X%
cd build/debug
nmake
dir *.exe
@@ -53,7 +54,7 @@ jobs:
shell: cmd
run: |
set X=${{ matrix.clang_cl && '-DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl' || '' }}
cmake -S . -B build/release -G "NMake Makefiles" %X%
cmake -S . -B build/release -G "NMake Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON %X%
cd build/release
nmake
dir *.exe
@@ -71,7 +72,7 @@ jobs:
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
- name: 'Run basic tests'
- name: 'Run ctest tests'
if: ${{ matrix.arch != 'amd64_arm64' }}
run: |
ctest --test-dir build/debug
+1
View File
@@ -10,6 +10,7 @@ env:
CMAKE_VERBOSE_MAKEFILE: 'ON'
CTEST_OUTPUT_ON_FAILURE: 'ON'
DEBIAN_FRONTEND: noninteractive
UPX_CONFIG_EXPECT_THREADS: 'ON'
UPX_CMAKE_BUILD_FLAGS: --verbose
jobs:
@@ -174,12 +174,12 @@ jobs:
(cd "upx with space"/build/xtarget/gcc-static/release && DESTDIR="$PWD/Install with cmake" cmake --install .)
(cd "upx with space"/build/xtarget/gcc-static/release && DESTDIR="$PWD/Install with make" make install)
- { name: 'Run basic tests clang Debug', run: 'make -C "upx with space"/build/xtarget/clang-static/debug test' }
- { name: 'Run basic tests clang Release', run: 'make -C "upx with space"/build/xtarget/clang-static/release test' }
- { name: 'Run basic tests gcc Debug', run: 'make -C "upx with space"/build/xtarget/gcc-static/debug test' }
- { name: 'Run basic tests gcc Release', run: 'make -C "upx with space"/build/xtarget/gcc-static/release test' }
- { name: 'Run ctest tests clang Debug', run: 'make -C "upx with space"/build/xtarget/clang-static/debug test' }
- { name: 'Run ctest tests clang Release', run: 'make -C "upx with space"/build/xtarget/clang-static/release test' }
- { name: 'Run ctest tests gcc Debug', run: 'make -C "upx with space"/build/xtarget/gcc-static/debug test' }
- { name: 'Run ctest tests gcc Release', run: 'make -C "upx with space"/build/xtarget/gcc-static/release test' }
- name: 'Run basic tests C++20, C++23 and LTO'
- name: 'Run ctest tests C++20, C++23 and LTO'
if: matrix.use_cxx20 || matrix.use_cxx23 || matrix.use_cxx2b || matrix.use_lto
run: |
for dir in "upx with space"/build/xtarget/*-cxx*/*; do
@@ -10,6 +10,7 @@ env:
CMAKE_VERBOSE_MAKEFILE: 'ON'
CTEST_OUTPUT_ON_FAILURE: 'ON'
DEBIAN_FRONTEND: noninteractive
UPX_CONFIG_EXPECT_THREADS: 'ON'
jobs:
job-alpine-mingw: # uses cmake + make
@@ -18,8 +19,8 @@ jobs:
fail-fast: false
matrix:
include:
- { container: 'alpine:3.11', wine: false, i686_mingw: false } # skip Wine testsuite; TODO: internal error: doctest check failed
- { container: 'alpine:3.12', wine: false, i686_mingw: false } # skip Wine testsuite; TODO: internal error: doctest check failed
- { container: 'alpine:3.11', wine: true, i686_mingw: false } # wine-4.0.3
- { container: 'alpine:3.12', wine: true, i686_mingw: false } # wine-4.0.3
- { container: 'alpine:3.13', wine: true, i686_mingw: false } # wine-4.0.3
- { container: 'alpine:3.14', wine: true, i686_mingw: false } # wine-6.18
- { container: 'alpine:3.15', wine: true, i686_mingw: false } # wine-6.23
@@ -27,7 +28,7 @@ jobs:
- { container: 'alpine:3.17', wine: true, i686_mingw: false } # wine-7.21
# Wine >= 8.0 can run i686 32-bit programs in WOW64 mode on pure 64-bit systems
- { container: 'alpine:3.18', wine: true, i686_mingw: true } # wine-8.13
- { container: 'alpine:edge', wine: true, i686_mingw: true } # wine-8.17
- { container: 'alpine:edge', wine: true, i686_mingw: true } # wine-8.19
name: ${{ format('container {0}', matrix.container) }}
runs-on: ubuntu-latest
container: ${{ matrix.container }}
@@ -37,12 +38,17 @@ jobs:
apk update && apk upgrade && apk add bash cmake coreutils file git make tar xz
apk add mingw-w64-gcc
test "${{ matrix.i686_mingw }}" = "true" && apk add i686-mingw-w64-gcc
test "${{ matrix.wine }}" = "true" && apk add wine
true
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
- name: 'Install Wine'
if: ${{ matrix.wine }}
run: |
apk add wine
test -f /usr/bin/wine || ln -s -v wine64 /usr/bin/wine
# this seems to be needed for Wine when running in a container (beause of UID mismatch??)
mkdir -p -v ~/.wine
wineboot --init
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
run: |
# this seems to be needed when running in a container (beause of UID mismatch??)
git config --global --add safe.directory '*'
git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" .
@@ -89,7 +95,7 @@ jobs:
run: |
git clone --depth=1 https://github.com/upx/upx-testsuite ../upx-testsuite
testsuite_1="$(readlink -fn ./misc/testsuite/upx_testsuite_1.sh)"
export upx_exe_runner="wine64"
export upx_exe_runner="wine"
if test "${{ matrix.i686_mingw }}" = "true"; then
UPX_TESTSUITE_LEVEL=2 \
env -C build/extra/cross-windows-mingw32/debug upx_exe=./upx.exe bash "$testsuite_1"
@@ -109,7 +115,7 @@ jobs:
cd build/extra/cross-windows-mingw32/debug
[[ -f upx && ! -f upx.exe ]] && mv -i -v upx upx.exe
pwd; file ./upx.exe
wine=wine64
wine=wine
tt='./upx.exe'
$wine ./upx.exe --version-short
$wine ./upx.exe --sysinfo -v
@@ -128,7 +134,7 @@ jobs:
cd build/extra/cross-windows-mingw32/release
[[ -f upx && ! -f upx.exe ]] && mv -i -v upx upx.exe
pwd; file ./upx.exe
wine=wine64
wine=wine
tt='./upx.exe'
$wine ./upx.exe --version-short
$wine ./upx.exe --sysinfo -v
@@ -176,3 +182,19 @@ jobs:
$wine ./upx.exe -d tt.packed.exe -o tt.unpacked.exe
$wine ./tt.packed.exe --version-short
$wine ./tt.unpacked.exe --version-short
- name: 'Run ctest tests under Wine - mingw32/debug'
if: ${{ matrix.wine && matrix.i686_mingw }}
run: 'make -C build/extra/cross-windows-mingw32/debug test'
- name: 'Run ctest tests under Wine - mingw32/release'
if: ${{ matrix.wine && matrix.i686_mingw }}
run: 'make -C build/extra/cross-windows-mingw32/release test'
- name: 'Run ctest tests under Wine - mingw64/debug'
if: ${{ matrix.wine }}
run: 'make -C build/extra/cross-windows-mingw64/debug test'
- name: 'Run ctest tests under Wine - mingw64/release'
if: ${{ matrix.wine }}
run: 'make -C build/extra/cross-windows-mingw64/release test'
+11 -6
View File
@@ -12,6 +12,7 @@ env:
CMAKE_VERBOSE_MAKEFILE: 'ON'
CTEST_OUTPUT_ON_FAILURE: 'ON'
DEBIAN_FRONTEND: noninteractive
UPX_CONFIG_EXPECT_THREADS: 'ON'
jobs:
job-llvm-mingw: # uses cmake + make
@@ -26,12 +27,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-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: llvm-mingw-20231114-msvcrt
llvm_version: 17.0.5
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20231114/llvm-mingw-20231114-msvcrt-ubuntu-20.04-x86_64.tar.xz'
- name: llvm-mingw-20231114-ucrt
llvm_version: 17.0.5
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20231114/llvm-mingw-20231114-ucrt-ubuntu-20.04-x86_64.tar.xz'
name: ${{ format('{0} {1}', matrix.name, matrix.llvm_version) }}
runs-on: ubuntu-latest
steps:
@@ -53,24 +54,28 @@ jobs:
run: |
export CC="aarch64-w64-mingw32-clang -static" CXX="aarch64-w64-mingw32-clang++ -static"
CC="$CC -D_WIN32_WINNT=0x0400"; CXX="$CXX -D_WIN32_WINNT=0x0400"
export CMAKE_SYSTEM_NAME=Windows
make UPX_XTARGET=aarch64-w64-mingw32-clang xtarget/debug xtarget/release
- name: 'Build clang armv7'
if: success() || failure() # run this step even if the previous step failed
run: |
export CC="armv7-w64-mingw32-clang -static" CXX="armv7-w64-mingw32-clang++ -static"
CC="$CC -D_WIN32_WINNT=0x0400"; CXX="$CXX -D_WIN32_WINNT=0x0400"
export CMAKE_SYSTEM_NAME=Windows
make UPX_XTARGET=armv7-w64-mingw32-clang xtarget/debug xtarget/release
- name: 'Build clang i686'
if: success() || failure() # run this step even if the previous step failed
run: |
export CC="i686-w64-mingw32-clang -static" CXX="i686-w64-mingw32-clang++ -static"
CC="$CC -D_WIN32_WINNT=0x0400"; CXX="$CXX -D_WIN32_WINNT=0x0400"
export CMAKE_SYSTEM_NAME=Windows # CMAKE_CROSSCOMPILING_EMULATOR=wine
make UPX_XTARGET=i686-w64-mingw32-clang xtarget/debug xtarget/release
- name: 'Build clang x86_64'
if: success() || failure() # run this step even if the previous step failed
run: |
export CC="x86_64-w64-mingw32-clang -static" CXX="x86_64-w64-mingw32-clang++ -static"
CC="$CC -D_WIN32_WINNT=0x0400"; CXX="$CXX -D_WIN32_WINNT=0x0400"
export CMAKE_SYSTEM_NAME=Windows # CMAKE_CROSSCOMPILING_EMULATOR=wine64
make UPX_XTARGET=x86_64-w64-mingw32-clang xtarget/debug xtarget/release
- name: 'Make artifact'
run: |
+3 -3
View File
@@ -76,12 +76,12 @@ jobs:
name: ${{ env.artifact_name }}
path: tmp/artifact
- name: 'Run basic tests clang-static'
- name: 'Run ctest tests clang-static'
run: 'make -C build/xtarget/clang-static/$release test'
- name: 'Run basic tests clang-asan'
- name: 'Run ctest tests clang-asan'
if: ${{ !startsWith(matrix.container, 'i386/') }} # i386: ASAN not supported
run: 'make -C build/xtarget/clang-asan/$release test'
- name: 'Run basic tests clang-msan'
- name: 'Run ctest tests clang-msan'
if: ${{ !startsWith(matrix.container, 'i386/') }} # i386: MSAN not supported
run: 'make -C build/xtarget/clang-msan/$release test'