From 494e6e988cc55d0bc7f3763c076ec358a38c68a6 Mon Sep 17 00:00:00 2001 From: Carson Radtke Date: Tue, 30 Sep 2025 15:10:46 -0600 Subject: [PATCH] fix: all pipeline failures (#1221) * fix: update conditional static assertion There is a static assertion that spuriously fails on MSVC that was version checked. Unfortunately it fires every time there is a new compiler update, so for now we will remove the version check and add it back once the compiler bug is fixed. * fix: ios pipeline failure Looks like somewhere along the line, the iOS simulator changed the range of support iOS versions. This changes bumps the version from 9 to 12.0. Also noticed that the GSL OSX bundle version was quite out of date. I bumped this from 3.1.0 to 4.2.0 and created an upgrade checklist file in docs/ so we don't forget these types of tasks in the future. * bump xcode version from 15.4 to 16.4 * fix compiler warning when building gtest for ios * allow for missing include dirs on command line * replace windows-2019 with windows-2025 * update visual studio versions after runner bump * PR feedback: make sure markdown links are syntactically correct --- .github/workflows/compilers.yml | 14 ++++---------- .github/workflows/ios.yml | 7 ++++--- docs/upgrade_checklist.md | 19 +++++++++++++++++++ tests/span_tests.cpp | 8 ++++---- 4 files changed, 31 insertions(+), 17 deletions(-) create mode 100644 docs/upgrade_checklist.md diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml index 3857583..7ab2c7e 100644 --- a/.github/workflows/compilers.yml +++ b/.github/workflows/compilers.yml @@ -65,7 +65,7 @@ jobs: xcode: strategy: matrix: - xcode_version: [ '15.4' ] + xcode_version: [ '16.4' ] build_type: [ Debug, Release ] cxx_version: [ 14, 17, 20, 23 ] runs-on: macos-latest @@ -81,22 +81,16 @@ jobs: cmake_build_type: ${{ matrix.build_type }} cmake_cxx_compiler: clang++ gsl_cxx_standard: ${{ matrix.cxx_version }} + extra_cmake_args: '-DCMAKE_CXX_FLAGS="-isysroot \"$(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk\""' VisualStudio: strategy: matrix: - generator: [ 'Visual Studio 16 2019', 'Visual Studio 17 2022' ] - image: [ windows-2019, windows-2022 ] + generator: [ 'Visual Studio 17 2022' ] + image: [ windows-2022, windows-2025 ] build_type: [ Debug, Release ] extra_args: [ '', '-T ClangCL' ] cxx_version: [ 14, 17, 20, 23 ] - exclude: - - generator: 'Visual Studio 17 2022' - image: windows-2019 - - generator: 'Visual Studio 16 2019' - image: windows-2022 - - generator: 'Visual Studio 16 2019' - cxx_version: 23 runs-on: ${{ matrix.image }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index a7f2f10..5656725 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -25,11 +25,12 @@ jobs: -GXcode \ -DCMAKE_SYSTEM_NAME=iOS \ "-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64" \ - -DCMAKE_OSX_DEPLOYMENT_TARGET=9 \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 \ -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY \ "-DMACOSX_BUNDLE_GUI_IDENTIFIER=GSL.\$(EXECUTABLE_NAME)" \ - -DMACOSX_BUNDLE_BUNDLE_VERSION=3.1.0 \ - -DMACOSX_BUNDLE_SHORT_VERSION_STRING=3.1.0 \ + -DMACOSX_BUNDLE_BUNDLE_VERSION=4.2.0 \ + -DMACOSX_BUNDLE_SHORT_VERSION_STRING=4.2.0 \ + -DCMAKE_CXX_FLAGS="-Wno-missing-include-dirs" \ .. - name: Build diff --git a/docs/upgrade_checklist.md b/docs/upgrade_checklist.md new file mode 100644 index 0000000..bf923b3 --- /dev/null +++ b/docs/upgrade_checklist.md @@ -0,0 +1,19 @@ +> When bumping the version, you need to update the following files: + +1. [ ] [CMakeLists.txt](../CMakeLists.txt) Bump `GSL_VERSION` +1. [ ] [README.md](../README.md) Bump `GIT_TAG` +1. [ ] [ios.yml](../.github/workflows/ios.yml) Bump `MACOSX_BUNDLE_BUNDLE_VERSION` and +`MACOSX_BUNDLE_SHORT_VERSION_STRING` + +> After updating, you need to create a new GitHub release: + +1. [ ] [Microsoft/GSL - Create Release](https://github.com/microsoft/GSL/releases/new) + +Be sure to update the release notes accordingly and properly mention open-source +contributors. + +> After a new release exists, update the `ms-gsl` vcpkg port: + +1. [ ] [Microsoft/vcpkg - ms-gsl port](https://github.com/microsoft/vcpkg/tree/master/ports/ms-gsl) + +Be sure to monitor the PR that updates the port for any feedback from vcpkg maintainers. diff --git a/tests/span_tests.cpp b/tests/span_tests.cpp index e41026e..9b74ad4 100644 --- a/tests/span_tests.cpp +++ b/tests/span_tests.cpp @@ -412,8 +412,8 @@ TEST(span_test, from_std_array_constructor) static_assert(!CtorCompilesFor, std::array&>, "!CtorCompilesFor, std::array&>"); -#if !defined(_MSC_VER) || (_MSC_VER > 1943) || (__cplusplus >= 201703L) - // Fails on "Visual Studio 16 2019/Visual Studio 17 2022, windows-2019/2022, Debug/Release, 14". +#if !defined(_MSC_VER) || (__cplusplus >= 201703L) + // Fails on MSVC. TODO: report a feedback bug. static_assert(!ConversionCompilesFor, std::array>, "!ConversionCompilesFor, std::array>"); #endif @@ -529,8 +529,8 @@ TEST(span_test, from_container_constructor) EXPECT_TRUE(cs.data() == cstr.data()); } -#if !defined(_MSC_VER) || (_MSC_VER > 1943) || (__cplusplus >= 201703L) - // Fails on "Visual Studio 16 2019/Visual Studio 17 2022, windows-2019/2022, Debug/Release, 14". +#if !defined(_MSC_VER) || (__cplusplus >= 201703L) + // Fails on MSVC. TODO: report a feedback bug. static_assert(!ConversionCompilesFor, std::vector>, "!ConversionCompilesFor, std::vector>"); #endif // !defined(_MSC_VER) || (_MSC_VER > 1942) || (__cplusplus >= 201703L)