From 34f3439b633772b19d3469d0e1e8e4a7af615712 Mon Sep 17 00:00:00 2001 From: Johnny Date: Fri, 28 Mar 2025 07:44:41 +0100 Subject: [PATCH 1/8] fix commit --- .github/workflows/cibuildwheel_config.toml | 9 ++++-- .github/workflows/publish.yml | 18 ++++++------ .github/workflows/test_build.yml | 7 +++-- .github/workflows/test_linux.yml | 34 ++++++++++++++++------ .github/workflows/test_macos.yml | 26 ++++++++++++++--- .github/workflows/test_windows.yml | 10 +++++-- 6 files changed, 73 insertions(+), 31 deletions(-) diff --git a/.github/workflows/cibuildwheel_config.toml b/.github/workflows/cibuildwheel_config.toml index 78d5ab3..ae1277b 100644 --- a/.github/workflows/cibuildwheel_config.toml +++ b/.github/workflows/cibuildwheel_config.toml @@ -1,11 +1,11 @@ [tool.cibuildwheel] -skip = "cp36-*" # scikit-build-core requires >=3.7 +skip = "cp36-*" # scikit-build-core requires >=3.9 build-verbosity = 3 [tool.cibuildwheel.linux] before-all = [ "yum remove -y cmake", - "yum install -y libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel mesa-libGL-devel mesa-libGL libXi-devel freeglut-devel mesa-libEGL-devel" + "yum install -y llvm-devel clang-devel eigen3 eigen3-devel libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel mesa-libGL-devel mesa-libGL libXi-devel freeglut-devel mesa-libEGL-devel" ] # Tell auditwheel _not_ to bundle libEGL, as it is platform/driver specific won't work (segfaults). We need to use the system libEGL. # Fortunately almost all linux systems should have this, but might cause linking errors at runtime if not @@ -18,4 +18,7 @@ CMAKE_ARGS = "DPOLYSCOPE_BACKEND_OPENGL3_EGL=ON" # musllinux builds on an Alpinx Linux image, need different package names [[tool.cibuildwheel.overrides]] select = "*-musllinux*" -before-all = "apk add libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev freeglut-dev mesa-dev mesa-gl mesa-egl" \ No newline at end of file +before-all = "gcc g++ libeigen3-dev apk add libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev freeglut-dev mesa-dev mesa-gl mesa-egl" + +manylinux-x86_64-image = "quay.io/pypa/manylinux_2_28_x86_64" +manylinux-aarch64-image = "quay.io/pypa/manylinux_2_28_aarch64" \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1341791..2ac61e3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: # macos-13 is an intel runner, macos-14 is apple silicon - os: [ubuntu-latest, windows-latest, macos-13, macos-14] + os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-latest] name: Build wheels ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -34,10 +34,10 @@ jobs: python -m build --sdist - name: Run cibuildwheel - uses: pypa/cibuildwheel@v2.21 + uses: pypa/cibuildwheel@v2.23.2 with: config-file: ".github/workflows/cibuildwheel_config.toml" - + - name: Copy source distribution into wheelhouse if: runner.os == 'Linux' run: mv dist/*.tar.gz wheelhouse/ @@ -46,10 +46,10 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@v4 with: - name: cibw-wheels-${{ matrix.os }} + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} path: | ./wheelhouse/*.whl - ./wheelhouse/*.tar.gz + ./wheelhouse/*.tar.gz overwrite: true # Push the resulting binaries to pypi on a tag starting with 'v' @@ -68,7 +68,7 @@ jobs: id-token: write steps: - name: Download built wheels artifact # downloads from the jobs storage from the previous step - uses: actions/download-artifact@v4.1.7 + uses: actions/download-artifact@v4.2.1 with: # omitting the `name: ` field downloads all artifacts from this workflow path: dist @@ -77,10 +77,10 @@ jobs: run: ls dist | cat # piping through cat prints one per line # dist directory has subdirs from the different jobs, merge them into one directory and delete - # the empty leftover dirs - - name: Flatten directory + # the empty leftover dirs + - name: Flatten directory run: find dist -mindepth 2 -type f -exec mv -t dist {} + && find dist -type d -empty -delete - + - name: List downloaded files from artifact after flatten run: ls dist | cat # piping through cat prints one per line diff --git a/.github/workflows/test_build.yml b/.github/workflows/test_build.yml index d13c066..33aeb0f 100644 --- a/.github/workflows/test_build.yml +++ b/.github/workflows/test_build.yml @@ -1,3 +1,4 @@ + name: Test Build # NOTE: build logic is duplicated here and in publish.yml @@ -21,7 +22,7 @@ jobs: fail-fast: false matrix: # macos-13 is an intel runner, macos-14 is apple silicon - os: [ubuntu-latest, windows-latest, macos-13, macos-14] + os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-latest] name: Build wheels ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -38,7 +39,7 @@ jobs: python -m build --sdist - name: Run cibuildwheel - uses: pypa/cibuildwheel@v2.21 + uses: pypa/cibuildwheel@v2.23.2 with: config-file: ".github/workflows/cibuildwheel_config.toml" @@ -46,7 +47,7 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@v4 with: - name: cibw-wheels-${{ matrix.os }} + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} path: | ./wheelhouse/*.whl ./wheelhouse/*.tar.gz diff --git a/.github/workflows/test_linux.yml b/.github/workflows/test_linux.yml index 035eb6e..6565b16 100644 --- a/.github/workflows/test_linux.yml +++ b/.github/workflows/test_linux.yml @@ -8,32 +8,48 @@ on: jobs: build: - runs-on: ubuntu-latest + # Only run if the commit message contains '[ci build]' if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')" + name: Build wheels - ${{ matrix.os }}-${{ matrix.arch }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + arch: x64 + - os: ubuntu-24.04-arm + arch: aarch64 + steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: submodules: 'recursive' - - - uses: actions/setup-python@v2 + + - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.9' + python-version: '3.12' - name: install packages - run: sudo apt-get update && sudo apt-get install -y xorg-dev libglu1-mesa-dev xpra xserver-xorg-video-dummy freeglut3-dev - + run: | + sudo apt-get update + sudo apt-get install -y gcc g++ libeigen3-dev xorg-dev libglu1-mesa-dev xpra xserver-xorg-video-dummy freeglut3-dev + - name: install python packages run: python3 -m pip install numpy - name: configure - run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") -DPOLYSCOPE_BACKEND_OPENGL3_EGL=ON .. + run: | + mkdir build + cd build + cmake -DCMAKE_BUILD_TYPE=Debug -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") -DPOLYSCOPE_BACKEND_OPENGL3_EGL=ON .. - name: build run: cd build && make - name: run test backend mock run: python3 test/polyscope_test.py -v - + - name: run test backend EGL run: python3 test/polyscope_test.py -v backend=openGL3_egl \ No newline at end of file diff --git a/.github/workflows/test_macos.yml b/.github/workflows/test_macos.yml index ac8c2c7..b6a085f 100644 --- a/.github/workflows/test_macos.yml +++ b/.github/workflows/test_macos.yml @@ -8,21 +8,39 @@ on: jobs: build: - runs-on: macos-latest + # Only run if the commit message contains '[ci build]' if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')" + name: Build wheels - ${{ matrix.os }}-${{ matrix.arch }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: macos-13 + arch: x64 + - os: macos-latest + arch: arm64 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: submodules: 'recursive' - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.9' + python-version: '3.12' - name: install python packages run: python -m pip install numpy + - name: install packages + run: | + brew install eigen + brew install glfw + brew install freeglut + brew install xorg-server + brew install xpra + - name: configure run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DPOLYSCOPE_BACKEND_OPENGL3_GLFW=ON -DPOLYSCOPE_BACKEND_OPENGL_MOCK=ON .. diff --git a/.github/workflows/test_windows.yml b/.github/workflows/test_windows.yml index 147166d..644f5c7 100644 --- a/.github/workflows/test_windows.yml +++ b/.github/workflows/test_windows.yml @@ -11,18 +11,22 @@ jobs: runs-on: windows-latest if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')" steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: submodules: 'recursive' - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.7' + python-version: '3.12' - name: install python packages run: python -m pip install numpy + - name: install packages + run: | + choco install -y eigen + - name: configure run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. From 30e1d9e97754a76f1d54bdff708be52853527396 Mon Sep 17 00:00:00 2001 From: Johnny Date: Tue, 1 Apr 2025 00:29:03 +0200 Subject: [PATCH 2/8] revert packages --- .github/workflows/cibuildwheel_config.toml | 6 +++--- .github/workflows/test_linux.yml | 2 +- .github/workflows/test_macos.yml | 8 -------- .github/workflows/test_windows.yml | 4 ---- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/.github/workflows/cibuildwheel_config.toml b/.github/workflows/cibuildwheel_config.toml index ae1277b..cb58235 100644 --- a/.github/workflows/cibuildwheel_config.toml +++ b/.github/workflows/cibuildwheel_config.toml @@ -1,11 +1,11 @@ [tool.cibuildwheel] -skip = "cp36-*" # scikit-build-core requires >=3.9 +skip = "cp36-*" # scikit-build-core requires >=3.6 build-verbosity = 3 [tool.cibuildwheel.linux] before-all = [ "yum remove -y cmake", - "yum install -y llvm-devel clang-devel eigen3 eigen3-devel libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel mesa-libGL-devel mesa-libGL libXi-devel freeglut-devel mesa-libEGL-devel" + "yum install -y libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel mesa-libGL-devel mesa-libGL libXi-devel freeglut-devel mesa-libEGL-devel" ] # Tell auditwheel _not_ to bundle libEGL, as it is platform/driver specific won't work (segfaults). We need to use the system libEGL. # Fortunately almost all linux systems should have this, but might cause linking errors at runtime if not @@ -18,7 +18,7 @@ CMAKE_ARGS = "DPOLYSCOPE_BACKEND_OPENGL3_EGL=ON" # musllinux builds on an Alpinx Linux image, need different package names [[tool.cibuildwheel.overrides]] select = "*-musllinux*" -before-all = "gcc g++ libeigen3-dev apk add libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev freeglut-dev mesa-dev mesa-gl mesa-egl" +before-all = "apk add libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev freeglut-dev mesa-dev mesa-gl mesa-egl" manylinux-x86_64-image = "quay.io/pypa/manylinux_2_28_x86_64" manylinux-aarch64-image = "quay.io/pypa/manylinux_2_28_aarch64" \ No newline at end of file diff --git a/.github/workflows/test_linux.yml b/.github/workflows/test_linux.yml index 6565b16..e08dec9 100644 --- a/.github/workflows/test_linux.yml +++ b/.github/workflows/test_linux.yml @@ -34,7 +34,7 @@ jobs: - name: install packages run: | sudo apt-get update - sudo apt-get install -y gcc g++ libeigen3-dev xorg-dev libglu1-mesa-dev xpra xserver-xorg-video-dummy freeglut3-dev + run: sudo apt-get update && sudo apt-get install -y xorg-dev libglu1-mesa-dev xpra xserver-xorg-video-dummy freeglut3-dev - name: install python packages run: python3 -m pip install numpy diff --git a/.github/workflows/test_macos.yml b/.github/workflows/test_macos.yml index b6a085f..bb1f364 100644 --- a/.github/workflows/test_macos.yml +++ b/.github/workflows/test_macos.yml @@ -33,14 +33,6 @@ jobs: - name: install python packages run: python -m pip install numpy - - name: install packages - run: | - brew install eigen - brew install glfw - brew install freeglut - brew install xorg-server - brew install xpra - - name: configure run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DPOLYSCOPE_BACKEND_OPENGL3_GLFW=ON -DPOLYSCOPE_BACKEND_OPENGL_MOCK=ON .. diff --git a/.github/workflows/test_windows.yml b/.github/workflows/test_windows.yml index 644f5c7..e5d0269 100644 --- a/.github/workflows/test_windows.yml +++ b/.github/workflows/test_windows.yml @@ -23,10 +23,6 @@ jobs: - name: install python packages run: python -m pip install numpy - - name: install packages - run: | - choco install -y eigen - - name: configure run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. From 2a0ec517d26f2e9d66072c9aef5323e229495283 Mon Sep 17 00:00:00 2001 From: Johnny Date: Tue, 1 Apr 2025 00:39:36 +0200 Subject: [PATCH 3/8] revert packages --- .github/workflows/test_linux.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test_linux.yml b/.github/workflows/test_linux.yml index e08dec9..f67aa4c 100644 --- a/.github/workflows/test_linux.yml +++ b/.github/workflows/test_linux.yml @@ -32,9 +32,7 @@ jobs: python-version: '3.12' - name: install packages - run: | - sudo apt-get update - run: sudo apt-get update && sudo apt-get install -y xorg-dev libglu1-mesa-dev xpra xserver-xorg-video-dummy freeglut3-dev + run: sudo apt-get update && sudo apt-get install -y xorg-dev libglu1-mesa-dev xpra xserver-xorg-video-dummy freeglut3-dev - name: install python packages run: python3 -m pip install numpy From 03dce58a1eabc6f5fcc3127c2fd5c6aed0a0aea4 Mon Sep 17 00:00:00 2001 From: Nicholas Sharp Date: Tue, 1 Apr 2025 16:21:55 -0700 Subject: [PATCH 4/8] fix comment and mirror across files --- .github/workflows/test_linux.yml | 2 +- .github/workflows/test_macos.yml | 2 +- .github/workflows/test_windows.yml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_linux.yml b/.github/workflows/test_linux.yml index f67aa4c..0504655 100644 --- a/.github/workflows/test_linux.yml +++ b/.github/workflows/test_linux.yml @@ -8,7 +8,7 @@ on: jobs: build: - # Only run if the commit message contains '[ci build]' + # Skip running if the commit message contains '[ci skip]' if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')" name: Build wheels - ${{ matrix.os }}-${{ matrix.arch }} runs-on: ${{ matrix.os }} diff --git a/.github/workflows/test_macos.yml b/.github/workflows/test_macos.yml index bb1f364..013055c 100644 --- a/.github/workflows/test_macos.yml +++ b/.github/workflows/test_macos.yml @@ -8,7 +8,7 @@ on: jobs: build: - # Only run if the commit message contains '[ci build]' + # Skip running if the commit message contains '[ci skip]' if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')" name: Build wheels - ${{ matrix.os }}-${{ matrix.arch }} runs-on: ${{ matrix.os }} diff --git a/.github/workflows/test_windows.yml b/.github/workflows/test_windows.yml index e5d0269..9a6a464 100644 --- a/.github/workflows/test_windows.yml +++ b/.github/workflows/test_windows.yml @@ -9,6 +9,7 @@ on: jobs: build: runs-on: windows-latest + # Skip running if the commit message contains '[ci skip]' if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')" steps: - uses: actions/checkout@v4 From 2450a9e81804d4052873afcda8af2facc225ade2 Mon Sep 17 00:00:00 2001 From: Nicholas Sharp Date: Tue, 1 Apr 2025 16:28:12 -0700 Subject: [PATCH 5/8] parallel structure for windows test --- .github/workflows/test_windows.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_windows.yml b/.github/workflows/test_windows.yml index 9a6a464..afbfa58 100644 --- a/.github/workflows/test_windows.yml +++ b/.github/workflows/test_windows.yml @@ -8,9 +8,20 @@ on: jobs: build: - runs-on: windows-latest # Skip running if the commit message contains '[ci skip]' if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')" + name: Build wheels - ${{ matrix.os }}-${{ matrix.arch }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: windows-latest + arch: x64 + # Windows ARM is not available as of Mar 2025, but coming soon: https://github.com/github/roadmap/issues/1098 + + + steps: - uses: actions/checkout@v4 with: From 1492ef91635b34e6d030151461b3027faff54535 Mon Sep 17 00:00:00 2001 From: Nicholas Sharp Date: Tue, 1 Apr 2025 16:28:43 -0700 Subject: [PATCH 6/8] try without changing image --- .github/workflows/cibuildwheel_config.toml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/cibuildwheel_config.toml b/.github/workflows/cibuildwheel_config.toml index cb58235..f0ae892 100644 --- a/.github/workflows/cibuildwheel_config.toml +++ b/.github/workflows/cibuildwheel_config.toml @@ -18,7 +18,4 @@ CMAKE_ARGS = "DPOLYSCOPE_BACKEND_OPENGL3_EGL=ON" # musllinux builds on an Alpinx Linux image, need different package names [[tool.cibuildwheel.overrides]] select = "*-musllinux*" -before-all = "apk add libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev freeglut-dev mesa-dev mesa-gl mesa-egl" - -manylinux-x86_64-image = "quay.io/pypa/manylinux_2_28_x86_64" -manylinux-aarch64-image = "quay.io/pypa/manylinux_2_28_aarch64" \ No newline at end of file +before-all = "apk add libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev freeglut-dev mesa-dev mesa-gl mesa-egl" \ No newline at end of file From 666fa03b337fe53cbb7855cc7c55b104daedb366 Mon Sep 17 00:00:00 2001 From: Nicholas Sharp Date: Tue, 1 Apr 2025 16:29:38 -0700 Subject: [PATCH 7/8] fix comment typo --- .github/workflows/cibuildwheel_config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cibuildwheel_config.toml b/.github/workflows/cibuildwheel_config.toml index f0ae892..78d5ab3 100644 --- a/.github/workflows/cibuildwheel_config.toml +++ b/.github/workflows/cibuildwheel_config.toml @@ -1,5 +1,5 @@ [tool.cibuildwheel] -skip = "cp36-*" # scikit-build-core requires >=3.6 +skip = "cp36-*" # scikit-build-core requires >=3.7 build-verbosity = 3 [tool.cibuildwheel.linux] From 88be02a82ae204c3f8c393981a60dc63b1d8250f Mon Sep 17 00:00:00 2001 From: Nicholas Sharp Date: Tue, 1 Apr 2025 16:30:40 -0700 Subject: [PATCH 8/8] minor comment fixes --- .github/workflows/publish.yml | 2 +- .github/workflows/test_build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2ac61e3..c55cb4c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - # macos-13 is an intel runner, macos-14 is apple silicon + # macos-13 is an intel runner, macos-14+ is apple silicon os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-latest] name: Build wheels ${{ matrix.os }} diff --git a/.github/workflows/test_build.yml b/.github/workflows/test_build.yml index 33aeb0f..3171a0e 100644 --- a/.github/workflows/test_build.yml +++ b/.github/workflows/test_build.yml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - # macos-13 is an intel runner, macos-14 is apple silicon + # macos-13 is an intel runner, macos-14+ is apple silicon os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-latest] name: Build wheels ${{ matrix.os }}