diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1341791..c55cb4c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,8 +16,8 @@ jobs: strategy: matrix: - # macos-13 is an intel runner, macos-14 is apple silicon - os: [ubuntu-latest, windows-latest, macos-13, macos-14] + # 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 }} 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..3171a0e 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 @@ -20,8 +21,8 @@ jobs: strategy: fail-fast: false matrix: - # macos-13 is an intel runner, macos-14 is apple silicon - os: [ubuntu-latest, windows-latest, macos-13, macos-14] + # 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 }} 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..0504655 100644 --- a/.github/workflows/test_linux.yml +++ b/.github/workflows/test_linux.yml @@ -8,32 +8,46 @@ on: jobs: build: - runs-on: ubuntu-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: 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 - + - 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..013055c 100644 --- a/.github/workflows/test_macos.yml +++ b/.github/workflows/test_macos.yml @@ -8,17 +8,27 @@ on: jobs: build: - runs-on: macos-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: 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 diff --git a/.github/workflows/test_windows.yml b/.github/workflows/test_windows.yml index 147166d..afbfa58 100644 --- a/.github/workflows/test_windows.yml +++ b/.github/workflows/test_windows.yml @@ -8,17 +8,29 @@ 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@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