Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 44 additions & 15 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: wheels

on: [ push, pull_request ]
env:
STDCXX: 17

jobs:
build_wheels:
Expand All @@ -11,7 +9,9 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-14, macos-13, windows-latest ]
os: [ ubuntu-latest, macos-14, macos-15-intel, windows-latest ]
env:
MACOSX_DEPLOYMENT_TARGET: "10.14" # https://cibuildwheel.pypa.io/en/stable/cpp_standards/#macos-and-deployment-target-versions

steps:
- uses: actions/checkout@v4
Expand All @@ -23,12 +23,8 @@ jobs:
with:
python-version: '3.x'

- name: Patch ogdf::Array on Windows
if: runner.os == 'Windows'
run: git --git-dir ogdf apply --directory ogdf fix_Array_windows.patch

- name: Build wheels
uses: pypa/cibuildwheel@v2.17.0
uses: pypa/cibuildwheel@v3.0.1
with:
package-dir: ./
output-dir: ./wheelhouse
Expand Down Expand Up @@ -85,12 +81,10 @@ jobs:
name: Test on ${{ matrix.os }}
needs: check_contents
runs-on: ${{ matrix.os }}
env:
CLING_REBUILD_PCH: 1
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-14, macos-13, windows-latest ]
os: [ ubuntu-latest, macos-14, macos-15-intel, windows-latest ]

steps:
- uses: actions/checkout@v4
Expand All @@ -106,19 +100,54 @@ jobs:
name: wheels
path: dist

# https://github.com/wlav/cppyy/issues/308
- name: Configure MacOS
if: runner.os == 'macOS'
run: |
# brew install zstd # already installed
echo "LD_LIBRARY_PATH=/opt/homebrew/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "DYLD_LIBRARY_PATH=/opt/homebrew/lib:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV

# https://github.com/wlav/cppyy/issues/282
- name: Configure Windows
if: runner.os == 'Windows'
run: |
pip install setuptools --force-reinstall
pip install cppyy-cling==6.32.8 --no-deps --no-build-isolation --force-reinstall
pip install cppyy-backend==1.15.3 --no-deps --no-build-isolation --force-reinstall
pip install CPyCppyy==1.13.0 --no-deps --no-build-isolation --force-reinstall
pip install cppyy==3.5.0 --no-deps --no-build-isolation --force-reinstall

- name: Install wheel
run: pip install --no-index --find-links ./dist ogdf-wheel

- name: List installed files from wheel
run: pip show -f ogdf-wheel

- name: Install ogdf-python
run: pip install git+https://github.com/N-Coder/ogdf-python.git "cppyy<3.1"
run: pip install git+https://github.com/N-Coder/ogdf-python.git

- name: Get ogdf-python release info
run: python -m ogdf_python
env:
OGDF_PYTHON_MODE: release

- name: Get ogdf-python info
- name: Get ogdf-python debug info
run: python -m ogdf_python
env:
OGDF_PYTHON_MODE: debug

- name: Test ogdf-python layouts
- name: Test ogdf-python layouts in release mode
run: python test_layouts.py
env:
OGDF_PYTHON_MODE: release

- uses: actions/upload-artifact@v3
- name: Test ogdf-python layouts in debug mode
run: python test_layouts.py
env:
OGDF_PYTHON_MODE: debug

- uses: actions/upload-artifact@v4
if: always()
with:
name: svgs-${{ matrix.os }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
*.zip
*.tar.gz
*.whl
*.svg
cmake_build/
wheelhouse/
Expand Down
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# ogdf-wheel - an OGDF release build packaged as ready-to-use python wheel.

This project uses [cibuildwheel](cibuildwheel.readthedocs.io) to build the [OGDF](github.com/ogdf/ogdf) library into a ready-to-use python package (called wheel) installable via `pip install ogdf-wheel`. Its mainly intended to be used with [`ogdf-python`](github.com/ogdf/ogdf-python) when you don't want to build the OGDF yourself or use a C++ package manager.
This project uses [cibuildwheel](cibuildwheel.readthedocs.io) to build the [OGDF](github.com/ogdf/ogdf) library into a ready-to-use python package (called wheel) installable via `pip install ogdf-wheel`.
The wheel contains both debug and release builds of the OGDF.
It is mainly intended to be used with [`ogdf-python`](github.com/ogdf/ogdf-python) when you don't want to build the OGDF yourself or use a C++ package manager.

## Publishing new Releases

Expand All @@ -11,4 +13,15 @@ The CI does neither automatically build new OGDF versions nor directly publishes
- Commit and push your changes to GitHub.
- Wait for the CI there to finish.
- Download the resulting `.whl` files.
- Use [`twine`](https://twine.readthedocs.io/en/stable/index.html) to upload the files to PyPi.
- Use [`twine`](https://twine.readthedocs.io/en/stable/index.html) to upload the files to PyPi, see also the [`ogdf-python` release process](https://github.com/ogdf/ogdf-python/blob/master/README.md).

## Building a clean sdist locally

```bash
cd /tmp
git clone /path/to/ogdf-wheel
cd /tmp/ogdf-wheel
git submodule update --init --recursive
python -m build --sdist
mv dist/ogdf_wheel-*.tar.gz /path/to/ogdf-wheel/dist
```
215 changes: 0 additions & 215 deletions fix_Array_windows.patch

This file was deleted.

Loading
Loading