Skip to content

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #62

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #62

Workflow file for this run

name: CI
on:
push:
branches: [main, "maint/*"]
pull_request:
branches: [main, "maint/*"]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
BUILDMODE: [CIBUILDWHEEL, ASTROPY]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Set up QEMU
if: ${{ matrix.os == 'ubuntu-latest' && matrix.BUILDMODE == 'CIBUILDWHEEL' }}
id: qemu
uses: docker/setup-qemu-action@v1
- name: Setup Conda Environment
if: ${{ matrix.BUILDMODE == 'ASTROPY' }}
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
python-version: ${{ matrix.python-version }}
environment-file: ci/environment.yaml
activate-environment: test-environment
- name: Run tests
if: ${{ matrix.BUILDMODE == 'ASTROPY' }}
shell: bash -l {0}
run: |
pip install -e .
python selftest.py
- name: Build wheel
if: ${{ matrix.BUILDMODE == 'CIBUILDWHEEL' }}
env:
CIBW_TEST_COMMAND: python {project}/selftest.py
CIBW_BEFORE_BUILD_LINUX: yum install -y freetype-devel
CIBW_SKIP: pp* *-musllinux*
CIBW_TEST_REQUIRES: numpy pillow pytest
CIBW_ARCHS_LINUX: auto aarch64
run: |
python -m pip install cibuildwheel
cibuildwheel --output-dir wheelhouse
- name: upload
if: ${{ matrix.BUILDMODE == 'CIBUILDWHEEL' }}
uses: actions/upload-artifact@v2
with:
name: wheelhouse
path: "wheelhouse/*.whl"
publish:
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: sdist
run: python setup.py sdist
- name: download
uses: actions/[email protected]
- name: Install dependencies
run: python -m pip install twine
- name: Publish wheels to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m twine upload --skip-existing dist/*.tar.gz
python -m twine upload --skip-existing wheelhouse/*.whl