Skip to content

ci: use cibuildwheel #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 0 additions & 123 deletions .circleci/config.yml

This file was deleted.

142 changes: 142 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: CI

on:
workflow_dispatch:
pull_request:
push:
# branches:
# - master
# - main
# tags:
# - "*.*.*"

jobs:
lint:
name: Lint
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected]


build_wheels:
name: Build ${{ matrix.arch }} wheels on ${{ matrix.os }}
needs: [lint]
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-10.15
arch: "x86_64"

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # required for versioneer to find tags

- 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@v2
with:
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
needs: [lint]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # required for versioneer to find tags

- name: Build SDist
run: pipx run build --sdist

- uses: actions/upload-artifact@v2
with:
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: ["2.7", "3.6", "3.10-dev"]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python ${{ matrix.python }}
with:
python-version: ${{ matrix.python }}

- uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- name: Install SDist
env:
SKBUILD_CONFIGURE_OPTIONS: "-DBUILD_CMAKE_FROM_SOURCE:BOOL=OFF"
run: pip install dist/*.tar.gz

- name: Install test dependencies
run: pip install -r requirements-test.txt

- name: Test installed SDist
run: pytest ./tests

check_dist:
name: Check dist
needs: [build_wheels, build_sdist, test_sdist]
runs-on: ubuntu-20.04
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- run: pipx run twine check --strict dist/*

upload_pypi:
name: Upload to PyPI
needs: [build_wheels, build_sdist, test_sdist, check_dist]
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.repository == 'scikit-build/ninja-python-distributions' && startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- name: Upload to PyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_RELEASE_PASSWORD }}
skip_existing: true
117 changes: 0 additions & 117 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include CMakeLists.txt
include NinjaUrls.cmake
include requirements-dev.txt
include requirements-test.txt
include HISTORY.rst
include README.rst
include LICENSE_Apache_20
Expand Down
Loading