Skip to content

Fix missing header in test #176

Fix missing header in test

Fix missing header in test #176

Workflow file for this run

name: GH Actions
on:
release:
types: [published]
push:
pull_request:
jobs:
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
run: pipx run build --sdist
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: cibw-sdist
path: dist/*.tar.gz
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
- os: windows-latest
- os: macos-13 # Intel
CIBW_ENVIRONMENT: >
MACOSX_DEPLOYMENT_TARGET='10.15'
- os: macos-14 # Apple Silicon
CIBW_ENVIRONMENT: >
MACOSX_DEPLOYMENT_TARGET='11.7'
env:
CIBW_ENVIRONMENT_MACOS: >
MACOSX_DEPLOYMENT_TARGET='11.7'
CIBW_SKIP: "*-win32 *i686"
steps:
- uses: ilammy/msvc-dev-cmd@v1
if: runner.os == 'Windows'
with:
arch: amd64
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
test_wheels:
needs: [build_wheels]
strategy:
matrix:
os: [macos-11, windows-latest, ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
runs-on: ${{ matrix.os }}
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- uses: actions/download-artifact@v4
with:
pattern: cibw-wheels-*
path: dist
merge-multiple: true
- name: install wheel (Unix)
if: runner.os != 'Windows'
run: |
pip install --find-links $GITHUB_WORKSPACE/dist pycdfpp
- name: install wheel (Windows)
if: runner.os == 'Windows'
run: |
pip install --find-links $env:GITHUB_WORKSPACE\dist pycdfpp
- uses: actions/checkout@v3
- name: run tests
run: |
pip install ddt requests
python -vvv tests/full_corpus/test_full_corpus.py
test_wheels_macos_14:
needs: [build_wheels]
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
runs-on: macos-14
steps:
- name: add pyenv to path
run: |
echo " ~/.pyenv/shims" >> $GITHUB_PATH
- name: install dependencies
run: |
brew install pyenv
pyenv install ${{ matrix.python-version }}
- uses: actions/download-artifact@v4
with:
pattern: cibw-wheels-*
path: dist
merge-multiple: true
- name: install wheel
run: |
pyenv local ${{ matrix.python-version }}
python3 -m pip install --find-links $GITHUB_WORKSPACE/dist pycdfpp
- uses: actions/checkout@v3
- name: run tests
run: |
pyenv local ${{ matrix.python-version }}
python3 -m pip install ddt requests
python3 tests/full_corpus/test_full_corpus.py
upload_pypi:
needs: [build_sdist, build_wheels, test_wheels, test_wheels_macos_14]
runs-on: ubuntu-latest
# upload to PyPI only on github releases
if: github.event_name == 'release' && github.event.action == 'published' && github.repository_owner == 'SciQLop'
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
skip-existing: true
upload_test_pypi:
needs: [build_sdist, build_wheels, test_wheels, test_wheels_macos_14]
runs-on: ubuntu-latest
# upload to test PyPI on github pushes
if: github.event_name == 'push' && github.repository_owner == 'SciQLop'
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TEST_PASSWORD }}
repository-url: https://test.pypi.org/legacy/
skip-existing: true