Improve setup docs for Github actions

This commit is contained in:
Joe Rickerby
2020-03-12 19:46:58 +00:00
parent 840da16d39
commit 8f9a68fe94
2 changed files with 20 additions and 15 deletions
+14 -14
View File
@@ -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
@@ -65,19 +78,6 @@ AppVeyor will store the built wheels for you - you can access them from the proj
For more info on this config file, check out the [docs](https://www.appveyor.com/docs/). For more info on this config file, check out the [docs](https://www.appveyor.com/docs/).
# GitHub Actions [linux/mac/windows] {: #github-actions}
Using GitHub Actions, you can build all three platforms on the same service. Create a `./github/workflows/build.yml` file in your repo.
> build.yml
```yaml
{% include "../examples/github-minimal.yml" %}
```
Commit this file, enable building of your repo on GitHub Actions, and push.
For more info on this file, check out the [docs](https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions).
> ⚠️ Got an error? Check the [FAQ](faq.md). > ⚠️ Got an error? Check the [FAQ](faq.md).
<script> <script>
+6 -1
View File
@@ -3,14 +3,16 @@ name: Build
on: [push, pull_request] on: [push, pull_request]
jobs: jobs:
test: build_wheels:
name: Build wheel on ${{ matrix.os }} name: Build wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-18.04, windows-latest, macos-latest] os: [ubuntu-18.04, windows-latest, macos-latest]
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- uses: actions/setup-python@v1 - uses: actions/setup-python@v1
name: Install Python name: Install Python
with: with:
@@ -19,13 +21,16 @@ jobs:
- name: Install cibuildwheel - name: Install cibuildwheel
run: | run: |
python -m pip install cibuildwheel==1.2.0 python -m pip install cibuildwheel==1.2.0
- name: Install Visual C++ for Python 2.7 - name: Install Visual C++ for Python 2.7
if: startsWith(matrix.os, 'windows') if: startsWith(matrix.os, 'windows')
run: | run: |
choco install vcpython27 -f -y choco install vcpython27 -f -y
- name: Build wheel - name: Build wheel
run: | run: |
python -m cibuildwheel --output-dir wheelhouse python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v1
with: with:
name: wheels name: wheels