From 8eff554bde0ed54022a2de090bf8446160890316 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Fri, 17 Jun 2022 20:50:39 -0500 Subject: [PATCH 1/8] red-flagging builds if package build step produces warnings --- .github/workflows/tests+artifacts+pypi.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests+artifacts+pypi.yml b/.github/workflows/tests+artifacts+pypi.yml index 1bbc8ec6..e9b36292 100644 --- a/.github/workflows/tests+artifacts+pypi.yml +++ b/.github/workflows/tests+artifacts+pypi.yml @@ -70,7 +70,9 @@ jobs: - run: pytest -v -s -We -p no:unraisableexception tests - if: matrix.platform != 'ubuntu-latest' - run: python -m build + run: | + python -m build 2>&1 | tee build.log + exit `fgrep -i warning build.log | wc -l` - if: matrix.platform != 'ubuntu-latest' uses: actions/upload-artifact@v2 From 414a00068da1179cd8873a14bb1173628335023b Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Fri, 17 Jun 2022 21:04:52 -0500 Subject: [PATCH 2/8] removing spurious entry in MANIFEST.in --- MANIFEST.in | 1 - 1 file changed, 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index ad10386b..37ae318b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -39,7 +39,6 @@ include gitmodules/sundials/src/sunlinsol/spbcgs/sunlinsol_spbcgs.c include gitmodules/sundials/src/sunlinsol/spfgmr/sunlinsol_spfgmr.c include gitmodules/sundials/src/sunlinsol/spgmr/sunlinsol_spgmr.c include gitmodules/sundials/src/sunlinsol/sptfqmr/sunlinsol_sptfqmr.c -include gitmodules/sundials/sundials_nvector_senswrapper.h include gitmodules/pybind11/CMakeLists.txt include gitmodules/pybind11/tools/pybind11Common.cmake From 84019c21529ca3cf2df4a465bbbfebb284e3c509 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Fri, 17 Jun 2022 21:10:59 -0500 Subject: [PATCH 3/8] enable warning red flags also on Linux --- .github/workflows/tests+artifacts+pypi.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests+artifacts+pypi.yml b/.github/workflows/tests+artifacts+pypi.yml index e9b36292..3c01ed5a 100644 --- a/.github/workflows/tests+artifacts+pypi.yml +++ b/.github/workflows/tests+artifacts+pypi.yml @@ -69,11 +69,13 @@ jobs: - run: pytest -v -s -We -p no:unraisableexception tests - - if: matrix.platform != 'ubuntu-latest' - run: | + - run: | python -m build 2>&1 | tee build.log exit `fgrep -i warning build.log | wc -l` + - if: matrix.platform == 'ubuntu-latest' + run: rm dist/* + - if: matrix.platform != 'ubuntu-latest' uses: actions/upload-artifact@v2 with: From 639fe5c3fee7eb30a7c4d6611a9fb57c57d6d0ab Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Fri, 17 Jun 2022 21:27:19 -0500 Subject: [PATCH 4/8] try to solve "could not create compact unwind" linker warnings on macOS --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 65c0500a..ef8bcd90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,6 +75,9 @@ macro(sundials_add_library target) target_include_directories(${target} PRIVATE ${SUNDIALS_SOURCE_DIR}/src/sundials) target_include_directories(${target} PRIVATE ${SUNDIALS_SOURCE_DIR}/include) target_include_directories(${target} PRIVATE ${CMAKE_BINARY_DIR}/include) + if (APPLE) + target_link_options(${target} PRIVATE -Wl,-no_compact_unwind) + endif() endmacro() function(print_error) From a8ababc05ca61eee263f24849aa47dbd92297106 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Fri, 17 Jun 2022 21:37:20 -0500 Subject: [PATCH 5/8] try to solve "could not create compact unwind" linker warnings on macOS - fixed --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ef8bcd90..2f5e7f94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,9 +75,6 @@ macro(sundials_add_library target) target_include_directories(${target} PRIVATE ${SUNDIALS_SOURCE_DIR}/src/sundials) target_include_directories(${target} PRIVATE ${SUNDIALS_SOURCE_DIR}/include) target_include_directories(${target} PRIVATE ${CMAKE_BINARY_DIR}/include) - if (APPLE) - target_link_options(${target} PRIVATE -Wl,-no_compact_unwind) - endif() endmacro() function(print_error) @@ -137,6 +134,9 @@ target_include_directories(PyPartMC PRIVATE ) target_compile_definitions(PyPartMC PRIVATE VERSION_INFO=${VERSION_INFO}) target_link_libraries(PyPartMC PRIVATE partmclib) +if (APPLE) + target_link_options(PyPartMC PRIVATE -Wl,-no_compact_unwind) +endif() ### pedantics ###################################################################################### From f42b9faf9c56c7e9390d6662e7a28daef9b25999 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Fri, 17 Jun 2022 21:43:44 -0500 Subject: [PATCH 6/8] try to solve "could not create compact unwind" linker warnings on macOS - fixed again? --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f5e7f94..f25695cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,6 +120,9 @@ add_dependencies(partmclib ${SUNDIALS_items}) target_include_directories(partmclib PRIVATE ${SUNDIALS_SOURCE_DIR}/include) target_include_directories(partmclib PRIVATE ${CMAKE_BINARY_DIR}/include) target_link_libraries(partmclib PRIVATE ${SUNDIALS_items}) +if (APPLE) + target_link_options(partmclib PRIVATE -Wl,-no_compact_unwind) +endif() ### PYBIND11 & PyPartMC ############################################################################ @@ -134,9 +137,6 @@ target_include_directories(PyPartMC PRIVATE ) target_compile_definitions(PyPartMC PRIVATE VERSION_INFO=${VERSION_INFO}) target_link_libraries(PyPartMC PRIVATE partmclib) -if (APPLE) - target_link_options(PyPartMC PRIVATE -Wl,-no_compact_unwind) -endif() ### pedantics ###################################################################################### From 54ce3be70460132b74c4b3889efee24d0a44efe8 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Fri, 17 Jun 2022 21:54:20 -0500 Subject: [PATCH 7/8] try to solve "could not create compact unwind" linker warnings on macOS - fixed again... --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f25695cc..080365ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,9 +120,6 @@ add_dependencies(partmclib ${SUNDIALS_items}) target_include_directories(partmclib PRIVATE ${SUNDIALS_SOURCE_DIR}/include) target_include_directories(partmclib PRIVATE ${CMAKE_BINARY_DIR}/include) target_link_libraries(partmclib PRIVATE ${SUNDIALS_items}) -if (APPLE) - target_link_options(partmclib PRIVATE -Wl,-no_compact_unwind) -endif() ### PYBIND11 & PyPartMC ############################################################################ @@ -137,6 +134,9 @@ target_include_directories(PyPartMC PRIVATE ) target_compile_definitions(PyPartMC PRIVATE VERSION_INFO=${VERSION_INFO}) target_link_libraries(PyPartMC PRIVATE partmclib) +if (APPLE) + target_link_options(PyPartMC PRIVATE -Wl,-no_compact_unwind -Wl,-keep_dwarf_unwind) +endif() ### pedantics ###################################################################################### From 81a10cea9f2f634f9fba6011a1339bbca8b9df67 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Fri, 17 Jun 2022 22:12:11 -0500 Subject: [PATCH 8/8] try to solve MACOSX_DEPLOYMENT_TARGET issue --- .github/workflows/tests+artifacts+pypi.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests+artifacts+pypi.yml b/.github/workflows/tests+artifacts+pypi.yml index 3c01ed5a..9ed6cb3a 100644 --- a/.github/workflows/tests+artifacts+pypi.yml +++ b/.github/workflows/tests+artifacts+pypi.yml @@ -30,7 +30,9 @@ jobs: runs-on: ${{ matrix.platform }} steps: - if: matrix.platform == 'macos-latest' - run: brew reinstall gcc + run: | + brew reinstall gcc + echo MACOSX_DEPLOYMENT_TARGET=`sw_vers -productVersion` >> $GITHUB_ENV - if: matrix.platform == 'windows-latest' uses: msys2/setup-msys2@v2