-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: support setup helpers * feat: update to pybind11 2.6.0b1 * feat: bump to 2.6.0rc3 * chore: bump to 2.6.0 * ci: full release string * ci: dependabot * fix: conda-forge channel needed for 2.6.0
- Loading branch information
Showing
13 changed files
with
492 additions
and
180 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
ignore: | ||
# Offical actions have moving tags like v1 | ||
# that are used, so they don't need updates here | ||
- dependency-name: "actions/*" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Conda | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ["3.6", "3.8"] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
# The setup-miniconda action needs this to activate miniconda | ||
defaults: | ||
run: | ||
shell: "bash -l {0}" | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Get conda | ||
uses: conda-incubator/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
channels: conda-forge,defaults | ||
channel-priority: strict | ||
|
||
- name: Prepare | ||
run: conda install conda-build conda-verify | ||
|
||
- name: Build | ||
run: conda build conda.recipe | ||
|
||
- name: Install | ||
run: conda install -c ${CONDA_PREFIX}/conda-bld/ python_example | ||
|
||
- name: Test | ||
run: python tests/test.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Pip | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [windows-latest, macos-latest, ubuntu-latest] | ||
python-version: ["2.7", "3.5", "3.8", "3.9"] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Add requirements | ||
run: python -m pip install --upgrade wheel setuptools | ||
|
||
# Eventually Microsoft might have an action for setting up | ||
# MSVC, but for now, this action works: | ||
- name: Prepare compiler environment for Windows 🐍 2.7 | ||
if: matrix.python-version == 2.7 && runner.os == 'Windows' | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
arch: x64 | ||
|
||
# This makes two environment variables available in the following step(s) | ||
- name: Set Windows 🐍 2.7 environment variables | ||
if: matrix.python-version == 2.7 && runner.os == 'Windows' | ||
shell: bash | ||
run: | | ||
echo "DISTUTILS_USE_SDK=1" >> $GITHUB_ENV | ||
echo "MSSdk=1" >> $GITHUB_ENV | ||
- name: Build and install | ||
run: pip install --verbose . | ||
|
||
- name: Test | ||
run: python tests/test.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
name: Wheels | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
release: | ||
types: | ||
- published | ||
|
||
env: | ||
CIBW_TEST_COMMAND: python {project}/tests/test.py | ||
# This can be removed if pyproject.toml is used | ||
CIBW_BEFORE_BUILD: pip install pybind11 | ||
|
||
|
||
jobs: | ||
build_sdist: | ||
name: Build SDist | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
|
||
- name: Install deps | ||
run: python -m pip install "setuptools>=42" "setuptools_scm[toml]>=4.1.0" twine | ||
|
||
- name: Build SDist | ||
run: python setup.py sdist | ||
|
||
- name: Check metadata | ||
run: twine check dist/* | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
path: dist/*.tar.gz | ||
|
||
|
||
build_wheels: | ||
name: Wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-python@v2 | ||
|
||
- name: Install cibuildwheel | ||
run: python -m pip install cibuildwheel==1.6.3 | ||
|
||
- name: Build wheel | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
env: | ||
# Python 2.7 on Windows requires a workaround for C++11 support, | ||
# built separately below | ||
CIBW_SKIP: cp27-win* | ||
|
||
- name: Show files | ||
run: ls -lh wheelhouse | ||
shell: bash | ||
|
||
- name: Verify clean directory | ||
run: git diff --exit-code | ||
shell: bash | ||
|
||
- name: Upload wheels | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
path: wheelhouse/*.whl | ||
|
||
|
||
# Windows 2.7 (requires workaround for MSVC 2008 replacement) | ||
build_win27_wheels: | ||
name: Py 2.7 wheels on Windows | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
submodules: true | ||
|
||
- uses: actions/setup-python@v2 | ||
|
||
- name: Install cibuildwheel | ||
run: python -m pip install cibuildwheel==1.6.3 | ||
|
||
- uses: ilammy/msvc-dev-cmd@v1 | ||
|
||
- name: Build 64-bit wheel | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
env: | ||
CIBW_BUILD: cp27-win_amd64 | ||
DISTUTILS_USE_SDK: 1 | ||
MSSdk: 1 | ||
|
||
- uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
arch: x86 | ||
|
||
- name: Build 32-bit wheel | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
env: | ||
CIBW_BUILD: cp27-win32 | ||
DISTUTILS_USE_SDK: 1 | ||
MSSdk: 1 | ||
|
||
- name: Show files | ||
run: ls -lh wheelhouse | ||
shell: bash | ||
|
||
- name: Verify clean directory | ||
run: git diff --exit-code | ||
shell: bash | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
path: wheelhouse/*.whl | ||
|
||
|
||
upload_all: | ||
name: Upload if release | ||
needs: [build_wheels, build_win27_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
|
||
steps: | ||
- uses: actions/setup-python@v2 | ||
|
||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} |
Oops, something went wrong.