From ef1f74ad95bf6e87b293e8881a576533e9332396 Mon Sep 17 00:00:00 2001 From: Eric Kilmer Date: Tue, 12 May 2026 11:00:18 -0400 Subject: [PATCH 1/5] Update CI --- .github/workflows/ci.yml | 31 +++++++++++++++---------------- .github/workflows/release.yml | 15 ++++++++------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d5e3d5..6f7835f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: deps run: | @@ -44,7 +44,7 @@ jobs: compiler: { CC: "gcc", CXX: "g++" } runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: submodules: 'true' - name: Install ICU (Ubuntu) @@ -91,14 +91,15 @@ jobs: matrix: platform: ["ubuntu-latest", "macos-latest"] python: - - "3.8" - - "3.9" - "3.10" - "3.11" + - "3.12" + - "3.13" + - "3.14" runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v6 - - uses: actions/setup-python@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ matrix.python }} - name: Install ICU (Ubuntu) @@ -132,24 +133,21 @@ jobs: build-arch: ["x64", "Win32"] build-type: ["Debug", "Release"] build-shared: ["0", "1"] - runs-on: windows-2019 + runs-on: windows-2025 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: submodules: 'true' - name: Enable ASan Sanitizers if: matrix.build-type == 'Debug' && matrix.build-arch == 'x64' run: | echo "SANITIZER_FLAG=-DPEPARSE_USE_SANITIZER=Address" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append - - uses: ilammy/msvc-dev-cmd@v1.13.0 - with: - arch: ${{ matrix.build-arch }} - name: build run: | mkdir build cd build cmake ` - -G "Visual Studio 16 2019" ` + -G "Visual Studio 17 2022" ` -A ${{ matrix.build-arch }} ` -DBUILD_SHARED_LIBS=${{ matrix.build-shared }} ` -DPEPARSE_ENABLE_TESTING=ON ` @@ -173,14 +171,15 @@ jobs: strategy: matrix: python: - - "3.8" - - "3.9" - "3.10" - "3.11" + - "3.12" + - "3.13" + - "3.14" runs-on: windows-latest steps: - - uses: actions/checkout@v6 - - uses: actions/setup-python@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ matrix.python }} - name: build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 937e2af..a78dbc9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,10 +9,15 @@ jobs: pypi: name: upload release to PyPI runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/pepy + permissions: + id-token: write steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - uses: actions/setup-python@v6 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: "3.x" @@ -20,8 +25,4 @@ jobs: run: python3 setup.py sdist - name: publish - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_TOKEN }} - + uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0 From e49c20ed057cd95f34cdc4529e871a0dbcca853e Mon Sep 17 00:00:00 2001 From: Eric Kilmer Date: Tue, 12 May 2026 11:12:58 -0400 Subject: [PATCH 2/5] Remove std::filesystem workarounds. It's 2026 now --- CMakeLists.txt | 3 - cmake/modules/FindFilesystem.cmake | 250 ----------------------------- tests/CMakeLists.txt | 2 +- 3 files changed, 1 insertion(+), 254 deletions(-) delete mode 100644 cmake/modules/FindFilesystem.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index cb6600c..51eb37f 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,9 +13,6 @@ if (NOT CMAKE_BUILD_TYPE) endif () include(cmake/compilation_flags.cmake) -# Greater c++17 filesystem compatibility (like with experimental) -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") -find_package(Filesystem COMPONENTS Experimental Final REQUIRED) list(APPEND GLOBAL_CXXFLAGS ${DEFAULT_CXX_FLAGS}) option(BUILD_SHARED_LIBS "Build Shared Libraries" ON) diff --git a/cmake/modules/FindFilesystem.cmake b/cmake/modules/FindFilesystem.cmake deleted file mode 100644 index 8b28f7e..0000000 --- a/cmake/modules/FindFilesystem.cmake +++ /dev/null @@ -1,250 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -# Copied from https://github.com/vector-of-bool/CMakeCM/tree/6cb8a6ada09eb40c271d2f83a032e03cd4005fa3/modules/FindFilesystem.cmake -# Latest commit as of March 10, 2021 - -#[=======================================================================[.rst: - -FindFilesystem -############## - -This module supports the C++17 standard library's filesystem utilities. Use the -:imp-target:`std::filesystem` imported target to - -Options -******* - -The ``COMPONENTS`` argument to this module supports the following values: - -.. find-component:: Experimental - :name: fs.Experimental - - Allows the module to find the "experimental" Filesystem TS version of the - Filesystem library. This is the library that should be used with the - ``std::experimental::filesystem`` namespace. - -.. find-component:: Final - :name: fs.Final - - Finds the final C++17 standard version of the filesystem library. - -If no components are provided, behaves as if the -:find-component:`fs.Final` component was specified. - -If both :find-component:`fs.Experimental` and :find-component:`fs.Final` are -provided, first looks for ``Final``, and falls back to ``Experimental`` in case -of failure. If ``Final`` is found, :imp-target:`std::filesystem` and all -:ref:`variables ` will refer to the ``Final`` version. - - -Imported Targets -**************** - -.. imp-target:: std::filesystem - - The ``std::filesystem`` imported target is defined when any requested - version of the C++ filesystem library has been found, whether it is - *Experimental* or *Final*. - - If no version of the filesystem library is available, this target will not - be defined. - - .. note:: - This target has ``cxx_std_17`` as an ``INTERFACE`` - :ref:`compile language standard feature `. Linking - to this target will automatically enable C++17 if no later standard - version is already required on the linking target. - - -.. _fs.variables: - -Variables -********* - -.. variable:: CXX_FILESYSTEM_IS_EXPERIMENTAL - - Set to ``TRUE`` when the :find-component:`fs.Experimental` version of C++ - filesystem library was found, otherwise ``FALSE``. - -.. variable:: CXX_FILESYSTEM_HAVE_FS - - Set to ``TRUE`` when a filesystem header was found. - -.. variable:: CXX_FILESYSTEM_HEADER - - Set to either ``filesystem`` or ``experimental/filesystem`` depending on - whether :find-component:`fs.Final` or :find-component:`fs.Experimental` was - found. - -.. variable:: CXX_FILESYSTEM_NAMESPACE - - Set to either ``std::filesystem`` or ``std::experimental::filesystem`` - depending on whether :find-component:`fs.Final` or - :find-component:`fs.Experimental` was found. - - -Examples -******** - -Using `find_package(Filesystem)` with no component arguments: - -.. code-block:: cmake - - find_package(Filesystem REQUIRED) - - add_executable(my-program main.cpp) - target_link_libraries(my-program PRIVATE std::filesystem) - - -#]=======================================================================] - - -if(TARGET std::filesystem) - # This module has already been processed. Don't do it again. - return() -endif() - -cmake_minimum_required(VERSION 3.10) - -include(CMakePushCheckState) -include(CheckIncludeFileCXX) - -# If we're not cross-compiling, try to run test executables. -# Otherwise, assume that compile + link is a sufficient check. -if(CMAKE_CROSSCOMPILING) - include(CheckCXXSourceCompiles) - macro(_cmcm_check_cxx_source code var) - check_cxx_source_compiles("${code}" ${var}) - endmacro() -else() - include(CheckCXXSourceRuns) - macro(_cmcm_check_cxx_source code var) - check_cxx_source_runs("${code}" ${var}) - endmacro() -endif() - -cmake_push_check_state() - -set(CMAKE_REQUIRED_QUIET ${Filesystem_FIND_QUIETLY}) - -# All of our tests required C++17 or later -set(CMAKE_CXX_STANDARD 17) - -# Normalize and check the component list we were given -set(want_components ${Filesystem_FIND_COMPONENTS}) -if(Filesystem_FIND_COMPONENTS STREQUAL "") - set(want_components Final) -endif() - -# Warn on any unrecognized components -set(extra_components ${want_components}) -list(REMOVE_ITEM extra_components Final Experimental) -foreach(component IN LISTS extra_components) - message(WARNING "Extraneous find_package component for Filesystem: ${component}") -endforeach() - -# Detect which of Experimental and Final we should look for -set(find_experimental TRUE) -set(find_final TRUE) -if(NOT "Final" IN_LIST want_components) - set(find_final FALSE) -endif() -if(NOT "Experimental" IN_LIST want_components) - set(find_experimental FALSE) -endif() - -if(find_final) - check_include_file_cxx("filesystem" _CXX_FILESYSTEM_HAVE_HEADER) - mark_as_advanced(_CXX_FILESYSTEM_HAVE_HEADER) - if(_CXX_FILESYSTEM_HAVE_HEADER) - # We found the non-experimental header. Don't bother looking for the - # experimental one. - set(find_experimental FALSE) - endif() -else() - set(_CXX_FILESYSTEM_HAVE_HEADER FALSE) -endif() - -if(find_experimental) - check_include_file_cxx("experimental/filesystem" _CXX_FILESYSTEM_HAVE_EXPERIMENTAL_HEADER) - mark_as_advanced(_CXX_FILESYSTEM_HAVE_EXPERIMENTAL_HEADER) -else() - set(_CXX_FILESYSTEM_HAVE_EXPERIMENTAL_HEADER FALSE) -endif() - -if(_CXX_FILESYSTEM_HAVE_HEADER) - set(_have_fs TRUE) - set(_fs_header filesystem) - set(_fs_namespace std::filesystem) - set(_is_experimental FALSE) -elseif(_CXX_FILESYSTEM_HAVE_EXPERIMENTAL_HEADER) - set(_have_fs TRUE) - set(_fs_header experimental/filesystem) - set(_fs_namespace std::experimental::filesystem) - set(_is_experimental TRUE) -else() - set(_have_fs FALSE) -endif() - -set(CXX_FILESYSTEM_HAVE_FS ${_have_fs} CACHE BOOL "TRUE if we have the C++ filesystem headers") -set(CXX_FILESYSTEM_HEADER ${_fs_header} CACHE STRING "The header that should be included to obtain the filesystem APIs") -set(CXX_FILESYSTEM_NAMESPACE ${_fs_namespace} CACHE STRING "The C++ namespace that contains the filesystem APIs") -set(CXX_FILESYSTEM_IS_EXPERIMENTAL ${_is_experimental} CACHE BOOL "TRUE if the C++ filesystem library is the experimental version") - -set(_found FALSE) - -if(CXX_FILESYSTEM_HAVE_FS) - # We have some filesystem library available. Do link checks - string(CONFIGURE [[ - #include - #include <@CXX_FILESYSTEM_HEADER@> - - int main() { - auto cwd = @CXX_FILESYSTEM_NAMESPACE@::current_path(); - printf("%s", cwd.c_str()); - return EXIT_SUCCESS; - } - ]] code @ONLY) - - # Check a simple filesystem program without any linker flags - _cmcm_check_cxx_source("${code}" CXX_FILESYSTEM_NO_LINK_NEEDED) - - set(can_link ${CXX_FILESYSTEM_NO_LINK_NEEDED}) - - if(NOT CXX_FILESYSTEM_NO_LINK_NEEDED) - set(prev_libraries ${CMAKE_REQUIRED_LIBRARIES}) - # Add the libstdc++ flag - set(CMAKE_REQUIRED_LIBRARIES ${prev_libraries} -lstdc++fs) - _cmcm_check_cxx_source("${code}" CXX_FILESYSTEM_STDCPPFS_NEEDED) - set(can_link ${CXX_FILESYSTEM_STDCPPFS_NEEDED}) - if(NOT CXX_FILESYSTEM_STDCPPFS_NEEDED) - # Try the libc++ flag - set(CMAKE_REQUIRED_LIBRARIES ${prev_libraries} -lc++fs) - _cmcm_check_cxx_source("${code}" CXX_FILESYSTEM_CPPFS_NEEDED) - set(can_link ${CXX_FILESYSTEM_CPPFS_NEEDED}) - endif() - endif() - - if(can_link) - add_library(std::filesystem INTERFACE IMPORTED) - set_property(TARGET std::filesystem APPEND PROPERTY INTERFACE_COMPILE_FEATURES cxx_std_17) - set(_found TRUE) - - if(CXX_FILESYSTEM_NO_LINK_NEEDED) - # Nothing to add... - elseif(CXX_FILESYSTEM_STDCPPFS_NEEDED) - set_property(TARGET std::filesystem APPEND PROPERTY INTERFACE_LINK_LIBRARIES -lstdc++fs) - elseif(CXX_FILESYSTEM_CPPFS_NEEDED) - set_property(TARGET std::filesystem APPEND PROPERTY INTERFACE_LINK_LIBRARIES -lc++fs) - endif() - endif() -endif() - -cmake_pop_check_state() - -set(Filesystem_FOUND ${_found} CACHE BOOL "TRUE if we can run a program using std::filesystem" FORCE) - -if(Filesystem_FIND_REQUIRED AND NOT Filesystem_FOUND) - message(FATAL_ERROR "Cannot run simple program using std::filesystem") -endif() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index dd20566..6744ef9 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -29,7 +29,7 @@ add_executable(tests ) target_compile_definitions(tests PRIVATE ASSETS_DIR="${CMAKE_CURRENT_SOURCE_DIR}/assets") target_include_directories(tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(tests PRIVATE std::filesystem ${PROJECT_NAME} Catch2::Catch2) +target_link_libraries(tests PRIVATE ${PROJECT_NAME} Catch2::Catch2) # ASAN on Windows messes with exception handlers, and Catch2 doesn't account # for this. A workaround is to disable SEH on Windows with ASAN # https://github.com/catchorg/Catch2/issues/898#issuecomment-841733322 From 3b7cc1060370acf7b587cacb4a2b8418bb18c8ce Mon Sep 17 00:00:00 2001 From: Eric Kilmer Date: Tue, 12 May 2026 11:19:40 -0400 Subject: [PATCH 3/5] Set cxx_std_17 for tests --- tests/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6744ef9..443793f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -29,6 +29,7 @@ add_executable(tests ) target_compile_definitions(tests PRIVATE ASSETS_DIR="${CMAKE_CURRENT_SOURCE_DIR}/assets") target_include_directories(tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) +target_compile_features(tests PUBLIC cxx_std_17) target_link_libraries(tests PRIVATE ${PROJECT_NAME} Catch2::Catch2) # ASAN on Windows messes with exception handlers, and Catch2 doesn't account # for this. A workaround is to disable SEH on Windows with ASAN From be529f7a5b722899d8af5df132d0cf5881f44e52 Mon Sep 17 00:00:00 2001 From: Eric Kilmer Date: Tue, 12 May 2026 13:15:46 -0400 Subject: [PATCH 4/5] ci: source vcvars before ctest on Windows MSVC links /fsanitize=address binaries against clang_rt.asan_dynamic-x86_64.dll, which only sits on PATH inside a VS developer prompt. ctest launched the test binaries in a bare shell, so they failed at startup with STATUS_DLL_NOT_FOUND (0xc0000135). Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f7835f..5c87cb4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -159,12 +159,20 @@ jobs: run: | cd build cmake --build . --config ${{ matrix.build-type }} --target install + # ctest launches /fsanitize=address binaries that depend on + # clang_rt.asan_dynamic-x86_64.dll, which only sits on PATH inside a VS + # developer prompt. Source vcvars so ctest can find it; otherwise the + # tests fail to launch with STATUS_DLL_NOT_FOUND (0xc0000135). - name: test + shell: cmd env: CTEST_OUTPUT_ON_FAILURE: 1 run: | - cd build - ctest -V + "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -version "[17.0,18.0)" -property installationPath > "%RUNNER_TEMP%\vsinstall.txt" || exit /b 1 + set /p VSINSTALL=<"%RUNNER_TEMP%\vsinstall.txt" + call "%VSINSTALL%\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.build-arch == 'Win32' && 'x86' || 'x64' }} || exit /b 1 + cd build || exit /b 1 + ctest -V || exit /b 1 .\bin\dump-pe.exe ..\tests\assets\example.exe pepy-windows: From 91d2e8117546ffb5ff5bf6b9e7cf61eeb714470e Mon Sep 17 00:00:00 2001 From: Eric Kilmer Date: Tue, 12 May 2026 15:44:31 -0400 Subject: [PATCH 5/5] Use windows-2025-vs2026 based on near-future transition --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c87cb4..1f71fe5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -133,7 +133,7 @@ jobs: build-arch: ["x64", "Win32"] build-type: ["Debug", "Release"] build-shared: ["0", "1"] - runs-on: windows-2025 + runs-on: windows-2025-vs2026 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -147,7 +147,7 @@ jobs: mkdir build cd build cmake ` - -G "Visual Studio 17 2022" ` + -G "Visual Studio 18 2026" ` -A ${{ matrix.build-arch }} ` -DBUILD_SHARED_LIBS=${{ matrix.build-shared }} ` -DPEPARSE_ENABLE_TESTING=ON ` @@ -168,7 +168,7 @@ jobs: env: CTEST_OUTPUT_ON_FAILURE: 1 run: | - "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -version "[17.0,18.0)" -property installationPath > "%RUNNER_TEMP%\vsinstall.txt" || exit /b 1 + "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -version "[18.0,19.0)" -property installationPath > "%RUNNER_TEMP%\vsinstall.txt" || exit /b 1 set /p VSINSTALL=<"%RUNNER_TEMP%\vsinstall.txt" call "%VSINSTALL%\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.build-arch == 'Win32' && 'x86' || 'x64' }} || exit /b 1 cd build || exit /b 1