Skip to content

FIX: Hotfix for git archival #993

FIX: Hotfix for git archival

FIX: Hotfix for git archival #993

Workflow file for this run

# This CI run builds wheels using the cibuildwheel infrastructure.
# This means it:
# - Uses as old dependencies/infrastructure as possible:
# - An old manylinux docker container on Linux
# - An old MACOSX_DEPLOYMENT_TARGET on macOS
# - An old SYSTEM_VERSION target on Windows
# - Builds OpenMEEG
# - Creates wheels
# - Delocates them
# - Uploads them to TestPyPI (main) or PyPi (releases)
# Most of the config lives in `pyproject.toml` and build_tools/cibw_* scripts.
name: cibuildwheel
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: true
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types: [ published ]
env:
BUILD_TYPE: Release
# https://cibuildwheel.readthedocs.io/en/stable/setup/#github-actions
jobs:
build_wheels:
continue-on-error: true
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
matrix:
include:
- os: ubuntu-20.04
- os: macos-13
- os: macos-14
- os: windows-2019
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5 # to make before-all work properly
with:
python-version: '3.10'
- uses: hendrikmuhs/ccache-action@v1.2
if: matrix.os != 'ubuntu-20.04'
with:
key: ${{ github.job }}-${{ matrix.os }}
- name: Cache vcpkg
if: matrix.os != 'ubuntu-20.04'
uses: actions/cache@v4
with:
path: |
vcpkg
build/vcpkg_installed
key: ${{ github.job }}-${{ hashFiles('**/vcpkg.json') }}-${{ matrix.os }}-0
- uses: pypa/cibuildwheel@v2.18.1
with:
package-dir: ./wrapping/python
output-dir: wheelhouse
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
upload_test_pypi:
name: Upload to TestPyPI
needs: [build_wheels]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- run: ls -alt dist/
# upload to Test PyPI for every commit on main branch
- uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'push' && github.event.ref == 'refs/heads/main'
with:
user: __token__
password: ${{ secrets.OPENMEEG_TEST_PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
upload_pypi:
name: Upload to PyPI
needs: [build_wheels]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
# upload to PyPI on every tag (we assume these are releases!)
- uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'release' && github.event.action == 'published'
with:
user: __token__
password: ${{ secrets.OPENMEEG_PYPI_TOKEN }}