diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 645f9533..79f52659 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ env: DEBIAN_FRONTEND: noninteractive UPX_CMAKE_BUILD_FLAGS: --verbose # 2023-10-30 - ZIG_DIST_VERSION: 0.12.0-dev.1349+fa022d1ec + ZIG_DIST_VERSION: 0.12.0-dev.1350+91e117697 jobs: job-rebuild-and-verify-stubs: diff --git a/.github/workflows/static-analyzer-clang-analyzer.yml b/.github/workflows/static-analyzer-clang-analyzer.yml index 3d3f6ca6..4e3ea4e4 100644 --- a/.github/workflows/static-analyzer-clang-analyzer.yml +++ b/.github/workflows/static-analyzer-clang-analyzer.yml @@ -14,7 +14,14 @@ jobs: 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']} + matrix: + include: + - container: 'alpine:3.16' + - container: 'alpine:3.17' + - container: 'alpine:3.18' + - container: 'alpine:edge' + - container: 'i386/alpine:3.18' + - container: 'i386/alpine:edge' name: ${{ format('Analyze clang-analyzer {0}', matrix.container) }} runs-on: ubuntu-latest container: ${{ matrix.container }} diff --git a/.github/workflows/static-analyzer-clang-tidy.yml b/.github/workflows/static-analyzer-clang-tidy.yml index 34039f0c..58779f23 100644 --- a/.github/workflows/static-analyzer-clang-tidy.yml +++ b/.github/workflows/static-analyzer-clang-tidy.yml @@ -14,7 +14,12 @@ jobs: if: github.repository_owner == 'upx' strategy: fail-fast: false - matrix: {container: ['alpine:3.18','alpine:edge','i386/alpine:edge']} + matrix: + include: + - container: 'alpine:3.18' + - container: 'alpine:edge' + - container: 'i386/alpine:3.18' + - container: 'i386/alpine:edge' name: ${{ format('Analyze clang-tidy {0}', matrix.container) }} runs-on: ubuntu-latest container: ${{ matrix.container }} diff --git a/.github/workflows/test-alpine-linux.yml b/.github/workflows/test-alpine-linux.yml index 344f16e2..f88a5692 100644 --- a/.github/workflows/test-alpine-linux.yml +++ b/.github/workflows/test-alpine-linux.yml @@ -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.1.0/upx-4.1.0-src.tar.xz + wget https://github.com/upx/upx/releases/download/v4.2.0/upx-4.2.0-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.1.0/upx-4.1.0-src.tar.xz + wget https://github.com/upx/upx/releases/download/v4.2.0/upx-4.2.0-src.tar.xz tar -xoaf upx-*-src.tar.xz cd upx-*-src make build/debug CC="gcc -static" CXX="g++ -static" diff --git a/.github/workflows/test-yaml-check.yml b/.github/workflows/test-yaml-check.yml new file mode 100644 index 00000000..8b355645 --- /dev/null +++ b/.github/workflows/test-yaml-check.yml @@ -0,0 +1,33 @@ +# Copyright (C) Markus Franz Xaver Johannes Oberhumer + +name: 'Test - YAML check' +on: [workflow_dispatch] +env: + CMAKE_REQUIRED_QUIET: "OFF" + CTEST_OUTPUT_ON_FAILURE: "ON" + DEBIAN_FRONTEND: noninteractive + +jobs: + job-yaml-check: + if: true + strategy: { matrix: { container: ['alpine:3.18','alpine:edge'] } } + name: ${{ format('{0}', matrix.container) }} + runs-on: ubuntu-latest + container: ${{ matrix.container }} + steps: + - name: ${{ format('Install packages {0}', matrix.container) }} + run: | + apk update && apk upgrade && apk add bash git yq ytt + # 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: false } + - name: ${{ format('YAML check {0}', matrix.container) }} + shell: bash + run: | + for f in $(find . -type f -iname '*.yml'); do + echo "===== checking file $f" + yq < "$f" > /dev/null + ytt -f- < "$f" > /dev/null + done diff --git a/.github/workflows/weekly-ci-cc-zigcc.yml b/.github/workflows/weekly-ci-cc-zigcc.yml index 1d4ae9bd..1bfa9add 100644 --- a/.github/workflows/weekly-ci-cc-zigcc.yml +++ b/.github/workflows/weekly-ci-cc-zigcc.yml @@ -12,7 +12,7 @@ env: CTEST_OUTPUT_ON_FAILURE: "ON" DEBIAN_FRONTEND: noninteractive # 2023-10-30 - ZIG_DIST_VERSION: 0.12.0-dev.1349+fa022d1ec + ZIG_DIST_VERSION: 0.12.0-dev.1350+91e117697 jobs: job-linux-zigcc: # uses cmake + make @@ -21,17 +21,18 @@ jobs: fail-fast: false matrix: include: + # zig BUG: -fPIE is currently broken - { zig_target: aarch64-linux-musl } - - { zig_target: aarch64-linux-musl, zig_pic: -fPIE } + # { zig_target: aarch64-linux-musl, zig_pic: -fPIE } - { zig_target: aarch64-macos-none } - { zig_target: aarch64-macos.11.0-none } - { zig_target: aarch64-macos.12.0-none } - { zig_target: aarch64-macos.13.0-none } - { zig_target: aarch64-windows-gnu } - { zig_target: arm-linux-musleabihf } - - { zig_target: arm-linux-musleabihf, zig_pic: -fPIE } + # { zig_target: arm-linux-musleabihf, zig_pic: -fPIE } - { zig_target: i386-linux-musl } - - { zig_target: i386-linux-musl, zig_pic: -fPIE } + # { zig_target: i386-linux-musl, zig_pic: -fPIE } - { zig_target: i386-windows-gnu } - { zig_target: mips-linux-musl } - { zig_target: mipsel-linux-musl } @@ -39,7 +40,7 @@ jobs: - { zig_target: powerpc64-linux-musl } - { zig_target: powerpc64le-linux-musl } - { zig_target: x86_64-linux-musl } - - { zig_target: x86_64-linux-musl, zig_pic: -fPIE } + # { zig_target: x86_64-linux-musl, zig_pic: -fPIE } - { zig_target: x86_64-macos-none } - { zig_target: x86_64-macos.11.0-none } - { zig_target: x86_64-macos.12.0-none } diff --git a/.github/workflows/weekly-ci-rt-checkers.yml b/.github/workflows/weekly-ci-rt-checkers.yml index 364233a3..9108fc71 100644 --- a/.github/workflows/weekly-ci-rt-checkers.yml +++ b/.github/workflows/weekly-ci-rt-checkers.yml @@ -19,18 +19,10 @@ jobs: fail-fast: false matrix: include: - - container: 'alpine:3.18' - release: debug - qemu: 'qemu-x86_64 -cpu Westmere' - - container: 'alpine:3.18' - release: release - qemu: 'qemu-x86_64 -cpu Westmere' - - container: 'alpine:edge' - release: release - qemu: 'qemu-x86_64 -cpu Westmere' - - container: 'i386/alpine:edge' - release: release - qemu: 'qemu-i386' + - { container: 'alpine:3.18', release: debug, qemu: 'qemu-x86_64 -cpu Westmere' } + - { container: 'alpine:3.18', release: release, qemu: 'qemu-x86_64 -cpu Westmere' } + - { container: 'alpine:edge', release: release, qemu: 'qemu-x86_64 -cpu Westmere' } + - { container: 'i386/alpine:edge', release: release, qemu: 'qemu-i386' } name: ${{ format('{0} {1}', matrix.container, matrix.release) }} runs-on: ubuntu-latest container: ${{ matrix.container }} diff --git a/src/util/xspan_impl_ptr_or_null.h b/src/util/xspan_impl_ptr_or_null.h index 558bcce5..d8881557 100644 --- a/src/util/xspan_impl_ptr_or_null.h +++ b/src/util/xspan_impl_ptr_or_null.h @@ -42,8 +42,13 @@ private: #define CSelf PtrOrSpanOrNull typedef CSelf Self; // core config +#if __cplusplus >= 201103L + static constexpr bool configRequirePtr = false; + static constexpr bool configRequireBase = false; +#else enum { configRequirePtr = false }; enum { configRequireBase = false }; +#endif #include "xspan_impl_common.h" public: diff --git a/src/util/xspan_impl_ptr_or_span.h b/src/util/xspan_impl_ptr_or_span.h index f3f1569f..89fde31f 100644 --- a/src/util/xspan_impl_ptr_or_span.h +++ b/src/util/xspan_impl_ptr_or_span.h @@ -42,8 +42,13 @@ private: #define CSelf PtrOrSpan typedef CSelf Self; // core config +#if __cplusplus >= 201103L + static constexpr bool configRequirePtr = true; + static constexpr bool configRequireBase = false; +#else enum { configRequirePtr = true }; enum { configRequireBase = false }; +#endif #include "xspan_impl_common.h" public: diff --git a/src/util/xspan_impl_span.h b/src/util/xspan_impl_span.h index f1923018..54ff64ae 100644 --- a/src/util/xspan_impl_span.h +++ b/src/util/xspan_impl_span.h @@ -42,8 +42,13 @@ private: #define CSelf Span typedef CSelf Self; // core config +#if __cplusplus >= 201103L + static constexpr bool configRequirePtr = true; + static constexpr bool configRequireBase = true; +#else enum { configRequirePtr = true }; enum { configRequireBase = true }; +#endif #include "xspan_impl_common.h" public: