Dump dDNNF to file #88
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and publish Python wheels | |
| on: | |
| push: | |
| branches: ["master"] | |
| tags: | |
| - 'release/v[0-9]+.[0-9]+.[0-9]+' | |
| pull_request: | |
| branches: ["*"] | |
| workflow_dispatch: # allow manual test-runs without a tag | |
| jobs: | |
| build_wheels: | |
| name: Wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| # Each runner builds for its native architecture. | |
| # Linux aarch64 uses a native ARM GitHub-hosted runner. | |
| os: [ubuntu-latest, ubuntu-24.04-arm, macos-14] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: 'true' | |
| - name: Install system dependencies (macOS) | |
| if: contains(matrix.os, 'macos') | |
| run: brew install gmp mpfr flint || true | |
| - name: Cache ccache | |
| uses: actions/cache@v4 | |
| with: | |
| # Linux Docker builds write ccache to /project/.ccache (= .ccache in checkout). | |
| # macOS native builds use ~/.ccache. | |
| path: | | |
| .ccache | |
| ~/.ccache | |
| key: ccache-wheels-${{ matrix.os }}-${{ github.sha }} | |
| restore-keys: ccache-wheels-${{ matrix.os }}- | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.1.0 | |
| # All per-platform settings live in [tool.cibuildwheel] in pyproject.toml. | |
| env: | |
| CIBW_ARCHS_LINUX: native # x86_64 on ubuntu-latest, aarch64 on ubuntu-24.04-arm | |
| CIBW_ARCHS_MACOS: native # arm64 on macos-14, x86_64 on macos-15-intel | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-${{ matrix.os }} | |
| path: wheelhouse/*.whl | |
| publish: | |
| name: Publish to PyPI | |
| needs: build_wheels | |
| runs-on: ubuntu-latest | |
| # Only publish on version tags (v*.*.* or release/v*.*.*). | |
| if: > | |
| github.event_name == 'push' && | |
| startsWith(github.ref, 'refs/tags/release/v') | |
| environment: pypi | |
| permissions: | |
| id-token: write # required for OIDC trusted publishing | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: wheels-* | |
| path: dist | |
| merge-multiple: true | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |