Skip to content

clean up gitignore #117

clean up gitignore

clean up gitignore #117

name: build_and_test
on:
push:
tags-ignore:
- '**'

Check failure on line 6 in .github/workflows/build_and_test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build_and_test.yml

Invalid workflow file

You have an error in your yaml syntax on line 6
branches:
- '**'
workflow_call:
workflow_dispatch:
jobs:
static_checks:
uses: ./.github/workflows/static_checks.yml
build_wheels:
name: Build wheels for ${{ matrix.os }}
needs: [static_checks]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.22.0
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-* pp39-* pp310-*"
CIBW_SKIP: "pp*-win* pp*-macos*"
CIBW_ARCHS: auto64
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest {package}/tests
CIBW_BEFORE_TEST_LINUX: >
if command -v yum; then
yum install -y libjpeg-devel;
elif command -v apt-get; then
apt-get install -y libjpeg-dev;
elif command -v apk; then
apk add jpeg-dev;
else
echo "No package manager found for system $(uname -a)";
exit 1;
fi
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
needs: [static_checks]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: pipx install poetry
- name: Build wheel
run: poetry build -f sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
deploy_test:
needs: [build_wheels, build_sdist]
environment: deploy_test_pypi
if: ${{ contains(github.event.head_commit.message, '[deploy]') || github.event_name == 'workflow_dispatch' }}
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/