Merge remote-tracking branch 'origin/master' into deterministic-builds
This commit is contained in:
@@ -0,0 +1,29 @@
|
|||||||
|
name: Test
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Test cibuildwheel on ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-18.04, windows-latest, macos-latest]
|
||||||
|
python_version: ['3.7']
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions/setup-python@v1
|
||||||
|
name: Install Python ${{ matrix.python_version }}
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python_version }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install -r requirements-dev.txt
|
||||||
|
- name: Install Visual C++ for Python 2.7
|
||||||
|
if: startsWith(matrix.os, 'windows')
|
||||||
|
run: |
|
||||||
|
choco install vcpython27 -f -y
|
||||||
|
- name: Test cibuildwheel
|
||||||
|
run: |
|
||||||
|
python ./bin/run_tests.py
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
This is a summary of the Python versions and platforms covered by the different CI platforms:
|
This is a summary of the Python versions and platforms covered by the different CI platforms:
|
||||||
|
|
||||||
| | 3.5 | 3.6 | 3.7 | 3.8 |
|
| | 3.5 | 3.6 | 3.7 | 3.8 |
|
||||||
|----------|------------------|------------------|-----------------------|------------------|
|
|----------|------------------|------------------|---------------------------------------------------|------------------|
|
||||||
| Linux | Travis CI | CircleCI | AppVeyor | Azure Pipelines |
|
| Linux | Travis CI | CircleCI | AppVeyor / GitHub Actions | Azure Pipelines |
|
||||||
| macOS | Azure Pipelines | CircleCI | Travis CI¹ / CircleCI | Azure Pipelines |
|
| macOS | Azure Pipelines | CircleCI | AppVeyor / Travis CI¹ / CircleCI / GitHub Actions | Azure Pipelines |
|
||||||
| Windows | TravisCI | Azure Pipelines | AppVeyor | Azure Pipelines |
|
| Windows | TravisCI | Azure Pipelines | AppVeyor / GitHub Actions | Azure Pipelines |
|
||||||
|
|
||||||
> ¹ Python version not really pinned, but dependent on the (default) version of image used.
|
> ¹ Python version not really pinned, but dependent on the (default) version of image used.
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ cibuildwheel
|
|||||||
|
|
||||||
Python wheels are great. Building them across **Mac, Linux, Windows**, on **multiple versions of Python**, is not.
|
Python wheels are great. Building them across **Mac, Linux, Windows**, on **multiple versions of Python**, is not.
|
||||||
|
|
||||||
`cibuildwheel` is here to help. `cibuildwheel` runs on your CI server - currently it supports Azure Pipelines, Travis CI, AppVeyor, and CircleCI - and it builds and tests your wheels across all of your platforms.
|
`cibuildwheel` is here to help. `cibuildwheel` runs on your CI server - currently it supports Azure Pipelines, Travis CI, AppVeyor, GitHub Actions and CircleCI - and it builds and tests your wheels across all of your platforms.
|
||||||
|
|
||||||
|
|
||||||
What does it do?
|
What does it do?
|
||||||
@@ -35,13 +35,14 @@ What does it do?
|
|||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
|
|
||||||
`cibuildwheel` currently works on **Travis CI**, **Azure Pipelines** and **AppVeyor** to build wheels for all three supported platforms (Linux, macOS, Windows). On **CircleCI** Linux and macOS wheels can be built.
|
`cibuildwheel` currently works on **Travis CI**, **Azure Pipelines**, **AppVeyor** and **GitHub Actions** to build wheels for all three supported platforms (Linux, macOS, Windows). On **CircleCI** Linux and macOS wheels can be built.
|
||||||
|
|
||||||
| | Linux | macOS | Windows |
|
| | Linux | macOS | Windows |
|
||||||
|-----------------|-------|-------|---------|
|
|-----------------|-------|-------|---------|
|
||||||
| Azure Pipelines | ✅ | ✅ | ✅ |
|
| Azure Pipelines | ✅ | ✅ | ✅ |
|
||||||
| Travis CI | ✅ | ✅ | ✅ |
|
| Travis CI | ✅ | ✅ | ✅ |
|
||||||
| AppVeyor | ✅ | ✅ | ✅ |
|
| AppVeyor | ✅ | ✅ | ✅ |
|
||||||
|
| GitHub Actions | ✅ | ✅ | ✅ |
|
||||||
| CircleCI | ✅ | ✅ | |
|
| CircleCI | ✅ | ✅ | |
|
||||||
|
|
||||||
`cibuildwheel` is not intended to run on your development machine. Because it uses system Python from Python.org it will try to install packages globally - not what you expect from a build tool! Instead, isolated CI services like Travis CI, CircleCI, Azure Pipelines and AppVeyor are ideal.
|
`cibuildwheel` is not intended to run on your development machine. Because it uses system Python from Python.org it will try to install packages globally - not what you expect from a build tool! Instead, isolated CI services like Travis CI, CircleCI, Azure Pipelines and AppVeyor are ideal.
|
||||||
@@ -76,7 +77,7 @@ env:
|
|||||||
# Note: TWINE_PASSWORD is set to a PyPI API token in Travis settings
|
# Note: TWINE_PASSWORD is set to a PyPI API token in Travis settings
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- python3 -m pip install cibuildwheel==1.2.0
|
- python3 -m pip install cibuildwheel==1.3.0
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# build the wheels, put them into './wheelhouse'
|
# build the wheels, put them into './wheelhouse'
|
||||||
@@ -141,6 +142,16 @@ This is similar to static linking, so it might have some licence implications. C
|
|||||||
Changelog
|
Changelog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
### 1.3.0
|
||||||
|
|
||||||
|
_12 March 2020_
|
||||||
|
|
||||||
|
- ✨ Add support for building on Github Actions! Check out the
|
||||||
|
[docs](https://cibuildwheel.readthedocs.io/en/stable/setup/#github-actions)
|
||||||
|
for information on how to set it up. (#194)
|
||||||
|
- ✨ Add the `CIBW_BEFORE_TEST` option, which lets you run a command to
|
||||||
|
prepare the environment before your tests are run. (#242)
|
||||||
|
|
||||||
### 1.2.0
|
### 1.2.0
|
||||||
|
|
||||||
_8 March 2020_
|
_8 March 2020_
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
__version__ = '1.2.0'
|
__version__ = '1.3.0'
|
||||||
|
|||||||
@@ -79,12 +79,12 @@ def main():
|
|||||||
if args.platform != 'auto':
|
if args.platform != 'auto':
|
||||||
platform = args.platform
|
platform = args.platform
|
||||||
else:
|
else:
|
||||||
ci = strtobool(os.environ.get('CI', 'false')) or 'BITRISE_BUILD_NUMBER' in os.environ or 'AZURE_HTTP_USER_AGENT' in os.environ
|
ci = strtobool(os.environ.get('CI', 'false')) or 'BITRISE_BUILD_NUMBER' in os.environ or 'AZURE_HTTP_USER_AGENT' in os.environ or 'GITHUB_WORKFLOW' in os.environ
|
||||||
if not ci:
|
if not ci:
|
||||||
print('cibuildwheel: Unable to detect platform. cibuildwheel should run on your CI server, '
|
print('cibuildwheel: Unable to detect platform. cibuildwheel should run on your CI server, '
|
||||||
'Travis CI, AppVeyor, Azure Pipelines and CircleCI are supported. You can run on your '
|
'Travis CI, AppVeyor, Azure Pipelines, GitHub Actions and CircleCI are supported. You '
|
||||||
'development machine or other CI providers using the --platform argument. Check --help '
|
'can run on your development machine or other CI providers using the --platform argument. '
|
||||||
'output for more information.',
|
'Check --help output for more information.',
|
||||||
file=sys.stderr)
|
file=sys.stderr)
|
||||||
exit(2)
|
exit(2)
|
||||||
if sys.platform.startswith('linux'):
|
if sys.platform.startswith('linux'):
|
||||||
|
|||||||
+14
-1
@@ -2,9 +2,22 @@
|
|||||||
title: 'Setup'
|
title: 'Setup'
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# GitHub Actions [linux/mac/windows] {: #github-actions}
|
||||||
|
|
||||||
|
To build Linux, Mac, and Windows wheels using Github Actions, create a `.github/workflows/build.yml` file in your repo.
|
||||||
|
|
||||||
|
> build.yml
|
||||||
|
```yaml
|
||||||
|
{% include "../examples/github-minimal.yml" %}
|
||||||
|
```
|
||||||
|
|
||||||
|
Commit this file, and push to Github - either to your default branch, or to a PR branch. The build should start automatically.
|
||||||
|
|
||||||
|
For more info on this file, check out the [docs](https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions).
|
||||||
|
|
||||||
# Azure Pipelines [linux/mac/windows] {: #azure-pipelines}
|
# Azure Pipelines [linux/mac/windows] {: #azure-pipelines}
|
||||||
|
|
||||||
Using Azure pipelines, you can build all three platforms on the same service. Create a `azure-pipelines.yml` file in your repo.
|
To build Linux, Mac, and Windows wheels on Azure Pipelines, create a `azure-pipelines.yml` file in your repo.
|
||||||
|
|
||||||
> azure-pipelines.yml
|
> azure-pipelines.yml
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ stack: python 3.7
|
|||||||
init:
|
init:
|
||||||
- cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH%
|
- cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH%
|
||||||
|
|
||||||
install: python -m pip install cibuildwheel==1.2.0
|
install: python -m pip install cibuildwheel==1.3.0
|
||||||
|
|
||||||
build_script: python -m cibuildwheel --output-dir wheelhouse
|
build_script: python -m cibuildwheel --output-dir wheelhouse
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ jobs:
|
|||||||
- task: UsePythonVersion@0
|
- task: UsePythonVersion@0
|
||||||
- bash: |
|
- bash: |
|
||||||
python3 -m pip install --upgrade pip
|
python3 -m pip install --upgrade pip
|
||||||
pip3 install cibuildwheel==1.2.0
|
pip3 install cibuildwheel==1.3.0
|
||||||
cibuildwheel --output-dir wheelhouse .
|
cibuildwheel --output-dir wheelhouse .
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
inputs: {pathtoPublish: 'wheelhouse'}
|
inputs: {pathtoPublish: 'wheelhouse'}
|
||||||
@@ -16,7 +16,7 @@ jobs:
|
|||||||
- task: UsePythonVersion@0
|
- task: UsePythonVersion@0
|
||||||
- bash: |
|
- bash: |
|
||||||
python3 -m pip install --upgrade pip
|
python3 -m pip install --upgrade pip
|
||||||
pip3 install cibuildwheel==1.2.0
|
pip3 install cibuildwheel==1.3.0
|
||||||
cibuildwheel --output-dir wheelhouse .
|
cibuildwheel --output-dir wheelhouse .
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
inputs: {pathtoPublish: 'wheelhouse'}
|
inputs: {pathtoPublish: 'wheelhouse'}
|
||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
displayName: Install Visual C++ for Python 2.7
|
displayName: Install Visual C++ for Python 2.7
|
||||||
- bash: |
|
- bash: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install cibuildwheel==1.2.0
|
pip install cibuildwheel==1.3.0
|
||||||
cibuildwheel --output-dir wheelhouse .
|
cibuildwheel --output-dir wheelhouse .
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
inputs: {pathtoPublish: 'wheelhouse'}
|
inputs: {pathtoPublish: 'wheelhouse'}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: Build the Linux wheels.
|
name: Build the Linux wheels.
|
||||||
command: |
|
command: |
|
||||||
pip3 install --user cibuildwheel==1.2.0
|
pip3 install --user cibuildwheel==1.3.0
|
||||||
cibuildwheel --output-dir wheelhouse
|
cibuildwheel --output-dir wheelhouse
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: wheelhouse/
|
path: wheelhouse/
|
||||||
@@ -25,7 +25,7 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: Build the OS X wheels.
|
name: Build the OS X wheels.
|
||||||
command: |
|
command: |
|
||||||
pip3 install --user cibuildwheel==1.2.0
|
pip3 install --user cibuildwheel==1.3.0
|
||||||
cibuildwheel --output-dir wheelhouse
|
cibuildwheel --output-dir wheelhouse
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: wheelhouse/
|
path: wheelhouse/
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
name: Build
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_wheels:
|
||||||
|
name: Build wheel on ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-18.04, windows-latest, macos-latest]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v1
|
||||||
|
name: Install Python
|
||||||
|
with:
|
||||||
|
python-version: '3.7'
|
||||||
|
|
||||||
|
- name: Install cibuildwheel
|
||||||
|
run: |
|
||||||
|
python -m pip install cibuildwheel==1.3.0
|
||||||
|
|
||||||
|
- name: Install Visual C++ for Python 2.7
|
||||||
|
if: startsWith(matrix.os, 'windows')
|
||||||
|
run: |
|
||||||
|
choco install vcpython27 -f -y
|
||||||
|
|
||||||
|
- name: Build wheel
|
||||||
|
run: |
|
||||||
|
python -m cibuildwheel --output-dir wheelhouse
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: wheels
|
||||||
|
path: ./wheelhouse
|
||||||
@@ -25,7 +25,7 @@ env:
|
|||||||
# Note: TWINE_PASSWORD is set to a PyPI API token in Travis settings
|
# Note: TWINE_PASSWORD is set to a PyPI API token in Travis settings
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- python3 -m pip install cibuildwheel==1.2.0
|
- python3 -m pip install cibuildwheel==1.3.0
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# build the wheels, put them into './wheelhouse'
|
# build the wheels, put them into './wheelhouse'
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
|
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- python3 -m pip install cibuildwheel==1.2.0
|
- python3 -m pip install cibuildwheel==1.3.0
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# build the wheels, put them into './wheelhouse'
|
# build the wheels, put them into './wheelhouse'
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ jobs:
|
|||||||
- stage: deploy
|
- stage: deploy
|
||||||
name: Build and deploy Linux wheels
|
name: Build and deploy Linux wheels
|
||||||
services: docker
|
services: docker
|
||||||
install: python3 -m pip install cibuildwheel==1.2.0
|
install: python3 -m pip install cibuildwheel==1.3.0
|
||||||
script: python3 -m cibuildwheel --output-dir wheelhouse
|
script: python3 -m cibuildwheel --output-dir wheelhouse
|
||||||
after_success: |
|
after_success: |
|
||||||
python3 -m pip install twine
|
python3 -m pip install twine
|
||||||
@@ -66,7 +66,7 @@ jobs:
|
|||||||
name: Build and deploy macOS wheels
|
name: Build and deploy macOS wheels
|
||||||
os: osx
|
os: osx
|
||||||
language: shell
|
language: shell
|
||||||
install: python3 -m pip install cibuildwheel==1.2.0
|
install: python3 -m pip install cibuildwheel==1.3.0
|
||||||
script: python3 -m cibuildwheel --output-dir wheelhouse
|
script: python3 -m cibuildwheel --output-dir wheelhouse
|
||||||
after_success: |
|
after_success: |
|
||||||
python3 -m pip install twine
|
python3 -m pip install twine
|
||||||
@@ -76,7 +76,7 @@ jobs:
|
|||||||
name: Build and deploy Windows wheels
|
name: Build and deploy Windows wheels
|
||||||
os: windows
|
os: windows
|
||||||
language: shell
|
language: shell
|
||||||
install: python3 -m pip install cibuildwheel==1.2.0
|
install: python3 -m pip install cibuildwheel==1.3.0
|
||||||
script: python3 -m cibuildwheel --output-dir wheelhouse
|
script: python3 -m cibuildwheel --output-dir wheelhouse
|
||||||
after_success: |
|
after_success: |
|
||||||
python3 -m pip install twine
|
python3 -m pip install twine
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ with io.open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='cibuildwheel',
|
name='cibuildwheel',
|
||||||
version='1.2.0',
|
version='1.3.0',
|
||||||
install_requires=['bashlex!=0.13'],
|
install_requires=['bashlex!=0.13'],
|
||||||
description="Build Python wheels on CI with minimal configuration.",
|
description="Build Python wheels on CI with minimal configuration.",
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ def test_unknown_platform_non_ci(monkeypatch, capsys):
|
|||||||
monkeypatch.delenv('CI', raising=False)
|
monkeypatch.delenv('CI', raising=False)
|
||||||
monkeypatch.delenv('BITRISE_BUILD_NUMBER', raising=False)
|
monkeypatch.delenv('BITRISE_BUILD_NUMBER', raising=False)
|
||||||
monkeypatch.delenv('AZURE_HTTP_USER_AGENT', raising=False)
|
monkeypatch.delenv('AZURE_HTTP_USER_AGENT', raising=False)
|
||||||
|
monkeypatch.delenv('GITHUB_WORKFLOW', raising=False)
|
||||||
|
|
||||||
with pytest.raises(SystemExit) as exit:
|
with pytest.raises(SystemExit) as exit:
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user