From 191c504b10c8874200983c5e4fb84cdfa5edce36 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 15 Mar 2025 20:24:56 -0700 Subject: [PATCH] Cleanup build config --- .github/workflows/linux.yml | 39 +++++++++++++++++++------------------ .github/workflows/macos.yml | 2 +- test/std-test.cc | 5 +++-- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index da49ade3..23e70830 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -28,6 +28,11 @@ jobs: build_type: Debug std: 20 install: sudo apt install g++-11 + - cxx: g++-13 + build_type: Release + std: 23 + install: sudo apt install g++-13 + shared: -DBUILD_SHARED_LIBS=ON - cxx: clang++-11 build_type: Debug std: 17 @@ -40,25 +45,20 @@ jobs: fuzz: -DFMT_FUZZ=ON -DFMT_FUZZ_LINKMAIN=ON std: 17 install: sudo apt install clang-11 - #- cxx: clang++-13 - # build_type: Debug - # std: 20 - #- cxx: clang++-13 - # build_type: Debug - # std: 20 - # cxxflags: -stdlib=libc++ - # install: sudo apt install libc++-13-dev libc++abi-13-dev - - cxx: g++-13 - build_type: Release - std: 23 - install: sudo apt install g++-13 - shared: -DBUILD_SHARED_LIBS=ON + - cxx: clang++-14 + build_type: Debug + std: 20 + - cxx: clang++-14 + build_type: Debug + std: 20 + cxxflags: -stdlib=libc++ + install: sudo apt install libc++-14-dev libc++abi-14-dev steps: - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: Set timezone - run: sudo timedatectl set-timezone 'Asia/Yekaterinburg' + run: sudo timedatectl set-timezone 'Europe/Minsk' - name: Install GCC 4.9 run: | @@ -94,7 +94,7 @@ jobs: - name: Install Clang 3.6 run: | sudo apt update - sudo apt install libtinfo5 libobjc4 + sudo apt install libtinfo5 # https://code.launchpad.net/ubuntu/xenial/amd64/clang-3.6/1:3.6.2-3ubuntu2 wget --no-verbose \ http://launchpadlibrarian.net/230019046/libffi6_3.2.1-4_amd64.deb \ @@ -135,11 +135,12 @@ jobs: run: | # GitHub Actions caching proxy is at times unreliable # see https://github.com/actions/runner-images/issues/7048. + mirrors=/etc/apt/mirrors.txt printf 'http://azure.archive.ubuntu.com/ubuntu\tpriority:1\n' | \ - sudo tee /etc/apt/mirrors.txt - curl http://mirrors.ubuntu.com/mirrors.txt | \ - sudo tee --append /etc/apt/mirrors.txt - sudo sed -i 's~http://azure.archive.ubuntu.com/ubuntu/~mirror+file:/etc/apt/mirrors.txt~' \ + sudo tee $mirrors + curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append $mirrors + sudo sed -i \ + "s~http://azure.archive.ubuntu.com/ubuntu/~mirror+file:$mirrors~" \ /etc/apt/sources.list - name: Create build environment diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 3543ef57..1a297e6d 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -28,7 +28,7 @@ jobs: - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: Set timezone - run: sudo systemsetup -settimezone 'Asia/Yekaterinburg' + run: sudo systemsetup -settimezone 'Europe/Minsk' - name: Select Xcode 14.3 (macOS 13) run: sudo xcode-select -s "/Applications/Xcode_14.3.app" diff --git a/test/std-test.cc b/test/std-test.cc index 760daf8f..6874f025 100644 --- a/test/std-test.cc +++ b/test/std-test.cc @@ -383,11 +383,12 @@ TEST(std_test, format_atomic) { #ifdef __cpp_lib_atomic_flag_test TEST(std_test, format_atomic_flag) { - std::atomic_flag f = ATOMIC_FLAG_INIT; + std::atomic_flag f; (void)f.test_and_set(); EXPECT_EQ(fmt::format("{}", f), "true"); - const std::atomic_flag cf = ATOMIC_FLAG_INIT; + f.clear(); + const std::atomic_flag& cf = f; EXPECT_EQ(fmt::format("{}", cf), "false"); } #endif // __cpp_lib_atomic_flag_test