From 61b4f3256ff9c35190cb32fe4c30cf207eff3956 Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Wed, 14 Aug 2024 08:54:10 +0200 Subject: [PATCH 01/20] Boot the 2.3.7 version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cac2ca2d..f6c7492d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.10) set(MOORDYN_MAJOR_VERSION 2) set(MOORDYN_MINOR_VERSION 3) -set(MOORDYN_PATCH_VERSION 6) +set(MOORDYN_PATCH_VERSION 7) set(MOORDYN_VERSION ${MOORDYN_MAJOR_VERSION}.${MOORDYN_MINOR_VERSION}) project(Moordyn VERSION ${MOORDYN_VERSION}) From f534b48bd9eb508b00e6ff102e62a7d84addea0a Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Wed, 14 Aug 2024 13:09:54 +0200 Subject: [PATCH 02/20] fix(python-wheels): Test the wheels --- .github/workflows/python-wheels-test.yml | 48 ++++++++++++++++++++++++ .github/workflows/python-wheels.yml | 39 ++++++++++++++++++- 2 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/python-wheels-test.yml diff --git a/.github/workflows/python-wheels-test.yml b/.github/workflows/python-wheels-test.yml new file mode 100644 index 00000000..443fe114 --- /dev/null +++ b/.github/workflows/python-wheels-test.yml @@ -0,0 +1,48 @@ +name: Python-manylinux-arch + +on: + workflow_call: + inputs: + os: + description: 'Host OS' + required: false + type: string + default: '["ubuntu-22.04"]' + arch: + description: 'Architecture target' + required: true + type: string + +permissions: write-all + +jobs: + test_wheels: + name: Test Python wheels + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ${{ fromJSON(inputs.os) }} + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Download the wheels + uses: actions/download-artifact@v4 + with: + path: dist/ + pattern: python-wheels-${{runner.os}}_${{inputs.arch}}* + merge-multiple: true + + - name: Install and run + run: | + cd dist/ + pip debug --verbose + ls -alh + pip install $(ls *cp312*.whl) --break-system-packages + cd ../tests + python test_minimal.py + shell: bash diff --git a/.github/workflows/python-wheels.yml b/.github/workflows/python-wheels.yml index 9eaf8b8c..eb47dab1 100644 --- a/.github/workflows/python-wheels.yml +++ b/.github/workflows/python-wheels.yml @@ -69,10 +69,18 @@ jobs: name: Build MacOS_x86_64 uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-emulated.yml@master with: - os: '["macOS-latest"]' + os: '["macOS-13"]' arch: "x86_64" secrets: inherit + build_MacOS_arm64: + name: Build MacOS_arm64 + uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-emulated.yml@master + with: + os: '["macOS-14"]' + arch: "arm64" + secrets: inherit + build_Linux_i686: name: Build Linux_i686 uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-emulated.yml@master @@ -105,9 +113,36 @@ jobs: arch: "s390x" secrets: inherit + test_Linux_x86_64: + name: Test Linux_x86_64 + needs: [build_Linux_x86_64] + uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-test.yml@master + with: + os: '["ubuntu-22.04"]' + arch: "x86_64" + secrets: inherit + + test_Windows_AMD64: + name: Test Windows_AMD64 + needs: [build_Windows_AMD64] + uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-test.yml@master + with: + os: '["windows-latest"]' + arch: "AMD64" + secrets: inherit + + test_MacOS_arm64: + name: Test MacOS_arm64 + needs: [build_MacOS_arm64] + uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-test.yml@master + with: + os: '["macOS-14"]' + arch: "arm64" + secrets: inherit + publish: runs-on: ${{ matrix.os }} - needs: [build_wheels, build_Linux_x86_64, build_Windows_AMD64, build_MacOS_x86_64, build_Linux_i686, build_Linux_aarch64, build_Linux_ppc64le, build_Linux_s390x] + needs: [build_wheels, build_Linux_x86_64, build_Windows_AMD64, build_MacOS_x86_64, build_Linux_i686, build_Linux_aarch64, build_Linux_ppc64le, build_Linux_s390x, test_Linux_x86_64, test_Windows_AMD64, test_MacOS_x86_64] strategy: matrix: os: [ubuntu-22.04] From 154ab66d5d7442ad15fd31a855577a848f91f5a9 Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Mon, 19 Aug 2024 06:35:33 +0200 Subject: [PATCH 03/20] fix(ci): Update to VTK-9.3.1 --- .github/workflows/build-test.yml | 4 ++-- .github/workflows/python-wheels.yml | 4 ++-- .github/workflows/python-wrapper.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 1db65889..0a447c5b 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -13,8 +13,8 @@ env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release VTK_VERSION_MAJOR: 9 - VTK_VERSION_MINOR: 2 - VTK_VERSION_PATCH: 6 + VTK_VERSION_MINOR: 3 + VTK_VERSION_PATCH: 1 jobs: create_release: diff --git a/.github/workflows/python-wheels.yml b/.github/workflows/python-wheels.yml index eb47dab1..05d34561 100644 --- a/.github/workflows/python-wheels.yml +++ b/.github/workflows/python-wheels.yml @@ -10,8 +10,8 @@ env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release VTK_VERSION_MAJOR: 9 - VTK_VERSION_MINOR: 2 - VTK_VERSION_PATCH: 6 + VTK_VERSION_MINOR: 3 + VTK_VERSION_PATCH: 1 jobs: build_wheels: diff --git a/.github/workflows/python-wrapper.yml b/.github/workflows/python-wrapper.yml index ed80d237..9b3191dc 100644 --- a/.github/workflows/python-wrapper.yml +++ b/.github/workflows/python-wrapper.yml @@ -13,8 +13,8 @@ env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release VTK_VERSION_MAJOR: 9 - VTK_VERSION_MINOR: 2 - VTK_VERSION_PATCH: 6 + VTK_VERSION_MINOR: 3 + VTK_VERSION_PATCH: 1 jobs: test: From 7f20dab357b8863320d35bee1723f21099900023 Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Mon, 19 Aug 2024 06:36:12 +0200 Subject: [PATCH 04/20] fix(python): Enable MUSLLinux builds --- .github/workflows/python-wheels-emulated.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-wheels-emulated.yml b/.github/workflows/python-wheels-emulated.yml index c3144449..6fbcacec 100644 --- a/.github/workflows/python-wheels-emulated.yml +++ b/.github/workflows/python-wheels-emulated.yml @@ -24,7 +24,7 @@ jobs: os: ${{ fromJSON(inputs.os) }} env: # Skip 32-bit windows wheels builds. - CIBW_SKIP: "*-win32* *musllinux* pp38* pp39* pp310*" + CIBW_SKIP: "*-win32* pp38* pp39* pp310*" CIBW_ARCHS: ${{inputs.arch}} CIBW_ENVIRONMENT_LINUX: "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/project/install/lib" CIBW_BEFORE_ALL_LINUX: > From 224f8e4f31271a96b6a4ef170d8337d252305cb7 Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Mon, 19 Aug 2024 06:36:40 +0200 Subject: [PATCH 05/20] fix(python): Enable pypy builds again --- .github/workflows/python-wheels-emulated.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-wheels-emulated.yml b/.github/workflows/python-wheels-emulated.yml index 6fbcacec..3d06e5c4 100644 --- a/.github/workflows/python-wheels-emulated.yml +++ b/.github/workflows/python-wheels-emulated.yml @@ -24,7 +24,7 @@ jobs: os: ${{ fromJSON(inputs.os) }} env: # Skip 32-bit windows wheels builds. - CIBW_SKIP: "*-win32* pp38* pp39* pp310*" + CIBW_SKIP: "*-win32*" CIBW_ARCHS: ${{inputs.arch}} CIBW_ENVIRONMENT_LINUX: "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/project/install/lib" CIBW_BEFORE_ALL_LINUX: > From 2c9ea79d89002287bc0e718dcd433b9c891a3b92 Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Mon, 19 Aug 2024 06:41:02 +0200 Subject: [PATCH 06/20] fix(ci): List of dependencies to publish a package --- .github/workflows/python-wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-wheels.yml b/.github/workflows/python-wheels.yml index 05d34561..06660e7b 100644 --- a/.github/workflows/python-wheels.yml +++ b/.github/workflows/python-wheels.yml @@ -142,7 +142,7 @@ jobs: publish: runs-on: ${{ matrix.os }} - needs: [build_wheels, build_Linux_x86_64, build_Windows_AMD64, build_MacOS_x86_64, build_Linux_i686, build_Linux_aarch64, build_Linux_ppc64le, build_Linux_s390x, test_Linux_x86_64, test_Windows_AMD64, test_MacOS_x86_64] + needs: [build_wheels, build_Linux_x86_64, build_Windows_AMD64, build_MacOS_x86_64, build_MacOS_arm64, build_Linux_i686, build_Linux_aarch64, build_Linux_ppc64le, build_Linux_s390x, test_Linux_x86_64, test_Windows_AMD64, test_MacOS_arm64] strategy: matrix: os: [ubuntu-22.04] From 3be24786c21753f8aaba898ee4bdf551ca3196af Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Mon, 19 Aug 2024 07:00:01 +0200 Subject: [PATCH 07/20] fix(ci): Setting the VTK version --- .github/workflows/python-wheels-emulated.yml | 28 +++++++++++++++----- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python-wheels-emulated.yml b/.github/workflows/python-wheels-emulated.yml index 3d06e5c4..58404ad6 100644 --- a/.github/workflows/python-wheels-emulated.yml +++ b/.github/workflows/python-wheels-emulated.yml @@ -12,6 +12,21 @@ on: description: 'Architecture target' required: true type: string + vtk_major: + description: 'VTK major version' + required: false + type: string + default: '9' + vtk_minor: + description: 'VTK minor version' + required: false + type: string + default: '3' + vtk_patch: + description: 'VTK patch version' + required: false + type: string + default: '1' permissions: write-all @@ -32,9 +47,9 @@ jobs: mkdir -p vtk && tar -xvzf vtk-manylinux2014_`uname -m`.tar.gz -C vtk/ && if [ -d "vtk/lib" ]; then - VTK_DIR=vtk/lib/cmake/vtk-9.2/ + VTK_DIR=$(ls -d vtk/lib/cmake/vtk-*) else - VTK_DIR=vtk/lib64/cmake/vtk-9.2/ + VTK_DIR=$(ls -d vtk/lib64/cmake/vtk-*) fi && cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DVTK_DIR=$VTK_DIR -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=ON -DBUILD_TESTING=OFF && cmake --build build --config Release && @@ -42,13 +57,14 @@ jobs: rm -rf docs extern source tests CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel" CIBW_BEFORE_ALL_WINDOWS: > - cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DVTK_DIR=vtk/lib/cmake/vtk-9.2/ -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=ON -DBUILD_TESTING=OFF && + VTK_DIR=$(ls -d vtk/lib/cmake/vtk-*) && + cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DVTK_DIR=$VTK_DIR -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=ON -DBUILD_TESTING=OFF && cmake --build build --config Release && cmake --install build --config Release && rm -rf docs extern source tests CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path install/bin -w {dest_dir} {wheel}" CIBW_BEFORE_ALL_MACOS: > - cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=ON -DBUILD_TESTING=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 && + cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=OFF -DBUILD_TESTING=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 && cmake --build build --config Release && cmake --install build --config Release && rm -rf docs extern source tests @@ -73,14 +89,14 @@ jobs: - name: download pre-built VTK static library (Linux) uses: suisei-cn/actions-download-file@v1.6.0 with: - url: https://github.com/sanguinariojoe/vtk-builds/releases/download/VTK-9.2.6-static/vtk-manylinux2014_${{inputs.arch}}.tar.gz + url: https://github.com/sanguinariojoe/vtk-builds/releases/download/VTK-${{inputs.vtk_major}}.${{inputs.vtk_minor}}.${{inputs.vtk_patch}}-static/vtk-manylinux2014_${{inputs.arch}}.tar.gz target: ${{github.workspace}}/ if: runner.os == 'Linux' - name: download pre-built VTK static library (Windows) uses: suisei-cn/actions-download-file@v1.6.0 with: - url: https://github.com/sanguinariojoe/vtk-builds/releases/download/VTK-9.2.6-static/vtk-Windows-x86_64.tar.gz + url: https://github.com/sanguinariojoe/vtk-builds/releases/download/VTK-${{inputs.vtk_major}}.${{inputs.vtk_minor}}.${{inputs.vtk_patch}}-static/vtk-Windows-x86_64.tar.gz target: ${{github.workspace}}/ if: runner.os == 'Windows' From 584bda5581864d779d467875ee2b1a459cab8b91 Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Mon, 19 Aug 2024 07:05:55 +0200 Subject: [PATCH 08/20] fix(ci): Removed unused env variables --- .github/workflows/python-wheels.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/python-wheels.yml b/.github/workflows/python-wheels.yml index 06660e7b..63701445 100644 --- a/.github/workflows/python-wheels.yml +++ b/.github/workflows/python-wheels.yml @@ -6,13 +6,6 @@ on: permissions: write-all -env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: Release - VTK_VERSION_MAJOR: 9 - VTK_VERSION_MINOR: 3 - VTK_VERSION_PATCH: 1 - jobs: build_wheels: name: Build Python wheels x86_64 From e5280542245ae5e7617aafb011c0f0f7a85cf7f9 Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Mon, 19 Aug 2024 07:11:28 +0200 Subject: [PATCH 09/20] fix(ci): Use directly the VTK version placeholders --- .github/workflows/python-wheels-emulated.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-wheels-emulated.yml b/.github/workflows/python-wheels-emulated.yml index 58404ad6..3d1ed1dd 100644 --- a/.github/workflows/python-wheels-emulated.yml +++ b/.github/workflows/python-wheels-emulated.yml @@ -47,9 +47,9 @@ jobs: mkdir -p vtk && tar -xvzf vtk-manylinux2014_`uname -m`.tar.gz -C vtk/ && if [ -d "vtk/lib" ]; then - VTK_DIR=$(ls -d vtk/lib/cmake/vtk-*) + VTK_DIR=vtk/lib/cmake/vtk-${{inputs.vtk_major}}.${{inputs.vtk_minor}} else - VTK_DIR=$(ls -d vtk/lib64/cmake/vtk-*) + VTK_DIR=vtk/lib64/cmake/vtk-${{inputs.vtk_major}}.${{inputs.vtk_minor}} fi && cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DVTK_DIR=$VTK_DIR -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=ON -DBUILD_TESTING=OFF && cmake --build build --config Release && @@ -57,8 +57,7 @@ jobs: rm -rf docs extern source tests CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel" CIBW_BEFORE_ALL_WINDOWS: > - VTK_DIR=$(ls -d vtk/lib/cmake/vtk-*) && - cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DVTK_DIR=$VTK_DIR -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=ON -DBUILD_TESTING=OFF && + cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DVTK_DIR=vtk/lib/cmake/vtk-${{inputs.vtk_major}}.${{inputs.vtk_minor}} -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=ON -DBUILD_TESTING=OFF && cmake --build build --config Release && cmake --install build --config Release && rm -rf docs extern source tests From 63d8b723595a438410b8fbb9ba4fc86e6079bbe5 Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Mon, 19 Aug 2024 07:14:19 +0200 Subject: [PATCH 10/20] Temporary disable pypy builds which are broken --- .github/workflows/python-wheels-emulated.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-wheels-emulated.yml b/.github/workflows/python-wheels-emulated.yml index 3d1ed1dd..3520e0bb 100644 --- a/.github/workflows/python-wheels-emulated.yml +++ b/.github/workflows/python-wheels-emulated.yml @@ -39,7 +39,7 @@ jobs: os: ${{ fromJSON(inputs.os) }} env: # Skip 32-bit windows wheels builds. - CIBW_SKIP: "*-win32*" + CIBW_SKIP: "*-win32* pp38-* pp39-* pp310-*" CIBW_ARCHS: ${{inputs.arch}} CIBW_ENVIRONMENT_LINUX: "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/project/install/lib" CIBW_BEFORE_ALL_LINUX: > From a521444281e9117c09135640f49154c2d3d0a18a Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Mon, 19 Aug 2024 07:34:01 +0200 Subject: [PATCH 11/20] fix(python): Avoid using brew on MacOS-13 statically linking VTK --- .github/workflows/python-wheels-emulated.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-wheels-emulated.yml b/.github/workflows/python-wheels-emulated.yml index 3520e0bb..a5ff12af 100644 --- a/.github/workflows/python-wheels-emulated.yml +++ b/.github/workflows/python-wheels-emulated.yml @@ -63,7 +63,10 @@ jobs: rm -rf docs extern source tests CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path install/bin -w {dest_dir} {wheel}" CIBW_BEFORE_ALL_MACOS: > - cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=OFF -DBUILD_TESTING=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 && + echo "Considering vtk-macOS_`uname -m`.tar.gz..." && + mkdir -p vtk && + tar -xvzf vtk-macOS_`uname -m`.tar.gz -C vtk/ && + cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DVTK_DIR=vtk/lib/cmake/vtk-${{inputs.vtk_major}}.${{inputs.vtk_minor}} -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=ON -DBUILD_TESTING=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 && cmake --build build --config Release && cmake --install build --config Release && rm -rf docs extern source tests @@ -99,9 +102,11 @@ jobs: target: ${{github.workspace}}/ if: runner.os == 'Windows' - - name: Install VTK (MacOS) - run: | - brew install vtk + - name: download pre-built VTK static library (MacOS) + uses: suisei-cn/actions-download-file@v1.6.0 + with: + url: https://github.com/sanguinariojoe/vtk-builds/releases/download/VTK-${{inputs.vtk_major}}.${{inputs.vtk_minor}}.${{inputs.vtk_patch}}-static/vtk-macOS_${{inputs.arch}}.tar.gz + target: ${{github.workspace}}/ if: runner.os == 'MacOS' - name: Create folders From 32a9fcae8a8aee0558c632fe236f92d9e6bfda8d Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Mon, 19 Aug 2024 07:41:08 +0200 Subject: [PATCH 12/20] fix(python): Set the install name id on MacOS --- .github/workflows/python-wheels-emulated.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-wheels-emulated.yml b/.github/workflows/python-wheels-emulated.yml index a5ff12af..c310ce9e 100644 --- a/.github/workflows/python-wheels-emulated.yml +++ b/.github/workflows/python-wheels-emulated.yml @@ -66,7 +66,7 @@ jobs: echo "Considering vtk-macOS_`uname -m`.tar.gz..." && mkdir -p vtk && tar -xvzf vtk-macOS_`uname -m`.tar.gz -C vtk/ && - cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DVTK_DIR=vtk/lib/cmake/vtk-${{inputs.vtk_major}}.${{inputs.vtk_minor}} -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=ON -DBUILD_TESTING=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 && + cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DVTK_DIR=vtk/lib/cmake/vtk-${{inputs.vtk_major}}.${{inputs.vtk_minor}} -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=ON -DBUILD_TESTING=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_INSTALL_NAME_DIR:PATH=$(pwd)/install/lib && cmake --build build --config Release && cmake --install build --config Release && rm -rf docs extern source tests From 9422fb21063254dc3e943f5a8b0399341aed491b Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Mon, 19 Aug 2024 07:48:12 +0200 Subject: [PATCH 13/20] fix(ci): The VTK tar.gz can be directly extracted on MacOS --- .github/workflows/python-wheels-emulated.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-wheels-emulated.yml b/.github/workflows/python-wheels-emulated.yml index c310ce9e..4dab83ef 100644 --- a/.github/workflows/python-wheels-emulated.yml +++ b/.github/workflows/python-wheels-emulated.yml @@ -63,9 +63,6 @@ jobs: rm -rf docs extern source tests CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path install/bin -w {dest_dir} {wheel}" CIBW_BEFORE_ALL_MACOS: > - echo "Considering vtk-macOS_`uname -m`.tar.gz..." && - mkdir -p vtk && - tar -xvzf vtk-macOS_`uname -m`.tar.gz -C vtk/ && cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DVTK_DIR=vtk/lib/cmake/vtk-${{inputs.vtk_major}}.${{inputs.vtk_minor}} -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=ON -DBUILD_TESTING=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_INSTALL_NAME_DIR:PATH=$(pwd)/install/lib && cmake --build build --config Release && cmake --install build --config Release && @@ -120,6 +117,11 @@ jobs: tar -xvzf vtk-Windows-x86_64.tar.gz -C vtk/ if: runner.os == 'Windows' + - name: Extract VTK tgz (MacOS) + run: | + tar -xvzf vtk-macOS_${{inputs.arch}}.tar.gz -C vtk/ + if: runner.os == 'MacOS' + - name: Set up QEMU uses: docker/setup-qemu-action@v3 with: From 63698bd87f4224c8d062f4b3b732b2f52e5dbeef Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Mon, 19 Aug 2024 07:50:10 +0200 Subject: [PATCH 14/20] fix(ci): Ignore MUSLLinux wheels when testing --- .github/workflows/python-wheels-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-wheels-test.yml b/.github/workflows/python-wheels-test.yml index 443fe114..5a6b69be 100644 --- a/.github/workflows/python-wheels-test.yml +++ b/.github/workflows/python-wheels-test.yml @@ -42,7 +42,7 @@ jobs: cd dist/ pip debug --verbose ls -alh - pip install $(ls *cp312*.whl) --break-system-packages + pip install $(ls *cp312*.whl -I "*musllinux*") --break-system-packages cd ../tests python test_minimal.py shell: bash From 6ef95f92ab826f8f4e09661728a54f7d6cb3d870 Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Mon, 19 Aug 2024 07:57:25 +0200 Subject: [PATCH 15/20] fix(ci): Wrong VTK URI --- .github/workflows/python-wheels-emulated.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-wheels-emulated.yml b/.github/workflows/python-wheels-emulated.yml index 4dab83ef..d51cafae 100644 --- a/.github/workflows/python-wheels-emulated.yml +++ b/.github/workflows/python-wheels-emulated.yml @@ -102,7 +102,7 @@ jobs: - name: download pre-built VTK static library (MacOS) uses: suisei-cn/actions-download-file@v1.6.0 with: - url: https://github.com/sanguinariojoe/vtk-builds/releases/download/VTK-${{inputs.vtk_major}}.${{inputs.vtk_minor}}.${{inputs.vtk_patch}}-static/vtk-macOS_${{inputs.arch}}.tar.gz + url: https://github.com/sanguinariojoe/vtk-builds/releases/download/VTK-${{inputs.vtk_major}}.${{inputs.vtk_minor}}.${{inputs.vtk_patch}}-static/vtk-macOS-${{inputs.arch}}.tar.gz target: ${{github.workspace}}/ if: runner.os == 'MacOS' @@ -119,7 +119,7 @@ jobs: - name: Extract VTK tgz (MacOS) run: | - tar -xvzf vtk-macOS_${{inputs.arch}}.tar.gz -C vtk/ + tar -xvzf vtk-macOS-${{inputs.arch}}.tar.gz -C vtk/ if: runner.os == 'MacOS' - name: Set up QEMU From f44e9c4df1c1c9645d1a08255f16722baa519188 Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Mon, 19 Aug 2024 08:09:10 +0200 Subject: [PATCH 16/20] fix(python): Set the MACOSX_DEPLOYMENT_TARGET to 10.15 --- .github/workflows/python-wheels-emulated.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-wheels-emulated.yml b/.github/workflows/python-wheels-emulated.yml index d51cafae..d30d9163 100644 --- a/.github/workflows/python-wheels-emulated.yml +++ b/.github/workflows/python-wheels-emulated.yml @@ -62,6 +62,7 @@ jobs: cmake --install build --config Release && rm -rf docs extern source tests CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path install/bin -w {dest_dir} {wheel}" + CIBW_ENVIRONMENT_MACOS: 'MACOSX_DEPLOYMENT_TARGET="10.15"' CIBW_BEFORE_ALL_MACOS: > cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DVTK_DIR=vtk/lib/cmake/vtk-${{inputs.vtk_major}}.${{inputs.vtk_minor}} -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=ON -DBUILD_TESTING=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_INSTALL_NAME_DIR:PATH=$(pwd)/install/lib && cmake --build build --config Release && From 20a35bf0ad51f4500b84b03e266848f503665720 Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Mon, 19 Aug 2024 08:18:01 +0200 Subject: [PATCH 17/20] fix(ci): Remove the MUSLLinux wheels before testing --- .github/workflows/python-wheels-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-wheels-test.yml b/.github/workflows/python-wheels-test.yml index 5a6b69be..0c959706 100644 --- a/.github/workflows/python-wheels-test.yml +++ b/.github/workflows/python-wheels-test.yml @@ -40,9 +40,10 @@ jobs: - name: Install and run run: | cd dist/ + rm -f *musllinux*.whl pip debug --verbose ls -alh - pip install $(ls *cp312*.whl -I "*musllinux*") --break-system-packages + pip install $(ls *cp312*.whl) --break-system-packages cd ../tests python test_minimal.py shell: bash From c005d68c9fd29563e88298414ca3d7ea49b50bd9 Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Mon, 19 Aug 2024 09:53:35 +0200 Subject: [PATCH 18/20] Temporary disable PowerPC on MUSLLinux, since there is a long double inconsistency --- .github/workflows/python-wheels-emulated.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-wheels-emulated.yml b/.github/workflows/python-wheels-emulated.yml index d30d9163..8dc1f936 100644 --- a/.github/workflows/python-wheels-emulated.yml +++ b/.github/workflows/python-wheels-emulated.yml @@ -39,7 +39,7 @@ jobs: os: ${{ fromJSON(inputs.os) }} env: # Skip 32-bit windows wheels builds. - CIBW_SKIP: "*-win32* pp38-* pp39-* pp310-*" + CIBW_SKIP: "*-win32* pp38-* pp39-* pp310-* *musllinux*ppc64le*" CIBW_ARCHS: ${{inputs.arch}} CIBW_ENVIRONMENT_LINUX: "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/project/install/lib" CIBW_BEFORE_ALL_LINUX: > From e5fe6190d5fdc67f6bb48c3fc7133a6ed5c5a4ec Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Mon, 19 Aug 2024 13:20:25 +0200 Subject: [PATCH 19/20] fix(python): Use the MUSLLinux VTK compilation when needed --- .github/workflows/python-wheels-emulated.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-wheels-emulated.yml b/.github/workflows/python-wheels-emulated.yml index 8dc1f936..1059faa8 100644 --- a/.github/workflows/python-wheels-emulated.yml +++ b/.github/workflows/python-wheels-emulated.yml @@ -39,13 +39,18 @@ jobs: os: ${{ fromJSON(inputs.os) }} env: # Skip 32-bit windows wheels builds. - CIBW_SKIP: "*-win32* pp38-* pp39-* pp310-* *musllinux*ppc64le*" + CIBW_SKIP: "*-win32* pp38-* pp39-* pp310-*" CIBW_ARCHS: ${{inputs.arch}} CIBW_ENVIRONMENT_LINUX: "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/project/install/lib" CIBW_BEFORE_ALL_LINUX: > - echo "Considering vtk-manylinux2014_`uname -m`.tar.gz..." && + if pip debug --verbose | grep -q 'musllinux'; then + DISTRO=musllinux_1_2 + else + DISTRO=manylinux2014 + fi && + echo "Considering vtk-${DISTRO}_`uname -m`.tar.gz..." && mkdir -p vtk && - tar -xvzf vtk-manylinux2014_`uname -m`.tar.gz -C vtk/ && + tar -xvzf vtk-${DISTRO}_`uname -m`.tar.gz -C vtk/ && if [ -d "vtk/lib" ]; then VTK_DIR=vtk/lib/cmake/vtk-${{inputs.vtk_major}}.${{inputs.vtk_minor}} else @@ -86,13 +91,20 @@ jobs: cat pyproject.toml shell: bash - - name: download pre-built VTK static library (Linux) + - name: download pre-built VTK static library (ManyLinux) uses: suisei-cn/actions-download-file@v1.6.0 with: url: https://github.com/sanguinariojoe/vtk-builds/releases/download/VTK-${{inputs.vtk_major}}.${{inputs.vtk_minor}}.${{inputs.vtk_patch}}-static/vtk-manylinux2014_${{inputs.arch}}.tar.gz target: ${{github.workspace}}/ if: runner.os == 'Linux' + - name: download pre-built VTK static library (MUSLLinux) + uses: suisei-cn/actions-download-file@v1.6.0 + with: + url: https://github.com/sanguinariojoe/vtk-builds/releases/download/VTK-${{inputs.vtk_major}}.${{inputs.vtk_minor}}.${{inputs.vtk_patch}}-static/vtk-musllinux_1_2_${{inputs.arch}}.tar.gz + target: ${{github.workspace}}/ + if: runner.os == 'Linux' + - name: download pre-built VTK static library (Windows) uses: suisei-cn/actions-download-file@v1.6.0 with: From 4b7a9f0a5812b9176e6aa85c096031dfe8d9e3bd Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Fri, 23 Aug 2024 06:23:21 +0200 Subject: [PATCH 20/20] Update the changelog --- CHANGELOG.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11b92da1..2cdd5889 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,23 @@ +## [](https://github.com/core-marine-dev/MoorDyn/compare/v2.3.6...v) (2024-08-23) + +### Bug Fixes + +* **ci:** Ignore MUSLLinux wheels when testing ([63698bd](https://github.com/core-marine-dev/MoorDyn/commit/63698bd87f4224c8d062f4b3b732b2f52e5dbeef)) +* **ci:** List of dependencies to publish a package ([2c9ea79](https://github.com/core-marine-dev/MoorDyn/commit/2c9ea79d89002287bc0e718dcd433b9c891a3b92)) +* **ci:** Remove the MUSLLinux wheels before testing ([20a35bf](https://github.com/core-marine-dev/MoorDyn/commit/20a35bf0ad51f4500b84b03e266848f503665720)) +* **ci:** Removed unused env variables ([584bda5](https://github.com/core-marine-dev/MoorDyn/commit/584bda5581864d779d467875ee2b1a459cab8b91)) +* **ci:** Setting the VTK version ([3be2478](https://github.com/core-marine-dev/MoorDyn/commit/3be24786c21753f8aaba898ee4bdf551ca3196af)) +* **ci:** The VTK tar.gz can be directly extracted on MacOS ([9422fb2](https://github.com/core-marine-dev/MoorDyn/commit/9422fb21063254dc3e943f5a8b0399341aed491b)) +* **ci:** Update to VTK-9.3.1 ([154ab66](https://github.com/core-marine-dev/MoorDyn/commit/154ab66d5d7442ad15fd31a855577a848f91f5a9)) +* **ci:** Use directly the VTK version placeholders ([e528054](https://github.com/core-marine-dev/MoorDyn/commit/e5280542245ae5e7617aafb011c0f0f7a85cf7f9)) +* **ci:** Wrong VTK URI ([6ef95f9](https://github.com/core-marine-dev/MoorDyn/commit/6ef95f92ab826f8f4e09661728a54f7d6cb3d870)) +* **python-wheels:** Test the wheels ([f534b48](https://github.com/core-marine-dev/MoorDyn/commit/f534b48bd9eb508b00e6ff102e62a7d84addea0a)) +* **python:** Avoid using brew on MacOS-13 statically linking VTK ([a521444](https://github.com/core-marine-dev/MoorDyn/commit/a521444281e9117c09135640f49154c2d3d0a18a)) +* **python:** Enable MUSLLinux builds ([7f20dab](https://github.com/core-marine-dev/MoorDyn/commit/7f20dab357b8863320d35bee1723f21099900023)) +* **python:** Enable pypy builds again ([224f8e4](https://github.com/core-marine-dev/MoorDyn/commit/224f8e4f31271a96b6a4ef170d8337d252305cb7)) +* **python:** Set the install name id on MacOS ([32a9fca](https://github.com/core-marine-dev/MoorDyn/commit/32a9fcae8a8aee0558c632fe236f92d9e6bfda8d)) +* **python:** Set the MACOSX_DEPLOYMENT_TARGET to 10.15 ([f44e9c4](https://github.com/core-marine-dev/MoorDyn/commit/f44e9c4df1c1c9645d1a08255f16722baa519188)) +* **python:** Use the MUSLLinux VTK compilation when needed ([e5fe619](https://github.com/core-marine-dev/MoorDyn/commit/e5fe6190d5fdc67f6bb48c3fc7133a6ed5c5a4ec)) ## [](https://github.com/core-marine-dev/MoorDyn/compare/v2.3.5...v) (2024-08-14) ### Bug Fixes