CI updates

This commit is contained in:
Markus F.X.J. Oberhumer
2024-05-05 09:35:35 +02:00
parent 4c32a8e3d4
commit 3e5ba5c064
6 changed files with 140 additions and 181 deletions
+135 -176
View File
@@ -4,7 +4,7 @@
# unfortunately this sometimes breaks builds in mysterious ways... # unfortunately this sometimes breaks builds in mysterious ways...
# see https://github.com/actions/runner-images.git # see https://github.com/actions/runner-images.git
name: 'CI' name: CI
on: [push, workflow_dispatch] on: [push, workflow_dispatch]
@@ -22,13 +22,13 @@ env:
jobs: jobs:
job-rebuild-and-verify-stubs: job-rebuild-and-verify-stubs:
name: 'Rebuild stubs' name: Rebuild stubs
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: 'ubuntu:24.04' # glibc-2.39 container: ubuntu:24.04 # glibc-2.39
#container: 'debian:12-slim' # also works; glibc-2.36 #container: debian:12-slim # also works; glibc-2.36
#container: 'debian:testing-slim' # also works #container: debian:testing-slim # also works
steps: steps:
- name: 'Install packages' - name: Install packages
run: | run: |
uname -a; pwd; id; umask uname -a; pwd; id; umask
dpkg --add-architecture i386 dpkg --add-architecture i386
@@ -37,23 +37,23 @@ jobs:
apt-get install -y --no-install-recommends bash ca-certificates curl git libmpc3 make perl-base xz-utils libc6:i386 zlib1g:i386 apt-get install -y --no-install-recommends bash ca-certificates curl git libmpc3 make perl-base xz-utils libc6:i386 zlib1g:i386
# install python2-minimal packages from Debian-11 # install python2-minimal packages from Debian-11
mkdir ../deps; cd ../deps; mkdir packages mkdir ../deps; cd ../deps; mkdir packages
curl -sS -L -O 'https://ftp.debian.org/debian/pool/main/p/python2.7/libpython2.7-minimal_2.7.18-8+deb11u1_amd64.deb' curl -sS -L -O https://ftp.debian.org/debian/pool/main/p/python2.7/libpython2.7-minimal_2.7.18-8+deb11u1_amd64.deb
curl -sS -L -O 'https://ftp.debian.org/debian/pool/main/p/python2.7/python2.7-minimal_2.7.18-8+deb11u1_amd64.deb' curl -sS -L -O https://ftp.debian.org/debian/pool/main/p/python2.7/python2.7-minimal_2.7.18-8+deb11u1_amd64.deb
dpkg -i ./*python2*.deb && rm ./*python2*.deb && ldconfig dpkg -i ./*python2*.deb && rm ./*python2*.deb && ldconfig
ln -s -v python2.7 /usr/bin/python2 ln -s -v python2.7 /usr/bin/python2
# manually unpack and install compat libs from Ubuntu-16.04 # manually unpack and install compat libs from Ubuntu-16.04
curl -sS -L -O 'https://archive.kernel.org/ubuntu-archive/ubuntu/pool/main/m/mpfr4/libmpfr4_3.1.6-1_amd64.deb' curl -sS -L -O https://archive.kernel.org/ubuntu-archive/ubuntu/pool/main/m/mpfr4/libmpfr4_3.1.6-1_amd64.deb
for f in ./*.deb; do dpkg -x $f ./packages; done for f in ./*.deb; do dpkg -x $f ./packages; done
mv -v -n ./packages/usr/lib/x86_64-linux-gnu/lib* /usr/lib/x86_64-linux-gnu/ mv -v -n ./packages/usr/lib/x86_64-linux-gnu/lib* /usr/lib/x86_64-linux-gnu/
rm -rf ./*.deb ./packages && ldconfig rm -rf ./*.deb ./packages && ldconfig
# install upx-stubtools # install upx-stubtools
curl -sS -L https://github.com/upx/upx-stubtools/releases/download/v20221212/bin-upx-20221212.tar.xz | tar -xJ curl -sS -L https://github.com/upx/upx-stubtools/releases/download/v20221212/bin-upx-20221212.tar.xz | tar -xJ
- name: 'Check out code' - name: Check out code
run: | run: |
git config --global --add safe.directory '*' # needed when running in a container git config --global --add safe.directory '*' # needed when running in a container
git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" . git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" .
git submodule update --init -- vendor/lzma-sdk git submodule update --init -- vendor/lzma-sdk
- name: 'Rebuild and verify stubs' - name: Rebuild and verify stubs
run: | run: |
export PATH="$(readlink -en ../deps/bin-upx-20221212):$PATH" export PATH="$(readlink -en ../deps/bin-upx-20221212):$PATH"
make -C src/stub maintainer-clean extra-clean make -C src/stub maintainer-clean extra-clean
@@ -61,11 +61,12 @@ jobs:
make -C src/stub extra-all all make -C src/stub extra-all all
if ! git diff --quiet; then git diff; exit 1; fi if ! git diff --quiet; then git diff; exit 1; fi
- run: bash ./misc/scripts/check_whitespace_git.sh - run: bash ./misc/scripts/check_whitespace_git.sh
- name: 'Check source code formatting' - name: Check source code formatting
run: | run: |
UPX_CLANG_FORMAT="$PWD/../deps/bin-upx-20221212/clang-format-15.0.6" make -C src clang-format export UPX_CLANG_FORMAT="$PWD/../deps/bin-upx-20221212/clang-format-15.0.6"
make -C src clang-format
if ! git diff --quiet; then git diff; exit 1; fi if ! git diff --quiet; then git diff; exit 1; fi
- name: 'Rebuild docs' - name: Rebuild docs
run: | run: |
make -C doc clean all make -C doc clean all
if ! git diff --quiet; then git diff || true; fi # ignore diff error if ! git diff --quiet; then git diff || true; fi # ignore diff error
@@ -79,11 +80,11 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- { os: ubuntu-22.04, use_m32: true } - { os: ubuntu-22.04, use_extra: true, use_wine: true }
- { os: ubuntu-20.04, use_m32: true } # use_m32 also works here, but save some CI time - { os: ubuntu-20.04, use_extra: true }
steps: steps:
- name: 'Install extra 32-bit and Windows packages' - name: Install extra 32-bit and MinGW packages
if: ${{ matrix.use_m32 }} if: ${{ matrix.use_extra }}
run: | run: |
sudo dpkg --add-architecture i386 sudo dpkg --add-architecture i386
sudo apt-get update sudo apt-get update
@@ -92,62 +93,56 @@ jobs:
for f in i686-w64-mingw32-g++ i686-w64-mingw32-gcc x86_64-w64-mingw32-g++ x86_64-w64-mingw32-gcc; do for f in i686-w64-mingw32-g++ i686-w64-mingw32-gcc x86_64-w64-mingw32-g++ x86_64-w64-mingw32-gcc; do
if test -f /usr/bin/$f-posix; then sudo update-alternatives --set $f /usr/bin/$f-posix; fi if test -f /usr/bin/$f-posix; then sudo update-alternatives --set $f /usr/bin/$f-posix; fi
done done
sudo apt-get install libc6-dbg:i386 valgrind sudo apt-get install -y libc6-dbg:i386 valgrind
- name: 'Check out code' - name: Install Wine
uses: actions/checkout@v4 if: ${{ matrix.use_extra && matrix.use_wine }}
run: |
sudo apt-get install -y wine wine32 wine64
ls -l /usr/bin/wine*
mkdir -p -v ~/.wine && wineboot --init
- uses: actions/checkout@v4
with: { submodules: true } with: { submodules: true }
- name: 'Check out test suite' - name: Check out test suite
run: 'git clone --depth=1 https://github.com/upx/upx-testsuite ../deps/upx-testsuite' run: git clone --depth=1 https://github.com/upx/upx-testsuite ../deps/upx-testsuite
- name: 'Build extra/gcc/debug' - run: make build/extra/gcc/all
run: 'make build/extra/gcc/debug' - run: make build/extra/clang/all
- name: 'Build extra/gcc/release' - run: make build/extra/gcc-m32/all
run: 'make build/extra/gcc/release' if: ${{ matrix.use_extra }}
- name: 'Build extra/clang/debug' - run: make build/extra/gcc-mx32/all
run: 'make build/extra/clang/debug' if: ${{ matrix.use_extra }}
- name: 'Build extra/clang/release' - run: make build/extra/cross-windows-mingw32/all
run: 'make build/extra/clang/release' if: ${{ matrix.use_extra }}
- name: 'Build extra/gcc-m32/debug' - run: make build/extra/cross-windows-mingw64/all
if: ${{ matrix.use_m32 }} if: ${{ matrix.use_extra }}
run: 'make build/extra/gcc-m32/debug' - name: Make artifact
- name: 'Build extra/gcc-m32/release'
if: ${{ matrix.use_m32 && (success() || failure()) }} # run this step even if the previous step failed
run: 'make build/extra/gcc-m32/release'
- name: 'Build extra/cross-windows-mingw32/release'
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 extra/cross-windows-mingw64/release'
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: | run: |
N=$(echo "upx-${GITHUB_REF_NAME}-${GITHUB_SHA:0:7}-${{ matrix.os }}" | sed 's/[^0-9a-zA-Z_.-]/-/g') N=$(echo "upx-${GITHUB_REF_NAME}-${GITHUB_SHA:0:7}-${{ matrix.os }}" | sed 's/[^0-9a-zA-Z_.-]/-/g')
mkdir -p "tmp/artifact/$N" mkdir -p "tmp/artifact/$N"
(cd build && shopt -s nullglob && cp -ai --parents */upx{,.exe} */*/*/upx{,.exe} "../tmp/artifact/$N") (cd build && shopt -s nullglob && cp -ai --parents */upx{,.exe} */*/*/upx{,.exe} "../tmp/artifact/$N")
(cd tmp/artifact && tar --sort=name -czf "$N.tar.gz" "$N" && rm -rf "./$N") (cd tmp/artifact && tar --sort=name -czf "$N.tar.gz" "$N" && rm -rf "./$N")
# GitHub Actions magic: set "artifact_name" environment value for use in next step
echo "artifact_name=$N" >> $GITHUB_ENV echo "artifact_name=$N" >> $GITHUB_ENV
- name: ${{ format('Upload artifact {0}', env.artifact_name) }} - name: ${{ format('Upload artifact {0}', env.artifact_name) }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with: { name: '${{ env.artifact_name }}', path: tmp/artifact }
name: ${{ env.artifact_name }} - name: Run install tests
path: tmp/artifact
- name: 'Run install tests'
run: | run: |
(cd build/extra/gcc/release && DESTDIR="$PWD/Install with cmake" cmake --install .) (cd build/extra/gcc/release && DESTDIR="$PWD/Install with cmake" cmake --install .)
(cd build/extra/gcc/release && DESTDIR="$PWD/Install with make" make install) (cd build/extra/gcc/release && DESTDIR="$PWD/Install with make" make install)
- name: 'Run ctest tests' - name: Run ctest tests
run: | run: |
jobs="gcc/debug gcc/release clang/debug clang/release" jobs="gcc/debug gcc/release clang/debug clang/release"
test "${{ matrix.use_m32 }}" = "true" && jobs="$jobs gcc-m32/debug gcc-m32/release" test "${{ matrix.use_extra }}" = "true" && jobs="$jobs gcc-m32/debug gcc-m32/release"
command -v wine >/dev/null && jobs="$jobs cross-windows-mingw32/debug cross-windows-mingw32/release"
command -v wine >/dev/null && jobs="$jobs cross-windows-mingw64/debug cross-windows-mingw64/release"
echo "===== parallel jobs: $jobs" echo "===== parallel jobs: $jobs"
CTEST_JOBS=2 parallel -k --lb 'make build/extra/{}+test' ::: $jobs CTEST_JOBS=2 parallel -kv --lb 'make build/extra/{}+test' ::: $jobs
- name: 'Mimic ctest tests' - name: Mimic ctest tests
run: | run: |
jobs="gcc/debug gcc/release clang/debug clang/release" jobs="gcc/debug gcc/release clang/debug clang/release"
test "${{ matrix.use_m32 }}" = "true" && jobs="$jobs gcc-m32/debug gcc-m32/release" test "${{ matrix.use_extra }}" = "true" && jobs="$jobs gcc-m32/debug gcc-m32/release"
echo "===== parallel jobs: $jobs" echo "===== parallel jobs: $jobs"
parallel -k --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/mimic_ctest.sh' ::: $jobs parallel -kv --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/mimic_ctest.sh' ::: $jobs
- name: 'Mimic ctest tests with Valgrind' - name: Mimic ctest tests with Valgrind
if: true # note: valgrind is SLOW if: true # note: valgrind is SLOW
run: | run: |
if command -v valgrind >/dev/null; then if command -v valgrind >/dev/null; then
@@ -155,34 +150,34 @@ jobs:
export upx_exe_runner="valgrind --leak-check=no --error-exitcode=1 --quiet --gen-suppressions=all" export upx_exe_runner="valgrind --leak-check=no --error-exitcode=1 --quiet --gen-suppressions=all"
# clang/debug does not work before valgrind-3.20, see https://bugs.kde.org/show_bug.cgi?id=452758 # clang/debug does not work before valgrind-3.20, see https://bugs.kde.org/show_bug.cgi?id=452758
jobs="gcc/debug gcc/release clang/release" jobs="gcc/debug gcc/release clang/release"
test "${{ matrix.use_m32 }}" = "true" && jobs="$jobs gcc-m32/debug gcc-m32/release" test "${{ matrix.use_extra }}" = "true" && jobs="$jobs gcc-m32/debug gcc-m32/release"
echo "===== parallel jobs: $jobs" echo "===== parallel jobs: $jobs"
parallel -k --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/mimic_ctest.sh' ::: $jobs parallel -kv --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/mimic_ctest.sh' ::: $jobs
fi fi
- name: 'Run file system test suite' - name: Run file system test suite
run: | run: |
jobs="gcc/debug gcc/release clang/debug clang/release" jobs="gcc/debug gcc/release clang/debug clang/release"
test "${{ matrix.use_m32 }}" = "true" && jobs="$jobs gcc-m32/debug gcc-m32/release" test "${{ matrix.use_extra }}" = "true" && jobs="$jobs gcc-m32/debug gcc-m32/release"
echo "===== parallel jobs: $jobs" echo "===== parallel jobs: $jobs"
parallel -k --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/test_symlinks.sh' ::: $jobs parallel -kv --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/test_symlinks.sh' ::: $jobs
- name: 'Run file system test suite with Valgrind' - name: Run file system test suite with Valgrind
if: true # note: valgrind is SLOW if: false # note: valgrind is SLOW
run: | run: |
if command -v valgrind >/dev/null; then if command -v valgrind >/dev/null; then
export upx_exe_runner="valgrind --leak-check=no --error-exitcode=1 --quiet --gen-suppressions=all" export upx_exe_runner="valgrind --leak-check=no --error-exitcode=1 --quiet --gen-suppressions=all"
# clang/debug does not work before valgrind-3.20, see https://bugs.kde.org/show_bug.cgi?id=452758 # clang/debug does not work before valgrind-3.20, see https://bugs.kde.org/show_bug.cgi?id=452758
jobs="gcc/debug gcc/release clang/release" jobs="gcc/debug gcc/release clang/release"
test "${{ matrix.use_m32 }}" = "true" && jobs="$jobs gcc-m32/debug gcc-m32/release" test "${{ matrix.use_extra }}" = "true" && jobs="$jobs gcc-m32/debug gcc-m32/release"
echo "===== parallel jobs: $jobs" echo "===== parallel jobs: $jobs"
parallel -k --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/test_symlinks.sh' ::: $jobs parallel -kv --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/test_symlinks.sh' ::: $jobs
fi fi
- name: 'Run test suite' - name: Run test suite
run: | run: |
export upx_testsuite_SRCDIR="$(readlink -en ../deps/upx-testsuite)" export upx_testsuite_SRCDIR="$(readlink -en ../deps/upx-testsuite)"
jobs="gcc/debug gcc/release clang/debug clang/release" jobs="gcc/debug gcc/release clang/debug clang/release"
test "${{ matrix.use_m32 }}" = "true" && jobs="$jobs gcc-m32/debug gcc-m32/release" test "${{ matrix.use_extra }}" = "true" && jobs="$jobs gcc-m32/debug gcc-m32/release"
echo "===== parallel jobs: $jobs" echo "===== parallel jobs: $jobs"
parallel -k --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/upx_testsuite_1.sh' ::: $jobs parallel -kv --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/upx_testsuite_1.sh' ::: $jobs
job-macos-cmake: # uses cmake + make job-macos-cmake: # uses cmake + make
if: true if: true
@@ -195,19 +190,18 @@ jobs:
include: include:
# NOTE: macos does not have "env -C"; only with brew coreutils # NOTE: macos does not have "env -C"; only with brew coreutils
# NOTE: macos-11 does not have "readlink -f"; only on macos >= 12 or with brew coreutils # NOTE: macos-11 does not have "readlink -f"; only on macos >= 12 or with brew coreutils
- { os: macos-11, gcc: gcc-10, gxx: 'g++-10', testsuite: true } - { os: macos-11, gcc: gcc-10, gxx: g++-10, testsuite: true }
- { os: macos-12, gcc: gcc-11, gxx: 'g++-11', testsuite: true } - { os: macos-12, gcc: gcc-11, gxx: g++-11, testsuite: true }
- { os: macos-13, testsuite: true } # use default Xcode-15 - { os: macos-13, testsuite: true } # use default Xcode-15; NOTE: gcc-12 on macos-13 does not work with Xcode-15
- { os: macos-13, gcc: gcc-12, gxx: 'g++-12', testsuite: true, xcode_version: 14.3.1 } - { os: macos-13, gcc: gcc-12, gxx: g++-12, testsuite: true, xcode_version: 14.3.1 }
# { os: macos-14, gcc: gcc-13, gxx: 'g++-13', testsuite: true } # gcc-13: INTERNAL ERROR in ld64 # { os: macos-14, gcc: gcc-13, gxx: g++-13, testsuite: true } # gcc-13: INTERNAL ERROR in ld64
# { os: macos-14, gcc: gcc-13, gxx: 'g++-13', testsuite: true, xcode_version: 14.3.1 } # gcc-13: MISSING HEADER FILES # { os: macos-14, gcc: gcc-13, gxx: g++-13, testsuite: true, xcode_version: 14.3.1 } # gcc-13: MISSING HEADER FILES
- { os: macos-14, gcc: gcc-12, gxx: 'g++-12', testsuite: true } # => use gcc-12 for now - { os: macos-14, gcc: gcc-12, gxx: g++-12, testsuite: true } # => use gcc-12 for now
steps: steps:
- uses: maxim-lobanov/setup-xcode@v1 - uses: maxim-lobanov/setup-xcode@v1
if: matrix.xcode_version # NOTE: gcc-12 on macos-13 does not work with Xcode-15 if: ${{ matrix.xcode_version }}
with: with: { xcode-version: '${{ matrix.xcode_version }}' }
xcode-version: ${{ matrix.xcode_version }} - name: Install brew packages
- name: 'Install brew packages'
if: ${{ matrix.testsuite }} if: ${{ matrix.testsuite }}
run: | run: |
test -z "$HOMEBREW_PREFIX" && HOMEBREW_PREFIX="$(brew --prefix)" test -z "$HOMEBREW_PREFIX" && HOMEBREW_PREFIX="$(brew --prefix)"
@@ -226,63 +220,49 @@ jobs:
# TODO FIXME: UPX on macos-13+ is broken => disable run-packed for now # TODO FIXME: UPX on macos-13+ is broken => disable run-packed for now
macos-13 | macos-14) echo "UPX_CONFIG_DISABLE_RUN_PACKED_TEST=ON" >> $GITHUB_ENV ;; macos-13 | macos-14) echo "UPX_CONFIG_DISABLE_RUN_PACKED_TEST=ON" >> $GITHUB_ENV ;;
esac esac
- name: 'Check out code' - uses: actions/checkout@v4
uses: actions/checkout@v4
with: { submodules: true } with: { submodules: true }
- name: 'Check out test suite' - name: Check out test suite
if: ${{ matrix.testsuite }} if: ${{ matrix.testsuite }}
run: 'git clone --depth=1 https://github.com/upx/upx-testsuite ../deps/upx-testsuite' run: git clone --depth=1 https://github.com/upx/upx-testsuite ../deps/upx-testsuite
- name: 'Build extra/clang/debug' - run: make build/extra/clang/all
run: 'make build/extra/clang/debug' - name: Build extra/gcc/all
- name: 'Build extra/clang/release' if: ${{ matrix.gcc }}
run: 'make build/extra/clang/release' run: make build/extra/gcc/all CC="${{ matrix.gcc }} -static-libgcc" CXX="${{ matrix.gxx }} -static-libgcc -static-libstdc++"
- name: 'Build extra/gcc/debug' - name: Build xtarget/cross-darwin-arm64/all
if: ${{ matrix.gcc != '' }}
run: 'make build/extra/gcc/debug CC="${{ matrix.gcc }} -static-libgcc" CXX="${{ matrix.gxx }} -static-libgcc -static-libstdc++"'
- name: 'Build extra/gcc/release'
if: ${{ matrix.gcc != '' }}
run: 'make build/extra/gcc/release CC="${{ matrix.gcc }} -static-libgcc" CXX="${{ matrix.gxx }} -static-libgcc -static-libstdc++"'
- name: 'Build xtarget/cross-darwin-arm64/debug'
run: | run: |
make UPX_XTARGET=xtarget/cross-darwin-arm64 xtarget/debug \ make UPX_XTARGET=xtarget/cross-darwin-arm64 xtarget/all \
CC="clang -target arm64-apple-darwin" CXX="clang++ -target arm64-apple-darwin" CC="clang -target arm64-apple-darwin" CXX="clang++ -target arm64-apple-darwin"
- name: 'Build xtarget/cross-darwin-arm64/release' - name: Make artifact
run: |
make UPX_XTARGET=xtarget/cross-darwin-arm64 xtarget/release \
CC="clang -target arm64-apple-darwin" CXX="clang++ -target arm64-apple-darwin"
- name: 'Make artifact'
run: | run: |
X="${{ matrix.xcode_version }}"; test -n "$X" && X="-xcode-$X" X="${{ matrix.xcode_version }}"; test -n "$X" && X="-xcode-$X"
N=$(echo "upx-${GITHUB_REF_NAME}-${GITHUB_SHA:0:7}-${{ matrix.os }}$X" | sed 's/[^0-9a-zA-Z_.-]/-/g') N=$(echo "upx-${GITHUB_REF_NAME}-${GITHUB_SHA:0:7}-${{ matrix.os }}$X" | sed 's/[^0-9a-zA-Z_.-]/-/g')
mkdir -p "tmp/artifact/$N" mkdir -p "tmp/artifact/$N"
(cd build && rsync -R -a */*/*/upx "../tmp/artifact/$N/") (cd build && rsync -R -a */*/*/upx "../tmp/artifact/$N/")
(cd tmp/artifact && gtar --sort=name -czf "$N.tar.gz" "$N" && rm -rf "./$N") (cd tmp/artifact && gtar --sort=name -czf "$N.tar.gz" "$N" && rm -rf "./$N")
# GitHub Actions magic: set "artifact_name" environment value for use in next step
echo "artifact_name=$N" >> $GITHUB_ENV echo "artifact_name=$N" >> $GITHUB_ENV
- name: ${{ format('Upload artifact {0}', env.artifact_name) }} - name: ${{ format('Upload artifact {0}', env.artifact_name) }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with: { name: '${{ env.artifact_name }}', path: tmp/artifact }
name: ${{ env.artifact_name }} - name: Run install tests
path: tmp/artifact
- name: 'Run install tests'
run: | run: |
(cd build/extra/clang/release && DESTDIR="$PWD/Install with cmake" cmake --install .) (cd build/extra/clang/release && DESTDIR="$PWD/Install with cmake" cmake --install .)
(cd build/extra/clang/release && DESTDIR="$PWD/Install with make" make install) (cd build/extra/clang/release && DESTDIR="$PWD/Install with make" make install)
- name: 'Run ctest tests' - name: Run ctest tests
run: | run: |
for f in ./build/extra/*/*/upx; do echo "===== $f"; file $f; $f --sysinfo -v; done for f in ./build/extra/*/*/upx; do file $f; done
jobs="clang/debug clang/release" jobs="clang/debug clang/release"
test -n "${{ matrix.gcc }}" && jobs="$jobs gcc/debug gcc/release" test -n "${{ matrix.gcc }}" && jobs="$jobs gcc/debug gcc/release"
echo "===== parallel jobs: $jobs" echo "===== parallel jobs: $jobs"
CTEST_JOBS=2 parallel -k --lb 'make build/extra/{}+test' ::: $jobs CTEST_JOBS=2 parallel -kv --lb 'make build/extra/{}+test' ::: $jobs
- name: 'Mimic ctest tests' - name: Mimic ctest tests
run: | run: |
export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH" export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH"
jobs="clang/debug clang/release" jobs="clang/debug clang/release"
test -n "${{ matrix.gcc }}" && jobs="$jobs gcc/debug gcc/release" test -n "${{ matrix.gcc }}" && jobs="$jobs gcc/debug gcc/release"
echo "===== parallel jobs: $jobs" echo "===== parallel jobs: $jobs"
parallel -k --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/mimic_ctest.sh' ::: $jobs parallel -kv --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/mimic_ctest.sh' ::: $jobs
- name: 'Run file system test suite' - name: Run file system test suite
if: ${{ matrix.testsuite }} # for coreutils readlink if: ${{ matrix.testsuite }} # for coreutils readlink
run: | run: |
export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH" export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH"
@@ -290,8 +270,8 @@ jobs:
jobs="clang/debug clang/release" jobs="clang/debug clang/release"
test -n "${{ matrix.gcc }}" && jobs="$jobs gcc/debug gcc/release" test -n "${{ matrix.gcc }}" && jobs="$jobs gcc/debug gcc/release"
echo "===== parallel jobs: $jobs" echo "===== parallel jobs: $jobs"
parallel -k --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/test_symlinks.sh' ::: $jobs parallel -kv --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/test_symlinks.sh' ::: $jobs
- name: 'Run test suite' - name: Run test suite
if: ${{ matrix.testsuite }} if: ${{ matrix.testsuite }}
run: | run: |
export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH" export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH"
@@ -299,7 +279,7 @@ jobs:
jobs="clang/debug clang/release" jobs="clang/debug clang/release"
test -n "${{ matrix.gcc }}" && jobs="$jobs gcc/debug gcc/release" test -n "${{ matrix.gcc }}" && jobs="$jobs gcc/debug gcc/release"
echo "===== parallel jobs: $jobs" echo "===== parallel jobs: $jobs"
parallel -k --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/upx_testsuite_1.sh' ::: $jobs parallel -kv --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/upx_testsuite_1.sh' ::: $jobs
job-windows-cmake: # uses cmake + msbuild job-windows-cmake: # uses cmake + msbuild
if: true if: true
@@ -314,39 +294,30 @@ jobs:
- { name: windows-2022-amd64, os: windows-2022, vsversion: 2022, vsarch: amd64 } - { name: windows-2022-amd64, os: windows-2022, vsversion: 2022, vsarch: amd64 }
steps: steps:
- run: git config --global core.autocrlf false - run: git config --global core.autocrlf false
- name: 'Check out code' - uses: actions/checkout@v4
uses: actions/checkout@v4
with: { submodules: true } with: { submodules: true }
- name: 'Check out test suite' - name: Check out test suite
run: 'git clone --depth=1 https://github.com/upx/upx-testsuite ../deps/upx-testsuite' run: git clone --depth=1 https://github.com/upx/upx-testsuite ../deps/upx-testsuite
- name: 'Set up MSVC Developer Command Prompt' - uses: ilammy/msvc-dev-cmd@v1
uses: ilammy/msvc-dev-cmd@v1 with: { vsversion: '${{ matrix.vsversion }}', arch: '${{ matrix.vsarch }}' }
with: - run: make build/debug
vsversion: ${{ matrix.vsversion }} - run: make build/release
arch: ${{ matrix.vsarch }} - name: Make artifact
- name: 'Build debug'
run: 'make build/debug'
- name: 'Build release'
run: 'make build/release'
- name: 'Make artifact'
shell: bash shell: bash
run: | run: |
N=$(echo "upx-${GITHUB_REF_NAME}-${GITHUB_SHA:0:7}-${{ matrix.os }}" | sed 's/[^0-9a-zA-Z_.-]/-/g') N=$(echo "upx-${GITHUB_REF_NAME}-${GITHUB_SHA:0:7}-${{ matrix.os }}" | sed 's/[^0-9a-zA-Z_.-]/-/g')
mkdir -p "tmp/artifact/$N" mkdir -p "tmp/artifact/$N"
(cd build && cp -ai --parents */*/upx.exe "../tmp/artifact/$N") (cd build && cp -ai --parents */*/upx.exe "../tmp/artifact/$N")
# GitHub Actions magic: set "artifact_name" environment value for use in next step
echo "artifact_name=$N" >> $GITHUB_ENV echo "artifact_name=$N" >> $GITHUB_ENV
- name: ${{ format('Upload artifact {0}', env.artifact_name) }} - name: ${{ format('Upload artifact {0}', env.artifact_name) }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with: { name: '${{ env.artifact_name }}', path: tmp/artifact }
name: ${{ env.artifact_name }} - name: Run ctest tests
path: tmp/artifact
- name: 'Run ctest tests'
if: ${{ matrix.vsarch != 'amd64_arm64' }} if: ${{ matrix.vsarch != 'amd64_arm64' }}
run: | run: |
ctest --test-dir build/debug --parallel 8 -C Debug ctest --test-dir build/debug --parallel 8 -C Debug
ctest --test-dir build/release --parallel 8 -C Release ctest --test-dir build/release --parallel 8 -C Release
- name: 'Run test suite build/release' - name: Run test suite build/release
if: ${{ matrix.vsarch != 'amd64_arm64' }} if: ${{ matrix.vsarch != 'amd64_arm64' }}
shell: bash shell: bash
run: | run: |
@@ -375,22 +346,18 @@ jobs:
- { name: i386-win32-vs2022, os: windows-2022, vsversion: 2022, vsarch: amd64_x86 } - { name: i386-win32-vs2022, os: windows-2022, vsversion: 2022, vsarch: amd64_x86 }
steps: steps:
- run: git config --global core.autocrlf false - run: git config --global core.autocrlf false
- name: 'Check out code' - uses: actions/checkout@v4
uses: actions/checkout@v4
with: { submodules: true } with: { submodules: true }
- name: 'Prepare sources and Check out test suite' - name: Prepare sources and Check out test suite
shell: bash shell: bash
run: | run: |
git clone --depth=1 https://github.com/upx/upx-testsuite ../deps/upx-testsuite git clone --depth=1 https://github.com/upx/upx-testsuite ../deps/upx-testsuite
mkdir -p -v build/$C/$B/{bzip2,ucl,upx,zlib,zstd} mkdir -p -v build/$C/$B/{bzip2,ucl,upx,zlib,zstd}
repository_name="${GITHUB_REPOSITORY##*/}" # basename repository_name="${GITHUB_REPOSITORY##*/}" # basename
echo "H=d:\\a\\$repository_name\\$repository_name" >> $GITHUB_ENV echo "H=d:\\a\\$repository_name\\$repository_name" >> $GITHUB_ENV
- name: 'Set up MSVC Developer Command Prompt' - uses: ilammy/msvc-dev-cmd@v1
uses: ilammy/msvc-dev-cmd@v1 with: { vsversion: '${{ matrix.vsversion }}', arch: '${{ matrix.vsarch }}' }
with: - name: Build by hand
vsversion: ${{ matrix.vsversion }}
arch: ${{ matrix.vsarch }}
- name: 'Build by hand'
shell: cmd shell: cmd
run: | run: |
@REM ===== set vars ===== @REM ===== set vars =====
@@ -429,20 +396,17 @@ jobs:
@rem set UPX_LIBS=%BDIR%\bzip2\bzip2.lib %BDIR%\ucl\ucl.lib %BDIR%\zlib\zlib.lib %BDIR%\zstd\zstd.lib @rem set UPX_LIBS=%BDIR%\bzip2\bzip2.lib %BDIR%\ucl\ucl.lib %BDIR%\zlib\zlib.lib %BDIR%\zstd\zstd.lib
set sources=%s%\*.cpp %s%\check\*.cpp %s%\compress\*.cpp %s%\console\*.cpp %s%\filter\*.cpp %s%\util\*.cpp set sources=%s%\*.cpp %s%\check\*.cpp %s%\compress\*.cpp %s%\console\*.cpp %s%\filter\*.cpp %s%\util\*.cpp
%RUN_CL% -J -O2 -W4 -WX -std:c++17 -Zc:__cplusplus -EHsc -DUPX_VERSION_GITREV="""%GITREV%""" %DEFS% %UPX_DEFS% -I%H%\vendor -Feupx.exe %sources% %UPX_LIBS% /link ${{ matrix.link_machine_flags }} setargv.obj %RUN_CL% -J -O2 -W4 -WX -std:c++17 -Zc:__cplusplus -EHsc -DUPX_VERSION_GITREV="""%GITREV%""" %DEFS% %UPX_DEFS% -I%H%\vendor -Feupx.exe %sources% %UPX_LIBS% /link ${{ matrix.link_machine_flags }} setargv.obj
- name: 'Make artifact' - name: Make artifact
shell: bash shell: bash
run: | run: |
N=$(echo "upx-${GITHUB_REF_NAME}-${GITHUB_SHA:0:7}-windows-${{ matrix.name }}" | sed 's/[^0-9a-zA-Z_.-]/-/g') N=$(echo "upx-${GITHUB_REF_NAME}-${GITHUB_SHA:0:7}-windows-${{ matrix.name }}" | sed 's/[^0-9a-zA-Z_.-]/-/g')
mkdir -p "tmp/artifact/$N/$B" mkdir -p "tmp/artifact/$N/$B"
cp -ai build/$C/$B/upx/upx*.exe "tmp/artifact/$N/$B" cp -ai build/$C/$B/upx/upx*.exe "tmp/artifact/$N/$B"
# GitHub Actions magic: set "artifact_name" environment value for use in next step
echo "artifact_name=$N" >> $GITHUB_ENV echo "artifact_name=$N" >> $GITHUB_ENV
- name: ${{ format('Upload artifact {0}', env.artifact_name) }} - name: ${{ format('Upload artifact {0}', env.artifact_name) }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with: { name: '${{ env.artifact_name }}', path: tmp/artifact }
name: ${{ env.artifact_name }} - name: Run basic tests
path: tmp/artifact
- name: 'Run basic tests'
if: ${{ matrix.vsarch != 'amd64_arm64' }} if: ${{ matrix.vsarch != 'amd64_arm64' }}
run: | run: |
$ErrorActionPreference = 'stop' $ErrorActionPreference = 'stop'
@@ -456,7 +420,7 @@ jobs:
.\upx.exe -l upx_packed.exe .\upx.exe -l upx_packed.exe
.\upx.exe -t upx_packed.exe .\upx.exe -t upx_packed.exe
.\upx_packed.exe --version .\upx_packed.exe --version
- name: 'Run test suite' - name: Run test suite
if: ${{ matrix.vsarch != 'amd64_arm64' }} if: ${{ matrix.vsarch != 'amd64_arm64' }}
shell: bash shell: bash
run: | run: |
@@ -468,7 +432,7 @@ jobs:
needs: [ job-rebuild-and-verify-stubs ] needs: [ job-rebuild-and-verify-stubs ]
name: ${{ format('zigcc {0} {1}', matrix.zig_target, matrix.zig_pic) }} name: ${{ format('zigcc {0} {1}', matrix.zig_target, matrix.zig_pic) }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: 'alpine:3.19' container: alpine:3.19
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -511,7 +475,7 @@ jobs:
ZIG_PIC: ${{ matrix.zig_pic }} ZIG_PIC: ${{ matrix.zig_pic }}
ZIG_TARGET: ${{ matrix.zig_target }} ZIG_TARGET: ${{ matrix.zig_target }}
steps: steps:
- name: 'Install Alpine Linux container packages' - name: Install Alpine Linux container packages
if: ${{ job.container }} if: ${{ job.container }}
shell: sh shell: sh
run: | run: |
@@ -520,19 +484,17 @@ jobs:
# set PATH like in Ubuntu # set PATH like in Ubuntu
echo "PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV echo "PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV
git config --global --add safe.directory '*' # needed when running in a container git config --global --add safe.directory '*' # needed when running in a container
- name: 'Check out code' - uses: actions/checkout@v4
uses: actions/checkout@v4
with: { submodules: true } with: { submodules: true }
- name: ${{ format('Install Zig {0}', env.ZIG_DIST_VERSION) }} - name: ${{ format('Install Zig {0}', env.ZIG_DIST_VERSION) }}
shell: bash shell: bash
run: | run: |
# GitHub Actions magic: set "UPX_GITREV_SHORT" environment value for use in steps below
rev=$(git rev-parse --short=7 HEAD) rev=$(git rev-parse --short=7 HEAD)
echo "UPX_GITREV_SHORT=$rev" >> $GITHUB_ENV echo "UPX_GITREV_SHORT=$rev" >> $GITHUB_ENV
# TODO FIXME: UPX bug with self-packed upx + gcompat??
if [[ "${{ matrix.zig_target }}" == x86_64-linux-gnu.2.3.4 ]]; then if [[ "${{ matrix.zig_target }}" == x86_64-linux-gnu.2.3.4 ]]; then
echo "UPX_CONFIG_DISABLE_RUN_PACKED_TEST=ON" >> $GITHUB_ENV
echo "NEED_GCOMPAT=1" >> $GITHUB_ENV echo "NEED_GCOMPAT=1" >> $GITHUB_ENV
# TODO FIXME: problem with self-packed upx and musl+gcompat: "Not a valid dynamic program"
echo "UPX_CONFIG_DISABLE_RUN_PACKED_TEST=ON" >> $GITHUB_ENV
fi fi
# update ZIG_TARGET (i386 => x86) # update ZIG_TARGET (i386 => x86)
ZIG_TARGET=${ZIG_TARGET/i386-/x86-} ZIG_TARGET=${ZIG_TARGET/i386-/x86-}
@@ -572,58 +534,55 @@ jobs:
mkdir -p "tmp/artifact/$N" mkdir -p "tmp/artifact/$N"
(cd build && shopt -s nullglob && cp -ai --parents */upx{,.exe} */*/*/upx{,.exe} "../tmp/artifact/$N") (cd build && shopt -s nullglob && cp -ai --parents */upx{,.exe} */*/*/upx{,.exe} "../tmp/artifact/$N")
(cd tmp/artifact && tar --sort=name -czf "$N.tar.gz" "$N" && rm -rf "./$N") (cd tmp/artifact && tar --sort=name -czf "$N.tar.gz" "$N" && rm -rf "./$N")
# GitHub Actions magic: set "artifact_name" environment value for use in next step
echo "artifact_name=$N" >> $GITHUB_ENV echo "artifact_name=$N" >> $GITHUB_ENV
- name: ${{ format('Upload artifact {0}', env.artifact_name) }} - name: ${{ format('Upload artifact {0}', env.artifact_name) }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with: { name: '${{ env.artifact_name }}', path: tmp/artifact }
name: ${{ env.artifact_name }} - name: Run install tests
path: tmp/artifact
- name: 'Run install tests'
if: ${{ contains(matrix.zig_target, '-linux') }} if: ${{ contains(matrix.zig_target, '-linux') }}
run: | run: |
(cd build/zig/${ZIG_TARGET}${ZIG_PIC}/release && DESTDIR="$PWD/Install with cmake" cmake --install .) (cd build/zig/${ZIG_TARGET}${ZIG_PIC}/release && DESTDIR="$PWD/Install with cmake" cmake --install .)
(cd build/zig/${ZIG_TARGET}${ZIG_PIC}/release && DESTDIR="$PWD/Install with make" make install) (cd build/zig/${ZIG_TARGET}${ZIG_PIC}/release && DESTDIR="$PWD/Install with make" make install)
- name: 'Run ctest tests' - name: Run ctest tests
if: ${{ matrix.zig_target == 'i386-linux-musl' || matrix.zig_target == 'x86_64-linux-musl' || matrix.zig_target == 'x86_64-linux-gnu.2.3.4' }} if: ${{ matrix.zig_target == 'i386-linux-musl' || matrix.zig_target == 'x86_64-linux-musl' || matrix.zig_target == 'x86_64-linux-gnu.2.3.4' }}
run: | run: |
test -z "$NEED_GCOMPAT" || apk add gcompat test -n "$NEED_GCOMPAT" && apk add gcompat
jobs="${ZIG_TARGET}${ZIG_PIC}/debug ${ZIG_TARGET}${ZIG_PIC}/release" jobs="${ZIG_TARGET}${ZIG_PIC}/debug ${ZIG_TARGET}${ZIG_PIC}/release"
echo "===== parallel jobs: $jobs" echo "===== parallel jobs: $jobs"
parallel -k --lb 'make build/zig/{}+test' ::: $jobs parallel -kv --lb 'make build/zig/{}+test' ::: $jobs
- name: 'Mimic ctest tests' - name: Mimic ctest tests
if: ${{ matrix.zig_target == 'i386-linux-musl' || matrix.zig_target == 'x86_64-linux-musl' || matrix.zig_target == 'x86_64-linux-gnu.2.3.4' }} if: ${{ matrix.zig_target == 'i386-linux-musl' || matrix.zig_target == 'x86_64-linux-musl' || matrix.zig_target == 'x86_64-linux-gnu.2.3.4' }}
run: | run: |
test -z "$NEED_GCOMPAT" || apk add gcompat test -n "$NEED_GCOMPAT" && apk add gcompat
jobs="${ZIG_TARGET}${ZIG_PIC}/debug ${ZIG_TARGET}${ZIG_PIC}/release" jobs="${ZIG_TARGET}${ZIG_PIC}/debug ${ZIG_TARGET}${ZIG_PIC}/release"
echo "===== parallel jobs: $jobs" echo "===== parallel jobs: $jobs"
parallel -k --lb 'cd build/zig/{} && bash ../../../../misc/testsuite/mimic_ctest.sh' ::: $jobs parallel -kv --lb 'cd build/zig/{} && bash ../../../../misc/testsuite/mimic_ctest.sh' ::: $jobs
- name: ${{ format('Mimic ctest tests with QEMU {0}', matrix.qemu) }} - name: ${{ format('Mimic ctest tests with QEMU {0}', matrix.qemu) }}
if: ${{ matrix.qemu }} if: ${{ matrix.qemu }}
run: | run: |
qemu="${{ matrix.qemu }}" qemu="${{ matrix.qemu }}"
apk add coreutils "${qemu%% *}" apk add coreutils "${qemu%% *}"
test -z "$NEED_GCOMPAT" || apk add gcompat test -n "$NEED_GCOMPAT" && apk add gcompat
export upx_exe_runner="$qemu" export upx_exe_runner="$qemu"
jobs="${ZIG_TARGET}${ZIG_PIC}/debug ${ZIG_TARGET}${ZIG_PIC}/release" jobs="${ZIG_TARGET}${ZIG_PIC}/debug ${ZIG_TARGET}${ZIG_PIC}/release"
echo "===== parallel jobs: $jobs" echo "===== parallel jobs: $jobs"
parallel -k --lb 'cd build/zig/{} && bash ../../../../misc/testsuite/mimic_ctest.sh' ::: $jobs parallel -kv --lb 'cd build/zig/{} && bash ../../../../misc/testsuite/mimic_ctest.sh' ::: $jobs
- name: 'Mimic ctest tests with Valgrind' - name: Mimic ctest tests with Valgrind
if: ${{ matrix.zig_target == 'x86_64-linux-musl' || matrix.zig_target == 'x86_64-linux-gnu.2.3.4' }} if: ${{ matrix.zig_target == 'x86_64-linux-musl' || matrix.zig_target == 'x86_64-linux-gnu.2.3.4' }}
run: | run: |
export UPX_CONFIG_DISABLE_EXHAUSTIVE_TESTS=ON # valgrind is SLOW export UPX_CONFIG_DISABLE_EXHAUSTIVE_TESTS=ON # valgrind is SLOW
apk add coreutils valgrind apk add coreutils valgrind
test -z "$NEED_GCOMPAT" || apk add gcompat test -n "$NEED_GCOMPAT" && apk add gcompat
export upx_exe_runner="valgrind --leak-check=no --error-exitcode=1 --quiet --gen-suppressions=all" export upx_exe_runner="valgrind --leak-check=no --error-exitcode=1 --quiet --gen-suppressions=all"
upx_exe_runner="$upx_exe_runner --suppressions=$PWD/misc/valgrind/musl.supp" upx_exe_runner="$upx_exe_runner --suppressions=$PWD/misc/valgrind/musl.supp"
jobs="${ZIG_TARGET}${ZIG_PIC}/debug ${ZIG_TARGET}${ZIG_PIC}/release" jobs="${ZIG_TARGET}${ZIG_PIC}/debug ${ZIG_TARGET}${ZIG_PIC}/release"
echo "===== parallel jobs: $jobs" echo "===== parallel jobs: $jobs"
parallel -k --lb 'cd build/zig/{} && bash ../../../../misc/testsuite/mimic_ctest.sh' ::: $jobs parallel -kv --lb 'cd build/zig/{} && bash ../../../../misc/testsuite/mimic_ctest.sh' ::: $jobs
- name: 'Run file system test suite' - name: Run file system test suite
if: ${{ matrix.zig_target == 'i386-linux-musl' || matrix.zig_target == 'x86_64-linux-musl' || matrix.zig_target == 'x86_64-linux-gnu.2.3.4' }} if: ${{ matrix.zig_target == 'i386-linux-musl' || matrix.zig_target == 'x86_64-linux-musl' || matrix.zig_target == 'x86_64-linux-gnu.2.3.4' }}
run: | run: |
apk add coreutils sudo apk add coreutils sudo
test -z "$NEED_GCOMPAT" || apk add gcompat test -n "$NEED_GCOMPAT" && apk add gcompat
jobs="${ZIG_TARGET}${ZIG_PIC}/debug ${ZIG_TARGET}${ZIG_PIC}/release" jobs="${ZIG_TARGET}${ZIG_PIC}/debug ${ZIG_TARGET}${ZIG_PIC}/release"
echo "===== parallel jobs: $jobs" echo "===== parallel jobs: $jobs"
parallel -k --lb 'cd build/zig/{} && chmod a+w . && sudo -u nobody bash ../../../../misc/testsuite/test_symlinks.sh' ::: $jobs parallel -kv --lb 'cd build/zig/{} && chmod a+w . && sudo -u nobody bash ../../../../misc/testsuite/test_symlinks.sh' ::: $jobs
+1 -1
View File
@@ -495,7 +495,7 @@ upx_print_var(CMAKE_VERSION UPX_CONFIG_CMAKE_MINIMUM_REQUIRED_VERSION CMAKE_GENE
if(NOT UPX_CONFIG_CMAKE_DISABLE_PRINT_INFO) if(NOT UPX_CONFIG_CMAKE_DISABLE_PRINT_INFO)
include("${CMAKE_CURRENT_SOURCE_DIR}/misc/cmake/print_info.cmake") include("${CMAKE_CURRENT_SOURCE_DIR}/misc/cmake/print_info.cmake")
endif() endif()
upx_print_var(CMAKE_INSTALL_PREFIX CMAKE_CONFIGURATION_TYPES CMAKE_BUILD_TYPE) upx_print_var(CMAKE_INSTALL_PREFIX CMAKE_CONFIGURATION_TYPES CMAKE_TRY_COMPILE_CONFIGURATION CMAKE_BUILD_TYPE)
if(Threads_FOUND) if(Threads_FOUND)
message(STATUS "WITH_THREADS = 1") message(STATUS "WITH_THREADS = 1")
elseif(UPX_CONFIG_REQUIRE_THREADS) elseif(UPX_CONFIG_REQUIRE_THREADS)
+1 -1
View File
@@ -113,7 +113,7 @@ function(upx_print_env_var) # ARGV
foreach(var_name ${ARGV}) foreach(var_name ${ARGV})
if(DEFINED ENV{${var_name}}) if(DEFINED ENV{${var_name}})
if(NOT ",$ENV{${var_name}}," STREQUAL ",,") if(NOT ",$ENV{${var_name}}," STREQUAL ",,")
message(STATUS "ENV{${var_name}} = $ENV{${var_name}}") message(STATUS "ENV{${var_name}} = '$ENV{${var_name}}'")
endif() endif()
endif() endif()
endforeach() endforeach()
+1 -1
View File
@@ -40,7 +40,7 @@ foreach(lang IN ITEMS ASM C CXX)
endforeach() endforeach()
# misc # misc
upx_print_var(CMAKE_INTERPROCEDURAL_OPTIMIZATION CMAKE_POSITION_INDEPENDENT_CODE CMAKE_TRY_COMPILE_CONFIGURATION) upx_print_var(CMAKE_INTERPROCEDURAL_OPTIMIZATION CMAKE_POSITION_INDEPENDENT_CODE)
# shortcuts # shortcuts
upx_print_var(APPLE CLANG CYGWIN GNU_FRONTEND GNUC MINGW MSVC MSVC_FRONTEND MSVC_IDE MSVC_TOOLSET_VERSION MSVC_VERSION MSYS UNIX WIN32 WIN64) upx_print_var(APPLE CLANG CYGWIN GNU_FRONTEND GNUC MINGW MSVC MSVC_FRONTEND MSVC_IDE MSVC_TOOLSET_VERSION MSVC_VERSION MSYS UNIX WIN32 WIN64)
+1 -1
View File
@@ -290,8 +290,8 @@ UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_CROSSCOMPILING_EMULATO
# pass UPX config options; see CMakeLists.txt # pass UPX config options; see CMakeLists.txt
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_GITREV) UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_GITREV)
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_SANITIZE) UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_SANITIZE)
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_WSTRICT)
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_WERROR) UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_WERROR)
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_WSTRICT)
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_SELF_PACK_TEST) UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_SELF_PACK_TEST)
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_EXHAUSTIVE_TESTS) UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_EXHAUSTIVE_TESTS)
# pass UPX extra compile options; see CMakeLists.txt # pass UPX extra compile options; see CMakeLists.txt
+1 -1
View File
@@ -30,7 +30,7 @@ for v in CMAKE_SYSTEM_NAME CMAKE_SYSTEM_PROCESSOR CMAKE_CROSSCOMPILING_EMULATOR;
__add_cmake_config $v __add_cmake_config $v
done done
# pass UPX config options; see CMakeLists.txt # pass UPX config options; see CMakeLists.txt
for v in UPX_CONFIG_DISABLE_GITREV UPX_CONFIG_DISABLE_SANITIZE UPX_CONFIG_DISABLE_WSTRICT UPX_CONFIG_DISABLE_WERROR UPX_CONFIG_DISABLE_SELF_PACK_TEST; do for v in UPX_CONFIG_DISABLE_GITREV UPX_CONFIG_DISABLE_SANITIZE UPX_CONFIG_DISABLE_WERROR UPX_CONFIG_DISABLE_WSTRICT UPX_CONFIG_DISABLE_SELF_PACK_TEST UPX_CONFIG_DISABLE_EXHAUSTIVE_TESTS; do
__add_cmake_config $v __add_cmake_config $v
done done
# pass UPX extra compile options; see CMakeLists.txt # pass UPX extra compile options; see CMakeLists.txt