1
0
mirror of https://github.com/upx/upx synced 2025-10-05 19:20:23 +08:00

CI updates

This commit is contained in:
Markus F.X.J. Oberhumer 2023-08-27 13:30:51 +02:00
parent b526eed346
commit 25a3c109c1
24 changed files with 59 additions and 42 deletions

View File

@ -12,8 +12,8 @@ env:
CMAKE_REQUIRED_QUIET: OFF
DEBIAN_FRONTEND: noninteractive
UPX_CMAKE_BUILD_FLAGS: --verbose
# 2023-08-22
ZIG_DIST_VERSION: 0.12.0-dev.157+8e96be008
# 2023-08-26
ZIG_DIST_VERSION: 0.12.0-dev.170+750998eef
jobs:
job-rebuild-and-verify-stubs:
@ -57,7 +57,7 @@ jobs:
if ! git diff --quiet; then git diff; exit 1; fi
job-linux-cmake: # uses cmake + make
if: ${{ true }}
if: true
needs: [ job-rebuild-and-verify-stubs ]
name: ${{ format('{0} cmake', matrix.os) }}
runs-on: ${{ matrix.os }}
@ -134,7 +134,7 @@ jobs:
env -C build/extra/gcc/release upx_exe=./upx bash "$testsuite_1"
job-macos-cmake: # uses cmake + make
if: ${{ true }}
if: true
needs: [ job-rebuild-and-verify-stubs ]
name: ${{ format('{0} cmake', matrix.os) }}
runs-on: ${{ matrix.os }}
@ -210,7 +210,7 @@ jobs:
env -C build/extra/clang/release upx_exe=./upx bash "$testsuite_1"
job-windows-cmake: # uses cmake + msbuild
if: ${{ true }}
if: true
needs: [ job-rebuild-and-verify-stubs ]
name: ${{ format('{0} cmake', matrix.name) }}
runs-on: ${{ matrix.os }}
@ -265,7 +265,7 @@ jobs:
env -C build/release/Release upx_exe=./upx bash "$testsuite_1"
job-windows-toolchains: # build "by hand" using cmd.exe
if: ${{ true }}
if: true
needs: [ job-rebuild-and-verify-stubs ]
name: ${{ format('windows {0}', matrix.name) }}
runs-on: ${{ matrix.os }}
@ -372,7 +372,7 @@ jobs:
env -C build/$C/$B/upx upx_exe=./upx.exe bash "$testsuite_1"
job-linux-zigcc: # uses cmake + make
if: ${{ true }}
if: github.repository_owner == 'upx'
needs: [ job-rebuild-and-verify-stubs ]
name: ${{ format('zigcc {0} {1}', matrix.zig_target, matrix.zig_pic) }}
runs-on: ubuntu-latest
@ -485,5 +485,3 @@ jobs:
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-make make install)
# vim:set ts=2 sw=2 et:

View File

@ -17,7 +17,8 @@ on:
schedule: [cron: '50 0 * * 3'] # run weekly Wednesday 00:50 UTC
workflow_dispatch:
jobs:
close-issues:
job-close-inactive-issues:
if: github.repository_owner == 'upx'
name: 'Close inactive issues'
runs-on: ubuntu-latest
permissions:

View File

@ -4,7 +4,8 @@ on:
#pull_request:
workflow_dispatch:
jobs:
close-pull-requests:
job-close-pull-requests:
if: github.repository_owner == 'upx'
name: 'Close pull requests'
runs-on: ubuntu-latest
permissions:

View File

@ -9,6 +9,7 @@ env:
DEBIAN_FRONTEND: noninteractive
jobs:
job-spell-check:
if: github.repository_owner == 'upx'
name: 'Spell check'
runs-on: ubuntu-latest
steps:

View File

@ -10,6 +10,7 @@ env:
jobs:
job-analyze-clang-analyzer: # uses cmake + make
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix: {container: ['alpine:3.16','alpine:3.17','alpine:3.18','alpine:edge','i386/alpine:edge']}

View File

@ -10,9 +10,10 @@ env:
jobs:
job-analyze-clang-tidy: # uses cmake + make
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix: {container: ['alpine:edge','i386/alpine:edge']}
matrix: {container: ['alpine:3.18','alpine:edge','i386/alpine:edge']}
name: ${{ format('Analyze clang-tidy {0}', matrix.container) }}
runs-on: ubuntu-latest
container: ${{ matrix.container }}

View File

@ -10,6 +10,7 @@ env:
jobs:
job-analyze-codeql:
if: github.repository_owner == 'upx'
name: Analyze
runs-on: ubuntu-latest
permissions:

View File

@ -11,7 +11,7 @@ env:
jobs:
job-alpine-clang: # uses cmake + make
if: ${{ true }}
if: true
strategy: { matrix: { container: ['alpine:edge','i386/alpine:edge'] } }
name: ${{ format('clang {0}', matrix.container) }}
runs-on: ubuntu-latest
@ -38,7 +38,7 @@ jobs:
path: 'upx*/build/*/upx'
job-alpine-gcc: # uses cmake + make
if: ${{ true }}
if: true
strategy: { matrix: { container: ['alpine:edge','i386/alpine:edge'] } }
name: ${{ format('gcc {0}', matrix.container) }}
runs-on: ubuntu-latest

View File

@ -8,7 +8,7 @@ env:
jobs:
job-unused: # uses cmake + make
if: ${{ true }}
if: true
runs-on: ubuntu-latest
steps:
- run: |

View File

@ -13,7 +13,7 @@ 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: ${{ true }}
if: github.repository_owner == 'upx'
strategy: { matrix: { container: ['alpine:3.9','alpine:edge'] } }
name: ${{ format('gcc by-hand {0}', matrix.container) }}
runs-on: ubuntu-latest

View File

@ -11,6 +11,7 @@ env:
jobs:
job-cmake-macos-xcode: # uses cmake + xcodebuild
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix:

View File

@ -13,6 +13,7 @@ env:
jobs:
job-cmake-windows-nmake: # uses cmake + nmake
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix:

View File

@ -21,6 +21,7 @@ env:
jobs:
job-alpine-cmake: # uses cmake + make
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix: { container: ['alpine:3.9','alpine:3.10','alpine:3.11','alpine:3.12','alpine:3.13','alpine:3.14','alpine:3.15','alpine:3.16','alpine:3.17','alpine:3.18','alpine:edge','i386/alpine:edge'] }
@ -155,5 +156,3 @@ jobs:
export upx_testsuite_SRCDIR="$(readlink -fn "upx-testsuite with space")"
testsuite_1="$(readlink -fn "upx with space"/misc/testsuite/upx_testsuite_1.sh)"
(cd "upx with space"/build/xtarget/gcc-static/release && upx_exe=./upx bash "$testsuite_1")
# vim:set ts=2 sw=2 et:

View File

@ -13,7 +13,7 @@ env:
jobs:
job-llvm-mingw: # uses cmake+make
if: ${{ true }}
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix:
@ -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-20230811-msvcrt
llvm_version: 17.0.0rc2
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20230811/llvm-mingw-20230811-msvcrt-ubuntu-20.04-x86_64.tar.xz'
- name: llvm-mingw-20230811-ucrt
llvm_version: 17.0.0rc2
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20230811/llvm-mingw-20230811-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: ${{ format('{0} {1}', matrix.name, matrix.llvm_version) }}
runs-on: ubuntu-latest
steps:

View File

@ -10,11 +10,12 @@ on:
env:
CMAKE_REQUIRED_QUIET: OFF
DEBIAN_FRONTEND: noninteractive
# 2023-08-22
ZIG_DIST_VERSION: 0.12.0-dev.157+8e96be008
# 2023-08-26
ZIG_DIST_VERSION: 0.12.0-dev.170+750998eef
jobs:
job-linux-zigcc: # uses cmake + make
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix:
@ -125,5 +126,3 @@ jobs:
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-make make install)
# vim:set ts=2 sw=2 et:

View File

@ -13,6 +13,7 @@ env:
jobs:
job-runtime-checkers: # uses cmake + make
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix:
@ -93,7 +94,7 @@ jobs:
export upx_exe_runner="${{ matrix.qemu }}"
env -C build/xtarget/clang-static/$release "$PWD"/misc/testsuite/upx_testsuite_1.sh
- name: 'Run testsuite clang-static - Valgrind'
if: ${{ true }} # very slow
if: true # very slow
run: |
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

2
doc/upx.1 generated
View File

@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "UPX 1"
.TH UPX 1 "2023-08-08" "upx 4.2.0" " "
.TH UPX 1 "2023-08-25" "upx 4.2.0" " "
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -117,7 +117,7 @@ struct TestTriBool {
static_assert(sizeof(typename T::value_type) == sizeof(typename T::underlying_type));
static_assert(alignof(typename T::value_type) == alignof(typename T::underlying_type));
#if (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC) && defined(__MINT__)
// broken compiler
// broken compiler or broken ABI
#else
static_assert(sizeof(T) == sizeof(typename T::underlying_type));
static_assert(alignof(T) == alignof(typename T::underlying_type));
@ -127,6 +127,14 @@ struct TestTriBool {
static_assert(T(T::False) == T::False);
static_assert(T(T::True) == T::True);
static_assert(T(T::Third) == T::Third);
static_assert(T(T::Third) == T(9));
static_assert(T(8) == T(9));
static_assert(!(T(0) == T(9)));
static_assert(!(T(1) == T(9)));
static_assert(T(T::Third) == 9);
static_assert(T(8) == 9);
static_assert(!(T(0) == 9));
static_assert(!(T(1) == 9));
constexpr T array[] = {false, true, T::Third};
static_assert(array[0].isStrictFalse());
static_assert(array[1].isStrictTrue());

View File

@ -95,7 +95,7 @@ template <class T>
inline constexpr bool upx_is_integral_v = upx_is_integral<T>::value;
#if (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC) && defined(__MINT__)
// horrible hack for broken compiler
// horrible hack for broken compiler / ABI
#define upx_fake_alignas_1 __attribute__((__aligned__(1),__packed__))
#define upx_fake_alignas_16 __attribute__((__aligned__(2))) // object file maximum 2 ???
#define upx_fake_alignas__(x) upx_fake_alignas_ ## x

View File

@ -104,7 +104,7 @@ struct PackerNames {
const Options *o;
PackerNames() : names_count(0), o(nullptr) {}
void add(const PackerBase *pb) {
assert(names_count < 64);
assert_noexcept(names_count < 64);
names[names_count].fname = pb->getFullName(o);
names[names_count].sname = pb->getName();
names_count++;

View File

@ -57,13 +57,13 @@ public:
virtual const int *getCompressionMethods(int method, int level) const = 0;
virtual const int *getFilters() const = 0;
// canPack() should throw a cantPackException eplaining why it cannot pack
// canPack() should throw a cantPackException explaining why it cannot pack
// a recognized format.
// canPack() can return -1 to fail early; see class PackMaster
// canPack() can also return -1 to fail early; see class PackMaster
virtual tribool canPack() = 0;
// canUnpack() should throw a cantUnpackException eplaining why it cannot pack
// canUnpack() should throw a cantUnpackException explaining why it cannot pack
// a recognized format.
// canUnpack() can return -1 to fail early; see class PackMaster
// canUnpack() can also return -1 to fail early; see class PackMaster
virtual tribool canUnpack() = 0;
// PackMaster entries
@ -80,7 +80,7 @@ protected:
InputFile *const fi; // reference
union { // unnamed union
const upx_int64_t file_size; // must get set by constructor
const upx_uint64_t file_size_u; // explicitly unsigned
const upx_uint64_t file_size_u; // (explicitly unsigned)
};
PackHeader ph; // must be filled by canUnpack(); also used by UiPacker
};

View File

@ -65,6 +65,7 @@ PackMaster::PackMaster(InputFile *f, Options *o) noexcept : fi(f) {
// replace global options with local options
if (o != nullptr) {
#if WITH_THREADS
// TODO later: check for possible "noexcept" violation here
std::lock_guard<std::mutex> lock(opt_lock_mutex);
#endif
saved_opt = o;
@ -78,6 +79,7 @@ PackMaster::~PackMaster() noexcept {
// restore global options
if (saved_opt != nullptr) {
#if WITH_THREADS
// TODO later: check for possible "noexcept" violation here
std::lock_guard<std::mutex> lock(opt_lock_mutex);
#endif
opt = saved_opt;

View File

@ -121,7 +121,9 @@ struct TriBool final {
// equality
constexpr bool operator==(TriBool other) const noexcept { return value == other.value; }
constexpr bool operator==(value_type other) const noexcept { return value == other; }
constexpr bool operator==(promoted_type other) const noexcept { return value == other; }
constexpr bool operator==(promoted_type other) const noexcept {
return value == TriBool(other).value;
}
// "Third" can mean many things, depending on usage context, so provide some alternative names:
// constexpr bool isDefault() const noexcept { return isThird(); } // might be misleading

View File

@ -1,6 +1,6 @@
#define UPX_VERSION_HEX 0x040200 /* 04.02.00 */
#define UPX_VERSION_STRING "4.2.0"
#define UPX_VERSION_STRING4 "4.20"
#define UPX_VERSION_DATE "Aug 8th 2023"
#define UPX_VERSION_DATE_ISO "2023-08-08"
#define UPX_VERSION_DATE "Aug 25th 2023"
#define UPX_VERSION_DATE_ISO "2023-08-25"
#define UPX_VERSION_YEAR "2023"