version 0.2.0 #51
Workflow file for this run
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
# based on github.com/scikit-build/ninja-python-distributions's build.yml | ||
name: CI | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
# TODO: enable tests for findglob on each OS | ||
# test_findglob: | ||
# name: Test fingdlob | ||
# runs-on: ${{ matrix.os }} | ||
# strategy: | ||
# matrix: | ||
# os: [ubuntu-20.04, macos-10.15, windows-2019] | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - name: Test findglob (unix) | ||
# run: cd findglob && make test && ./test | ||
# if: runner.os != 'Windows' | ||
# - name: Test findglob (windows) | ||
# run: cd findglob && cmd /c make && test | ||
# if: runner.os == 'Windows' | ||
build_wheels: | ||
name: Build ${{ matrix.arch }} wheels on ${{ matrix.os }} | ||
# needs: [test_findglob] | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: ubuntu-20.04 | ||
arch: "x86_64" | ||
- os: ubuntu-20.04 | ||
arch: "i686" | ||
- os: ubuntu-20.04 | ||
arch: "aarch64" | ||
- os: ubuntu-20.04 | ||
arch: "ppc64le" | ||
- os: ubuntu-20.04 | ||
arch: "s390x" | ||
- os: windows-2019 | ||
arch: "AMD64" | ||
- os: windows-2019 | ||
arch: "x86" | ||
- os: macos-11 | ||
arch: "universal2" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up QEMU | ||
uses: docker/[email protected] | ||
if: runner.os == 'Linux' | ||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_ARCHS: "${{ matrix.arch }}" | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: "wheel-${{ matrix.arch }}" | ||
path: ./wheelhouse/*.whl | ||
build_sdist: | ||
name: Build sdist | ||
# needs: [test_findglob] | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build sdist | ||
run: pipx run build --sdist | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: sdist | ||
path: dist/*.tar.gz | ||
test_sdist: | ||
name: Test sdist with python ${{ matrix.python }} | ||
needs: [build_sdist] | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python: ["3.8", "3.13-dev"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
name: Install python ${{ matrix.python }} | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: sdist | ||
path: sdist | ||
- name: Install sdist | ||
run: pip install sdist/*.tar.gz | ||
- name: Test findglob binary | ||
run: mkninja --findglob --help | ||
- name: Test manifest binary | ||
run: mkninja --manifest --help | ||
merge_artifacts: | ||
name: Merge artifacts | ||
# since we delete-merge, don't merge until after test_sdist is done | ||
needs: [build_wheels, test_sdist] | ||
steps: | ||
- uses: actions/upload-artifact/merge@v4 | ||
with: | ||
name: artifact | ||
delete-merged: true | ||
check_dist: | ||
name: Check dist | ||
needs: [merge_artifacts] | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: artifact | ||
path: dist | ||
- name: twine check | ||
run: pipx run twine check --strict dist/* | ||
# Can't figure out how to make this action execute. | ||
# This doesn't work: | ||
# | ||
# git checkout master | ||
# git tag vX.Y.Z | ||
# git push origin --tags | ||
# | ||
# And this doesn't work: | ||
# | ||
# git checkout master | ||
# # make final edits | ||
# git commit | ||
# git tag vX.Y.Z | ||
# git push origin master --tags | ||
# upload_pypi: | ||
# name: Upload to PyPI | ||
# needs: [build_wheels, build_sdist, test_sdist, check_dist] | ||
# runs-on: ubuntu-latest | ||
# # upload tags starting with v | ||
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
# steps: | ||
# - uses: actions/download-artifact@v4 | ||
# with: | ||
# name: artifact | ||
# path: dist | ||
# - uses: pypa/[email protected] | ||
# with: | ||
# user: __token__ | ||
# password: ${{ secrets.pypi_upload_token }} | ||
# # repository_url: https://test.pypi.org/legacy/ |