-
Notifications
You must be signed in to change notification settings - Fork 59
48 lines (41 loc) · 1.22 KB
/
ci-test-xtgeo-cibuildwheel.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
name: cibuildwheel
on:
pull_request:
branches: [main, "*postfix"]
release:
types: [created]
jobs:
build_and_upload_with_cibw:
name: CIBW python ${{ matrix.cibw_python }} on ${{ matrix.os.runs_on }}
runs-on: ${{ matrix.os.runs_on }}
strategy:
fail-fast: false
matrix:
cibw_python: [cp38, cp39, cp310, cp311]
os:
- runs_on: ubuntu-latest
cibw_image: manylinux_x86_64
- runs_on: windows-latest
cibw_image: win_amd64
- runs_on: macos-latest
cibw_image: macosx_x86_64
env:
CIBW_BUILD: ${{ matrix.cibw_python }}-${{ matrix.os.cibw_image }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
- name: Install cibuildwheel
run: pip install wheel cibuildwheel
- name: Run cibuildwheel
run: cibuildwheel --output-dir wheelhouse
- name: Publish
if: ${{ github.event_name == 'release' }}
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_SECRET }}
run: >
python -m pip install twine &&
twine upload wheelhouse/*