From 734be29709a3513671dac16648c0af9c38b680b3 Mon Sep 17 00:00:00 2001 From: Sergey Serebryakov <1047261+megaserg@users.noreply.github.com> Date: Mon, 25 Nov 2024 14:50:27 +0000 Subject: [PATCH 01/16] Fix wheels release Seems like `cibuildwheel` requires `--only` to be non-empty. --- .github/workflows/wheels.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 8423fc1..9a1c60f 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -48,6 +48,7 @@ jobs: with: package-dir: ./ output-dir: ./wheelhouse + only: ${{ matrix.only }} - uses: actions/upload-artifact@v3 with: From 2bf3680c8fbd8ff94dc0f2f2034d342d294891f5 Mon Sep 17 00:00:00 2001 From: Sergey Serebryakov <1047261+megaserg@users.noreply.github.com> Date: Mon, 25 Nov 2024 23:19:26 +0000 Subject: [PATCH 02/16] Use updated cibuildwheel rule --- .github/workflows/wheels.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 9a1c60f..3cd017f 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -37,14 +37,8 @@ jobs: steps: - uses: actions/checkout@v3 - # Used to host cibuildwheel - - uses: actions/setup-python@v3 - - - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.11.2 - - name: Build wheels - uses: pypa/cibuildwheel@v2.12.0 + uses: pypa/cibuildwheel@v2.22.0 with: package-dir: ./ output-dir: ./wheelhouse From 9dc30c4592ff43d0371c725385ad23b91bbf2747 Mon Sep 17 00:00:00 2001 From: Sergey Serebryakov <1047261+megaserg@users.noreply.github.com> Date: Mon, 25 Nov 2024 23:30:45 +0000 Subject: [PATCH 03/16] Appease clang --- src/_tmap/cereal/types/tuple.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/_tmap/cereal/types/tuple.hpp b/src/_tmap/cereal/types/tuple.hpp index 7e56f0d..4d79384 100644 --- a/src/_tmap/cereal/types/tuple.hpp +++ b/src/_tmap/cereal/types/tuple.hpp @@ -95,7 +95,7 @@ namespace cereal template inline static void apply( Archive & ar, std::tuple & tuple ) { - serialize::template apply( ar, tuple ); + serialize::template apply<>( ar, tuple ); ar( CEREAL_NVP_(tuple_element_name::c_str(), std::get( tuple )) ); } @@ -116,7 +116,7 @@ namespace cereal template inline void CEREAL_SERIALIZE_FUNCTION_NAME( Archive & ar, std::tuple & tuple ) { - tuple_detail::serialize>::value>::template apply( ar, tuple ); + tuple_detail::serialize>::value>::template apply<>( ar, tuple ); } } // namespace cereal From 5fa73fba7f03d44253cf182bbd0a30bb80e06442 Mon Sep 17 00:00:00 2001 From: Sergey Serebryakov <1047261+megaserg@users.noreply.github.com> Date: Mon, 25 Nov 2024 23:39:51 +0000 Subject: [PATCH 04/16] Modernize cibuildwheel --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 3cd017f..85c0f59 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Install cibuildwheel - run: pipx install cibuildwheel==2.12.0 + run: pipx install cibuildwheel==2.22.0 - id: set-matrix run: | MATRIX=$( From 825ebbe26816f99c020f4b0bf9c479ec3bba21d5 Mon Sep 17 00:00:00 2001 From: Sergey Serebryakov <1047261+megaserg@users.noreply.github.com> Date: Mon, 25 Nov 2024 23:48:54 +0000 Subject: [PATCH 05/16] Update actions, OSes --- .github/workflows/wheels.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 85c0f59..24f42b7 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -10,7 +10,6 @@ jobs: outputs: include: ${{ steps.set-matrix.outputs.include }} steps: - - uses: actions/checkout@v3 - name: Install cibuildwheel run: pipx install cibuildwheel==2.22.0 - id: set-matrix @@ -20,7 +19,9 @@ jobs: cibuildwheel --print-build-identifiers --platform linux \ | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \ && cibuildwheel --print-build-identifiers --platform macos \ - | jq -nRc '{"only": inputs, "os": "macos-latest"}' \ + | jq -nRc '{"only": inputs, "os": "macos-13"}' \ + && cibuildwheel --print-build-identifiers --platform macos \ + | jq -nRc '{"only": inputs, "os": "macos-14"}' \ && cibuildwheel --print-build-identifiers --platform windows \ | jq -nRc '{"only": inputs, "os": "windows-latest"}' } | jq -sc @@ -35,7 +36,7 @@ jobs: matrix: include: ${{ fromJson(needs.generate-wheels-matrix.outputs.include) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build wheels uses: pypa/cibuildwheel@v2.22.0 @@ -44,7 +45,7 @@ jobs: output-dir: ./wheelhouse only: ${{ matrix.only }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} path: ./wheelhouse/*.whl - From 963b15809f43c0c8a292ef572cdadc867599917c Mon Sep 17 00:00:00 2001 From: Sergey Serebryakov <1047261+megaserg@users.noreply.github.com> Date: Mon, 25 Nov 2024 23:50:03 +0000 Subject: [PATCH 06/16] Revert checkout removal --- .github/workflows/wheels.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 24f42b7..f13766a 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -10,6 +10,7 @@ jobs: outputs: include: ${{ steps.set-matrix.outputs.include }} steps: + - uses: actions/checkout@v4 - name: Install cibuildwheel run: pipx install cibuildwheel==2.22.0 - id: set-matrix From e17aeaab2dd87d6fd21511f9c4f793134c6ae0fd Mon Sep 17 00:00:00 2001 From: Sergey Serebryakov <1047261+megaserg@users.noreply.github.com> Date: Tue, 26 Nov 2024 00:07:32 +0000 Subject: [PATCH 07/16] Fix macos arch --- .github/workflows/wheels.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index f13766a..71fe07c 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -1,7 +1,8 @@ ## IMPORTANT: the configuration for cibuildwheel is kept in pyproject.toml name: wheels -on: [push, pull_request] +# on: [push, pull_request] +on: [push] jobs: generate-wheels-matrix: @@ -19,9 +20,9 @@ jobs: { cibuildwheel --print-build-identifiers --platform linux \ | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \ - && cibuildwheel --print-build-identifiers --platform macos \ + && cibuildwheel --print-build-identifiers --platform macos --arch x86_64 \ | jq -nRc '{"only": inputs, "os": "macos-13"}' \ - && cibuildwheel --print-build-identifiers --platform macos \ + && cibuildwheel --print-build-identifiers --platform macos --arch arm64 \ | jq -nRc '{"only": inputs, "os": "macos-14"}' \ && cibuildwheel --print-build-identifiers --platform windows \ | jq -nRc '{"only": inputs, "os": "windows-latest"}' From c4995b0a0f9198e75933720ef473683d16eb1e0c Mon Sep 17 00:00:00 2001 From: Sergey Serebryakov <1047261+megaserg@users.noreply.github.com> Date: Tue, 26 Nov 2024 00:33:06 +0000 Subject: [PATCH 08/16] Appease CMake --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a0c3f10..dedc13d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,8 @@ if(MSVC) set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2") # set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /permissive /std:c++17") # set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /permissive /std:c++17 /wd4068 /wd4305 /wd4267 /wd4244") + set(OpenMP_C_FLAGS "-Wno-unused-command-line-argument") + set(OpenMP_C_LIB_NAMES "libomp" "libgomp" "libiomp5") else() # Set O2 optimisations, the more stable option set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2") From 25e56caea590e15b4463635554244cfb4752b1f5 Mon Sep 17 00:00:00 2001 From: Sergey Serebryakov <1047261+megaserg@users.noreply.github.com> Date: Tue, 26 Nov 2024 00:42:37 +0000 Subject: [PATCH 09/16] Appease CMake again --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index dedc13d..478ab3a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,8 +29,12 @@ if(MSVC) set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2") # set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /permissive /std:c++17") # set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /permissive /std:c++17 /wd4068 /wd4305 /wd4267 /wd4244") + set(OpenMP_C_FLAGS "-Wno-unused-command-line-argument") set(OpenMP_C_LIB_NAMES "libomp" "libgomp" "libiomp5") + set(OpenMP_libomp_LIBRARY ${OpenMP_C_LIB_NAMES}) + set(OpenMP_libgomp_LIBRARY ${OpenMP_C_LIB_NAMES}) + set(OpenMP_libiomp5_LIBRARY ${OpenMP_C_LIB_NAMES}) else() # Set O2 optimisations, the more stable option set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2") From 633e84db610fa13fd05bc28eec12daf8e606ba67 Mon Sep 17 00:00:00 2001 From: Sergey Serebryakov <1047261+megaserg@users.noreply.github.com> Date: Tue, 26 Nov 2024 00:50:15 +0000 Subject: [PATCH 10/16] Appease CMake once again --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 478ab3a..a2c977e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,12 @@ if(MSVC) set(OpenMP_libomp_LIBRARY ${OpenMP_C_LIB_NAMES}) set(OpenMP_libgomp_LIBRARY ${OpenMP_C_LIB_NAMES}) set(OpenMP_libiomp5_LIBRARY ${OpenMP_C_LIB_NAMES}) + + set(OpenMP_CXX_FLAGS "-Wno-unused-command-line-argument") + set(OpenMP_CXX_LIB_NAMES "libomp" "libgomp" "libiomp5") + set(OpenMP_libomp_LIBRARY ${OpenMP_CXX_LIB_NAMES}) + set(OpenMP_libgomp_LIBRARY ${OpenMP_CXX_LIB_NAMES}) + set(OpenMP_libiomp5_LIBRARY ${OpenMP_CXX_LIB_NAMES}) else() # Set O2 optimisations, the more stable option set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2") From 829cb6d88a622687515c7f223d2289a712227c15 Mon Sep 17 00:00:00 2001 From: Sergey Serebryakov <1047261+megaserg@users.noreply.github.com> Date: Tue, 26 Nov 2024 01:05:51 +0000 Subject: [PATCH 11/16] Test --- .github/workflows/wheels.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 71fe07c..f90e583 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -1,8 +1,7 @@ ## IMPORTANT: the configuration for cibuildwheel is kept in pyproject.toml name: wheels -# on: [push, pull_request] -on: [push] +on: [push] # on: [push, pull_request] jobs: generate-wheels-matrix: @@ -42,12 +41,7 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.22.0 - with: - package-dir: ./ - output-dir: ./wheelhouse - only: ${{ matrix.only }} - uses: actions/upload-artifact@v4 with: - name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} path: ./wheelhouse/*.whl From 5dd53d064c7487213a287a25c588b8dd385a2130 Mon Sep 17 00:00:00 2001 From: Sergey Serebryakov <1047261+megaserg@users.noreply.github.com> Date: Tue, 26 Nov 2024 01:11:29 +0000 Subject: [PATCH 12/16] Test failed --- .github/workflows/wheels.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index f90e583..b78a411 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -41,6 +41,8 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.22.0 + with: + only: {{ matrix.only }} - uses: actions/upload-artifact@v4 with: From b4451e5d34d40c96b21f00f81e5d91433f8c08e9 Mon Sep 17 00:00:00 2001 From: Sergey Serebryakov <1047261+megaserg@users.noreply.github.com> Date: Tue, 26 Nov 2024 01:14:16 +0000 Subject: [PATCH 13/16] Trigger --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index b78a411..33fbb18 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -1,7 +1,7 @@ ## IMPORTANT: the configuration for cibuildwheel is kept in pyproject.toml name: wheels -on: [push] # on: [push, pull_request] +on: [push, pull_request] jobs: generate-wheels-matrix: From 1f72de20aa87812ef0763a545f3e09f5750f6bbf Mon Sep 17 00:00:00 2001 From: Sergey Serebryakov <1047261+megaserg@users.noreply.github.com> Date: Tue, 26 Nov 2024 01:15:27 +0000 Subject: [PATCH 14/16] Fix dollar --- .github/workflows/wheels.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 33fbb18..18722b4 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -1,7 +1,7 @@ ## IMPORTANT: the configuration for cibuildwheel is kept in pyproject.toml name: wheels -on: [push, pull_request] +on: [push] # on: [push, pull_request] jobs: generate-wheels-matrix: @@ -42,7 +42,7 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.22.0 with: - only: {{ matrix.only }} + only: ${{ matrix.only }} - uses: actions/upload-artifact@v4 with: From 098ff52e881999c8544630ba69c93e70da9d2029 Mon Sep 17 00:00:00 2001 From: Sergey Serebryakov <1047261+megaserg@users.noreply.github.com> Date: Tue, 26 Nov 2024 01:30:39 +0000 Subject: [PATCH 15/16] Final --- .github/workflows/wheels.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 18722b4..01eff84 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -46,4 +46,5 @@ jobs: - uses: actions/upload-artifact@v4 with: + name: cibw-wheels-${{ matrix.only }} path: ./wheelhouse/*.whl From 918a1a15b9db96f06577a6838a6da6e39b98039f Mon Sep 17 00:00:00 2001 From: Sergey Serebryakov <1047261+megaserg@users.noreply.github.com> Date: Tue, 26 Nov 2024 02:01:27 +0000 Subject: [PATCH 16/16] Uncomment --- .github/workflows/wheels.yml | 2 +- CMakeLists.txt | 26 +++++++++++++++----------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 01eff84..1a99275 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -1,7 +1,7 @@ ## IMPORTANT: the configuration for cibuildwheel is kept in pyproject.toml name: wheels -on: [push] # on: [push, pull_request] +on: [push, pull_request] jobs: generate-wheels-matrix: diff --git a/CMakeLists.txt b/CMakeLists.txt index a2c977e..bfb16a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,17 +30,21 @@ if(MSVC) # set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /permissive /std:c++17") # set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /permissive /std:c++17 /wd4068 /wd4305 /wd4267 /wd4244") - set(OpenMP_C_FLAGS "-Wno-unused-command-line-argument") - set(OpenMP_C_LIB_NAMES "libomp" "libgomp" "libiomp5") - set(OpenMP_libomp_LIBRARY ${OpenMP_C_LIB_NAMES}) - set(OpenMP_libgomp_LIBRARY ${OpenMP_C_LIB_NAMES}) - set(OpenMP_libiomp5_LIBRARY ${OpenMP_C_LIB_NAMES}) - - set(OpenMP_CXX_FLAGS "-Wno-unused-command-line-argument") - set(OpenMP_CXX_LIB_NAMES "libomp" "libgomp" "libiomp5") - set(OpenMP_libomp_LIBRARY ${OpenMP_CXX_LIB_NAMES}) - set(OpenMP_libgomp_LIBRARY ${OpenMP_CXX_LIB_NAMES}) - set(OpenMP_libiomp5_LIBRARY ${OpenMP_CXX_LIB_NAMES}) + if(CMAKE_C_COMPILER_ID MATCHES "Clang") + set(OpenMP_C_FLAGS "-Wno-unused-command-line-argument") + set(OpenMP_C_LIB_NAMES "libomp" "libgomp" "libiomp5") + set(OpenMP_libomp_LIBRARY ${OpenMP_C_LIB_NAMES}) + set(OpenMP_libgomp_LIBRARY ${OpenMP_C_LIB_NAMES}) + set(OpenMP_libiomp5_LIBRARY ${OpenMP_C_LIB_NAMES}) + endif() + + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(OpenMP_CXX_FLAGS "-Wno-unused-command-line-argument") + set(OpenMP_CXX_LIB_NAMES "libomp" "libgomp" "libiomp5") + set(OpenMP_libomp_LIBRARY ${OpenMP_CXX_LIB_NAMES}) + set(OpenMP_libgomp_LIBRARY ${OpenMP_CXX_LIB_NAMES}) + set(OpenMP_libiomp5_LIBRARY ${OpenMP_CXX_LIB_NAMES}) + endif() else() # Set O2 optimisations, the more stable option set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2")