Use intrusive list in VisitedListPool #11
This file contains 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: BuildAndPublish | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
defaults: | |
run: | |
working-directory: python | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [windows-latest, macos-latest, macos-13, ubuntu-latest] | |
# platform: [ubuntu-latest] | |
python-version: ["3.11", "3.12"] | |
exclude: # We don't need this as cibuildwheel builds for all python versions | |
- platform: ubuntu-latest | |
python-version: "3.11" | |
runs-on: ${{ matrix.platform }} | |
if: "contains(github.event.head_commit.message, '+ci')" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: false | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Add requirements | |
run: python -m pip install --upgrade wheel setuptools pybind11>=2.12.0 build pytest cibuildwheel | |
- name: Copy Build Files | |
run: python3 setup.py copy_build_files | |
# building package on linux | |
- name: Build CiBuildWheel | |
env: | |
FORCE_AVX2: "1" | |
run: cibuildwheel --archs auto64 --output-dir dist | |
if: runner.os == 'Linux' | |
# building package on windows / osx | |
- name: Build | |
env: | |
FORCE_AVX2: "1" | |
run: python3 -m build | |
if: runner.os != 'Linux' | |
- name: Install | |
run: pip install --verbose .[test] | |
if: runner.os != 'Linux' | |
- name: Test | |
run: python -m pytest | |
if: runner.os != 'Linux' | |
# upload artifacts | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: release-dists-${{ matrix.platform }}-python${{ matrix.python-version}} | |
path: python/dist/ | |
pypi-publish: | |
runs-on: "ubuntu-latest" | |
if: "contains(github.event.head_commit.message, '+ci')" | |
needs: | |
- build | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write | |
# Dedicated environments with protections for publishing are strongly recommended. | |
environment: | |
name: testpypi | |
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status: | |
url: https://test.pypi.org/project/deglib/ | |
steps: | |
- name: Retrieve release distributions | |
uses: actions/download-artifact@v4 | |
with: | |
path: dist | |
pattern: release-dists-* | |
merge-multiple: true | |
- name: Publish release distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/ |