Skip to content
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
145 changes: 0 additions & 145 deletions .circleci/config.yml

This file was deleted.

141 changes: 141 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
name: Build and upload to PyPI

on:
push:
pull_request:

jobs:
flake8:
name: flake8
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: pipx run flake8

build_wheels:
name: Build ${{ matrix.arch }} wheels on ${{ matrix.os }}
needs: [flake8]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
arch: "x86_64"
- os: ubuntu-20.04
arch: "i686"
- 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: Build wheels
uses: pypa/cibuildwheel@v2.0.0a4
env:
CIBW_ARCHS: "${{ matrix.arch }}"

- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
needs: [flake8]
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 }}

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libssl-dev
pip install -r requirements-dev.txt

- 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
rm dist/*.tar.gz

- 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 install twine
twine check --strict dist/*

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

- name: Upload to Test PyPI
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_TEST_PASSWORD }}
skip_existing: true
repository_url: https://test.pypi.org/legacy/

- name: Upload to PyPI
# upload to PyPI on every tag
if: startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_RELEASE_PASSWORD }}
skip_existing: true
84 changes: 10 additions & 74 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,89 +8,32 @@ dist: focal
language: python
python: "3.8"

env:
global:
# PYPI_USER
- secure: "Xejg5qGnAyo3G+/TaaAr1uHzDv9GLo3mxi6Aw/hZc9gF9lYix1TvkfE6GEBKdPgSLJSqF9NJrwKTt37XH1DjSRLG+qw6Bt1goi5Bkugdk+SC5qmMkvAoG0EKyD119WS4ObrpzqAFcOQqG+4F6iDkSuJLA+dzA3yAzTME4pkhr/2dn0krOSqIcTlgifPwhEaMgo//WRT2dEBM5dWoehXsEMD7VMOUyC0DlV15lKTPKSzTrDEUPU7UFnXgIqZM/brEPbWPQr5Jzgu7BeBk6bmPiiYeh28Cq2juzOzA+JWcGgJmXOfsImYwYuAWZrf0pkE0uQj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

- os: osx
language: generic
env:
- PYTHON_VERSION=3.7.9
- MACOSX_DEPLOYMENT_TARGET=10.10

- arch: arm64-graviton2
virt: vm
group: edge

- arch: ppc64le

- arch: s390x



cache:
directories:
# scikit-ci-addons
- $HOME/downloads

before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
# Install official python distribution
curl -fsSLo /tmp/Python.pkg "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-macosx10.9.pkg"
sudo installer -pkg /tmp/Python.pkg -target /
PYTHON_VERSION2=${PYTHON_VERSION%.*}
PYTHON_VERSION1=${PYTHON_VERSION2%.*}
python_executable=/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION2}/bin/python${PYTHON_VERSION1}

# Install SSL certificates
curl -fsSLo /tmp/install_certifi.py https://github.com/joerick/cibuildwheel/raw/v1.10.0/cibuildwheel/resources/install_certifi.py
sudo ${python_executable} /tmp/install_certifi.py
${python_executable} scripts/ssl-check.py

# Install packages
${python_executable} -m pip install --disable-pip-version-check --upgrade pip
${python_executable} -m pip install virtualenv

# Create and activate virtual environment
${python_executable} -m virtualenv ${HOME}/.pyenv/versions/${PYTHON_VERSION}
source ${HOME}/.pyenv/versions/${PYTHON_VERSION}/bin/activate
fi
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
pip install -U scikit-ci scikit-ci-addons
ci_addons --install ../addons
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
docker run -t --rm \
-v $(pwd):/io \
--env TRAVIS=True \
--env TRAVIS_OS_NAME="${TRAVIS_OS_NAME}" \
quay.io/pypa/manylinux2014_$(uname -m) \
/io/scripts/manylinux2014-build-and-test-wheel.sh
fi

install:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
ci install
fi
python -m pip install -r requirements-deploy.txt
- python -m pip install cibuildwheel==2.0.0a4
- python -m pip install -r requirements-deploy.txt

script:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
ci test
fi
pwd
cibuildwheel --output-dir dist
ls dist
twine --version
twine check --strict dist/*

after_success:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
ci after_test
fi

deploy:
# deploy-release
- provider: script
Expand All @@ -106,10 +49,3 @@ deploy:
on:
repo: ${TRAVIS_REPO_SLUG}
branch: master

env:
global:
# PYPI_USER
- secure: "Xejg5qGnAyo3G+/TaaAr1uHzDv9GLo3mxi6Aw/hZc9gF9lYix1TvkfE6GEBKdPgSLJSqF9NJrwKTt37XH1DjSRLG+qw6Bt1goi5Bkugdk+SC5qmMkvAoG0EKyD119WS4ObrpzqAFcOQqG+4F6iDkSuJLA+dzA3yAzTME4pkhr/2dn0krOSqIcTlgifPwhEaMgo//WRT2dEBM5dWoehXsEMD7VMOUyC0DlV15lKTPKSzTrDEUPU7UFnXgIqZM/brEPbWPQr5Jzgu7BeBk6bmPiiYeh28Cq2juzOzA+JWcGgJmXOfsImYwYuAWZrf0pkE0uQjLySvIBKT7phJv05eNqIxmv/wHK1BPcyMV+2IgFR4+f5ty6C4VUV0hT0HvHr3pMa/8A/5wSNCShEAMTHrwPM5VPWFJtUKTtS5+wwNQDI39MLk/vr9ZTo+y3WJHPaRR0nRpbA3nXFHSqoJJunoMyeI8x9cXZvJ9IENMxGuo3CfBT5RGZamfqSTgn6NjL51ArIMKpvUfm3tXTtlvCHenED1ZQeJI1nWZEalxl8pTyAZoA8S1+h8wraZrUPzhM0QuVpw7vZQeOYu2VSdHO46yxUWoQyb+JWrDTN7EC8vOl7QQzIQlqOWJB5uDJD7UlKKtneTHJrdfXvGxS/hf+Y+hFZK7r+/PDPS6aQjSNDyy+js="
# PYPI_PASSWORD
- secure: "iEHYaOC/yivDupsbRzohWYCwFMZbCfT2hYOM96akQtOfd1d37rqFCFjDKr3BNyvHyHzj+uNQ7IblynWAqu3cax2Z8b9YuIFXFAslD76IIgeIhxmi8jPtamMK0NBXam/LEL49EIVXUnwVZrWjnLcJxVaBHGS/9Ft3zWP5Gsp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