From 6dac3dd2485352718602fd759a345a43c314278d Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Fri, 27 Oct 2023 09:24:06 +0200 Subject: [PATCH] CI updates --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/weekly-ci-cc-alpine-linux.yml | 11 +++++++++++ .github/workflows/weekly-ci-cc-zigcc.yml | 4 ++-- src/check/dt_cxxlib.cpp | 6 ++++++ src/util/cxxlib.h | 2 ++ 5 files changed, 25 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fab0e93a..f2a3819e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,8 +13,8 @@ env: CTEST_OUTPUT_ON_FAILURE: "ON" DEBIAN_FRONTEND: noninteractive UPX_CMAKE_BUILD_FLAGS: --verbose - # 2023-10-24 - ZIG_DIST_VERSION: 0.12.0-dev.1245+a07f288eb + # 2023-10-27 + ZIG_DIST_VERSION: 0.12.0-dev.1297+a9e66ed73 jobs: job-rebuild-and-verify-stubs: @@ -28,8 +28,8 @@ jobs: if ! test -e /usr/bin/python2; then ####sudo apt-get update && sudo apt-get install -y --no-install-recommends python2-minimal # install python2-minimal packages from Debian-11 - wget -q 'https://ftp.debian.org/debian/pool/main/p/python2.7/libpython2.7-minimal_2.7.18-8_amd64.deb' - wget -q 'https://ftp.debian.org/debian/pool/main/p/python2.7/python2.7-minimal_2.7.18-8_amd64.deb' + wget -q 'https://ftp.debian.org/debian/pool/main/p/python2.7/libpython2.7-minimal_2.7.18-8+deb11u1_amd64.deb' + wget -q 'https://ftp.debian.org/debian/pool/main/p/python2.7/python2.7-minimal_2.7.18-8+deb11u1_amd64.deb' sudo dpkg -i ./*python2*.deb && rm ./*python2*.deb && sudo ldconfig sudo ln -s -v python2.7 /usr/bin/python2 fi diff --git a/.github/workflows/weekly-ci-cc-alpine-linux.yml b/.github/workflows/weekly-ci-cc-alpine-linux.yml index 02062078..aeac5989 100644 --- a/.github/workflows/weekly-ci-cc-alpine-linux.yml +++ b/.github/workflows/weekly-ci-cc-alpine-linux.yml @@ -40,6 +40,17 @@ jobs: - { container: 'alpine:3.18', use_cxx20: 1, use_cxx2b: 1, use_lto: 1 } - { container: 'alpine:edge', use_cxx20: 1, use_cxx2b: 1, use_lto: 1 } - { container: 'i386/alpine:edge', use_cxx20: 1, use_cxx2b: 1, use_lto: 1 } + # more 32-bit i386 versions, just for testing + # { container: 'i386/alpine:3.9' } # clang-5, gcc-8; BROKEN: clang -m32 problem + - { container: 'i386/alpine:3.10' } # clang-8, gcc-8 + - { container: 'i386/alpine:3.11' } # clang-9, gcc-9 + - { container: 'i386/alpine:3.12' } # clang-10, gcc-9 + - { container: 'i386/alpine:3.13' } # clang-10, gcc-10 + - { container: 'i386/alpine:3.14' } # clang-11, gcc-10 + - { container: 'i386/alpine:3.15' } # clang-12, gcc-10 + - { container: 'i386/alpine:3.16' } # clang-13, gcc-11 + - { container: 'i386/alpine:3.17' } # clang-15, gcc-12 + - { container: 'i386/alpine:3.18' } # clang-16, gcc-12 name: ${{ format('container {0}', matrix.container) }} runs-on: ubuntu-latest container: ${{ matrix.container }} diff --git a/.github/workflows/weekly-ci-cc-zigcc.yml b/.github/workflows/weekly-ci-cc-zigcc.yml index eb63d339..cca08370 100644 --- a/.github/workflows/weekly-ci-cc-zigcc.yml +++ b/.github/workflows/weekly-ci-cc-zigcc.yml @@ -11,8 +11,8 @@ env: CMAKE_REQUIRED_QUIET: "OFF" CTEST_OUTPUT_ON_FAILURE: "ON" DEBIAN_FRONTEND: noninteractive - # 2023-10-24 - ZIG_DIST_VERSION: 0.12.0-dev.1245+a07f288eb + # 2023-10-27 + ZIG_DIST_VERSION: 0.12.0-dev.1297+a9e66ed73 jobs: job-linux-zigcc: # uses cmake + make diff --git a/src/check/dt_cxxlib.cpp b/src/check/dt_cxxlib.cpp index 6781612a..6014d86f 100644 --- a/src/check/dt_cxxlib.cpp +++ b/src/check/dt_cxxlib.cpp @@ -195,11 +195,17 @@ TEST_CASE("TriBool") { TestTriBool::test(false, -1); // TestTriBool >::test(false, -1); + TestTriBool >::test(false, -1); + TestTriBool >::test(false, -1); TestTriBool >::test(false, -1); // TestTriBool >::test(true, 2); TestTriBool >::test(true, 2); TestTriBool >::test(true, 2); + TestTriBool >::test(true, 2); + TestTriBool >::test(true, 2); + TestTriBool >::test(true, 2); + TestTriBool >::test(true, 2); TestTriBool >::test(true, 2); TestTriBool >::test(true, 2); } diff --git a/src/util/cxxlib.h b/src/util/cxxlib.h index c90cbeb8..b6e42faf 100644 --- a/src/util/cxxlib.h +++ b/src/util/cxxlib.h @@ -107,6 +107,8 @@ struct TriBool final { static_assert(std::is_integral_v); static_assert(ThirdValue != 0 && ThirdValue != 1); enum value_type : underlying_type { False = 0, True = 1, Third = ThirdValue }; + static_assert(sizeof(value_type) == sizeof(underlying_type)); + static_assert(sizeof(underlying_type) <= sizeof(promoted_type)); // constructors forceinline constexpr TriBool() noexcept {} forceinline constexpr TriBool(value_type x) noexcept : value(x) {}