CI updates

This commit is contained in:
Markus F.X.J. Oberhumer 2023-10-27 09:24:06 +02:00
parent 37d393cbc8
commit 6dac3dd248
5 changed files with 25 additions and 6 deletions

View File

@ -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

View File

@ -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 }}

View File

@ -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

View File

@ -195,11 +195,17 @@ TEST_CASE("TriBool") {
TestTriBool<tribool>::test(false, -1);
//
TestTriBool<TriBool<upx_int8_t> >::test(false, -1);
TestTriBool<TriBool<upx_int16_t> >::test(false, -1);
TestTriBool<TriBool<upx_int32_t> >::test(false, -1);
TestTriBool<TriBool<upx_int64_t> >::test(false, -1);
//
TestTriBool<TriBool<unsigned, 2> >::test(true, 2);
TestTriBool<TriBool<upx_int8_t, 2> >::test(true, 2);
TestTriBool<TriBool<upx_uint8_t, 2> >::test(true, 2);
TestTriBool<TriBool<upx_int16_t, 2> >::test(true, 2);
TestTriBool<TriBool<upx_uint16_t, 2> >::test(true, 2);
TestTriBool<TriBool<upx_int32_t, 2> >::test(true, 2);
TestTriBool<TriBool<upx_uint32_t, 2> >::test(true, 2);
TestTriBool<TriBool<upx_int64_t, 2> >::test(true, 2);
TestTriBool<TriBool<upx_uint64_t, 2> >::test(true, 2);
}

View File

@ -107,6 +107,8 @@ struct TriBool final {
static_assert(std::is_integral_v<promoted_type>);
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) {}