forked from pypa/cibuildwheel
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (72 loc) · 2.01 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Test
on:
push:
branches:
- master
pull_request:
paths-ignore:
- 'docs/**'
workflow_dispatch:
# allow manual runs on branches without a PR
jobs:
pre-commit:
name: Pre-commit checks (mypy, flake8, etc.)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected]
test:
name: Test cibuildwheel on ${{ matrix.os }}
needs: pre-commit
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python_version: ['3.7']
timeout-minutes: 180
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python ${{ matrix.python_version }}
with:
python-version: ${{ matrix.python_version }}
- name: Install dependencies
run: |
python -m pip install -e ".[dev]"
- name: Sample build
if: "contains(github.event.pull_request.labels.*.name, 'CI: Sample build')"
run: |
python bin/sample_build.py
- name: Get some sample wheels
run: |
python -m test.test_projects test.test_0_basic.basic_project sample_proj
cibuildwheel --output-dir wheelhouse sample_proj
env:
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
- uses: actions/upload-artifact@v2
with:
name: sample_wheels
path: wheelhouse
- name: Test cibuildwheel
run: |
python ./bin/run_tests.py
test-emulated:
name: Test emulated cibuildwheel using qemu
needs: pre-commit
runs-on: ubuntu-latest
timeout-minutes: 180
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install dependencies
run: |
python -m pip install -r requirements-dev.txt
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Run the emulation tests
run: |
pytest --run-emulation test/test_emulation.py