CI updates
This commit is contained in:
@@ -12,8 +12,8 @@ env:
|
||||
CMAKE_REQUIRED_QUIET: OFF
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
UPX_CMAKE_BUILD_FLAGS: --verbose
|
||||
# 2023-09-05
|
||||
ZIG_DIST_VERSION: 0.12.0-dev.280+64d03faae
|
||||
# 2023-09-10
|
||||
ZIG_DIST_VERSION: 0.12.0-dev.294+4d1432299
|
||||
|
||||
jobs:
|
||||
job-rebuild-and-verify-stubs:
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: {container: ['alpine:3.16','alpine:3.17','alpine:3.18','alpine:edge','i386/alpine:edge']}
|
||||
name: ${{ format('Analyze {0}', matrix.container) }}
|
||||
name: ${{ format('Analyze clang-analyzer {0}', matrix.container) }}
|
||||
runs-on: ubuntu-latest
|
||||
container: ${{ matrix.container }}
|
||||
steps:
|
||||
|
||||
@@ -8,13 +8,14 @@ on:
|
||||
env:
|
||||
CMAKE_REQUIRED_QUIET: OFF
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
VERBOSE: 1
|
||||
|
||||
jobs:
|
||||
job-alpine-by-hand: # uses a POSIX-compliant shell
|
||||
# ...and also uses a subdirectory "upx with space" in order to detect possible quoting issues
|
||||
# ...and also uses ccache as we are running the same build-script again and again
|
||||
if: github.repository_owner == 'upx'
|
||||
strategy: { matrix: { container: ['alpine:3.9','alpine:3.18','alpine:edge'] } }
|
||||
strategy: { matrix: { container: ['alpine:3.9','alpine:3.18','alpine:edge','i386/alpine:edge'] } }
|
||||
name: ${{ format('gcc by-hand {0}', matrix.container) }}
|
||||
runs-on: ubuntu-latest
|
||||
container: ${{ matrix.container }}
|
||||
@@ -28,15 +29,17 @@ jobs:
|
||||
esac
|
||||
echo "installing shells: $shells"
|
||||
apk update && apk upgrade && apk add ccache g++ git $shells
|
||||
# enable ccache
|
||||
echo -e "CC=ccache gcc\nCXX=ccache g++ -std=gnu++17" >> $GITHUB_ENV
|
||||
# enable ccache and some warnings
|
||||
warn="-Wall -Wextra -Werror"
|
||||
echo -e "CC=ccache gcc $warn\nCXX=ccache g++ -std=gnu++17 $warn" >> $GITHUB_ENV
|
||||
# this seems to be needed when running in a container (beause of UID mismatch??)
|
||||
git config --global --add safe.directory '*'
|
||||
- name: 'Check out code'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
path: 'upx with space'
|
||||
# create user upx:upx 2000:2000 for file system tests below ("sudo")
|
||||
adduser upx -u 2000 -D && cd /home/upx && chmod 00700 . && chown -R upx:upx .
|
||||
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
|
||||
run: |
|
||||
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx "upx with space"
|
||||
git -C "upx with space" submodule update --init
|
||||
- name: 'Build by-hand with bash'
|
||||
run: 'bash "./upx with space/misc/scripts/build_upx_by_hand.sh"'
|
||||
- name: 'Build by-hand with bash --posix'
|
||||
@@ -81,3 +84,17 @@ jobs:
|
||||
run: |
|
||||
ccache -s
|
||||
ccache -p
|
||||
- name: 'Run file system test suite (busybox)'
|
||||
run: |
|
||||
apk add bash sudo
|
||||
testsuite="$(readlink -fn "upx with space"/misc/testsuite/test_symlinks.sh)"
|
||||
cd "upx with space"/build/by-hand
|
||||
# IMPORTANT: do NOT run as user root!
|
||||
chmod a+w . && sudo -u upx bash "$testsuite"
|
||||
- name: 'Run file system test suite (coreutils)'
|
||||
run: |
|
||||
apk add bash coreutils sudo
|
||||
testsuite="$(readlink -fn "upx with space"/misc/testsuite/test_symlinks.sh)"
|
||||
cd "upx with space"/build/by-hand
|
||||
# IMPORTANT: do NOT run as user root!
|
||||
chmod a+w . && sudo -u upx bash "$testsuite"
|
||||
|
||||
@@ -37,6 +37,8 @@ jobs:
|
||||
# clang-dev is needed on older Alpine versions for clang headers like <emmintrin.h>
|
||||
*:3.[0-9]|*:3.10|*:3.11) apk add clang-dev ;;
|
||||
esac
|
||||
# create user upx:upx 2000:2000 for file system tests below ("sudo")
|
||||
adduser upx -u 2000 -D && cd /home/upx && chmod 00700 . && chown -R upx:upx .
|
||||
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
|
||||
run: |
|
||||
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx "upx with space"
|
||||
@@ -63,55 +65,55 @@ jobs:
|
||||
|
||||
# build with C17 and C++20 on alpine:edge
|
||||
- name: ${{ format('Build clang C++20 Release with {0}', env.clang_package) }}
|
||||
if: ${{ contains(matrix.container, ':edge') }}
|
||||
if: endsWith(matrix.container, ':edge')
|
||||
run: |
|
||||
make -C "upx with space" UPX_XTARGET=clang-cxx20-static CC="clang -std=gnu17 -static" CXX="clang++ -std=gnu++20 -static"
|
||||
- name: ${{ format('Build clang C++20 Debug with {0}', env.clang_package) }}
|
||||
if: ${{ contains(matrix.container, ':edge') }}
|
||||
if: endsWith(matrix.container, ':edge')
|
||||
run: |
|
||||
make -C "upx with space" UPX_XTARGET=clang-cxx20-static CC="clang -std=gnu17 -static" CXX="clang++ -std=gnu++20 -static" xtarget/debug
|
||||
- name: ${{ format('Build gcc C++20 Release with {0}', env.gcc_package) }}
|
||||
if: ${{ contains(matrix.container, ':edge') }}
|
||||
if: endsWith(matrix.container, ':edge')
|
||||
run: |
|
||||
make -C "upx with space" UPX_XTARGET=gcc-cxx20-static CC="gcc -std=gnu17 -static" CXX="g++ -std=gnu++20 -static"
|
||||
- name: ${{ format('Build gcc C++20 Debug with {0}', env.gcc_package) }}
|
||||
if: ${{ contains(matrix.container, ':edge') }}
|
||||
if: endsWith(matrix.container, ':edge')
|
||||
run: |
|
||||
make -C "upx with space" UPX_XTARGET=gcc-cxx20-static CC="gcc -std=gnu17 -static" CXX="g++ -std=gnu++20 -static" xtarget/debug
|
||||
|
||||
# build with C23 and C++23 on alpine:edge
|
||||
- name: ${{ format('Build clang C++23 Release with {0}', env.clang_package) }}
|
||||
if: ${{ contains(matrix.container, ':edge') }}
|
||||
if: endsWith(matrix.container, ':edge')
|
||||
run: |
|
||||
make -C "upx with space" UPX_XTARGET=clang-cxx23-static CC="clang -std=gnu2x -static" CXX="clang++ -std=gnu++2b -static"
|
||||
- name: ${{ format('Build clang C++23 Debug with {0}', env.clang_package) }}
|
||||
if: ${{ contains(matrix.container, ':edge') }}
|
||||
if: endsWith(matrix.container, ':edge')
|
||||
run: |
|
||||
make -C "upx with space" UPX_XTARGET=clang-cxx23-static CC="clang -std=gnu2x -static" CXX="clang++ -std=gnu++2b -static" xtarget/debug
|
||||
- name: ${{ format('Build gcc C++23 Release with {0}', env.gcc_package) }}
|
||||
if: ${{ contains(matrix.container, ':edge') }}
|
||||
if: endsWith(matrix.container, ':edge')
|
||||
run: |
|
||||
make -C "upx with space" UPX_XTARGET=gcc-cxx23-static CC="gcc -std=gnu2x -static" CXX="g++ -std=gnu++23 -static"
|
||||
- name: ${{ format('Build gcc C++23 Debug with {0}', env.gcc_package) }}
|
||||
if: ${{ contains(matrix.container, ':edge') }}
|
||||
if: endsWith(matrix.container, ':edge')
|
||||
run: |
|
||||
make -C "upx with space" UPX_XTARGET=gcc-cxx23-static CC="gcc -std=gnu2x -static" CXX="g++ -std=gnu++23 -static" xtarget/debug
|
||||
|
||||
# build with -flto=auto on alpine:edge
|
||||
- name: ${{ format('Build clang LTO Release with {0}', env.clang_package) }}
|
||||
if: ${{ contains(matrix.container, ':edge') }}
|
||||
if: endsWith(matrix.container, ':edge')
|
||||
run: |
|
||||
make -C "upx with space" UPX_XTARGET=clang-cxxlto-static CC="clang -flto=auto -static" CXX="clang++ -flto=auto -static"
|
||||
- name: ${{ format('Build clang LTO Debug with {0}', env.clang_package) }}
|
||||
if: ${{ contains(matrix.container, ':edge') }}
|
||||
if: endsWith(matrix.container, ':edge')
|
||||
run: |
|
||||
make -C "upx with space" UPX_XTARGET=clang-cxxlto-static CC="clang -flto=auto -static" CXX="clang++ -flto=auto -static" xtarget/debug
|
||||
- name: ${{ format('Build gcc LTO Release with {0}', env.gcc_package) }}
|
||||
if: ${{ contains(matrix.container, ':edge') }}
|
||||
if: endsWith(matrix.container, ':edge')
|
||||
run: |
|
||||
make -C "upx with space" UPX_XTARGET=gcc-cxxlto-static CC="gcc -flto=auto -static" CXX="g++ -flto=auto -static"
|
||||
- name: ${{ format('Build gcc LTO Debug with {0}', env.gcc_package) }}
|
||||
if: ${{ contains(matrix.container, ':edge') }}
|
||||
if: endsWith(matrix.container, ':edge')
|
||||
run: |
|
||||
make -C "upx with space" UPX_XTARGET=gcc-cxxlto-static CC="gcc -flto=auto -static" CXX="g++ -flto=auto -static" xtarget/debug
|
||||
|
||||
@@ -129,7 +131,7 @@ jobs:
|
||||
- { name: 'Run basic tests gcc Release', run: 'make -C "upx with space"/build/xtarget/gcc-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 C++20, C++23 and LTO'
|
||||
if: ${{ contains(matrix.container, ':edge') }}
|
||||
if: endsWith(matrix.container, ':edge')
|
||||
run: |
|
||||
for dir in "upx with space"/build/xtarget/*-cxx*/*; do
|
||||
echo "===== $dir"
|
||||
@@ -152,7 +154,7 @@ jobs:
|
||||
testsuite="$(readlink -fn "upx with space"/misc/testsuite/test_symlinks.sh)"
|
||||
cd "upx with space"/build/xtarget/gcc-static/release
|
||||
# IMPORTANT: do NOT run as user root!
|
||||
chmod a+w . && sudo -u operator bash "$testsuite"
|
||||
chmod a+w . && sudo -u upx bash "$testsuite"
|
||||
|
||||
# test suite
|
||||
- name: ${{ format('Run test suite level {0}', env.UPX_TESTSUITE_LEVEL) }}
|
||||
@@ -171,4 +173,4 @@ jobs:
|
||||
testsuite="$(readlink -fn "upx with space"/misc/testsuite/test_symlinks.sh)"
|
||||
cd "upx with space"/build/xtarget/gcc-static/release
|
||||
# IMPORTANT: do NOT run as user root!
|
||||
chmod a+w . && sudo -u operator bash "$testsuite"
|
||||
chmod a+w . && sudo -u upx bash "$testsuite"
|
||||
|
||||
@@ -24,12 +24,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-20230822-msvcrt
|
||||
llvm_version: 17.0.0rc3
|
||||
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20230822/llvm-mingw-20230822-msvcrt-ubuntu-20.04-x86_64.tar.xz'
|
||||
- name: llvm-mingw-20230822-ucrt
|
||||
llvm_version: 17.0.0rc3
|
||||
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20230822/llvm-mingw-20230822-ucrt-ubuntu-20.04-x86_64.tar.xz'
|
||||
- name: llvm-mingw-20230905-msvcrt
|
||||
llvm_version: 17.0.0rc4
|
||||
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20230905/llvm-mingw-20230905-msvcrt-ubuntu-20.04-x86_64.tar.xz'
|
||||
- name: llvm-mingw-20230905-ucrt
|
||||
llvm_version: 17.0.0rc4
|
||||
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20230905/llvm-mingw-20230905-ucrt-ubuntu-20.04-x86_64.tar.xz'
|
||||
name: ${{ format('{0} {1}', matrix.name, matrix.llvm_version) }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
@@ -10,8 +10,8 @@ on:
|
||||
env:
|
||||
CMAKE_REQUIRED_QUIET: OFF
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
# 2023-09-05
|
||||
ZIG_DIST_VERSION: 0.12.0-dev.280+64d03faae
|
||||
# 2023-09-10
|
||||
ZIG_DIST_VERSION: 0.12.0-dev.294+4d1432299
|
||||
|
||||
jobs:
|
||||
job-linux-zigcc: # uses cmake + make
|
||||
|
||||
@@ -99,5 +99,5 @@ jobs:
|
||||
export upx_exe_runner="valgrind --error-exitcode=1 --quiet"
|
||||
# on current GitHub CI, takes about 30 minutes for release and 80 minutes for debug builds
|
||||
# reduce time for debug builds to about 30 minutes
|
||||
test $release = debug && export UPX_TESTSUITE_LEVEL=4
|
||||
test "$release" = "debug" && export UPX_TESTSUITE_LEVEL=4
|
||||
env -C build/xtarget/clang-static/$release "$PWD"/misc/testsuite/upx_testsuite_1.sh
|
||||
|
||||
Reference in New Issue
Block a user