forked from equinor/xtgeo
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (54 loc) · 1.88 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
49
50
51
52
53
54
55
56
57
58
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:
matrix:
cibw_python: [cp37, 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_MANYLINUX_X86_64_IMAGE: manylinux2014
# pillow < 8.4 required for CIBW build
CIBW_BEFORE_TEST: >
pushd {project} &&
pip install -r requirements/requirements_test.txt &&
git clone --depth 1 https://github.com/equinor/xtgeo-testdata ../xtgeo-testdata
# Ignore forking tests as they do not work well with CIBW
CIBW_TEST_COMMAND: >
pushd {project} &&
pytest --disable-warnings -x -m "not hypothesis" --ignore tests/test_well --ignore-glob="*forks.py"
CIBW_BUILD: ${{ matrix.cibw_python }}-${{ matrix.os.cibw_image }}
# CIBW_TEST_SKIP: "cp312*linux* cp312*macos*"
CIBW_BEFORE_BUILD: python -m pip install "pip<=22.0.4"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
- name: Install cibuildwheel
run: >
python -m pip install wheel &&
python -m pip install cibuildwheel
- name: Run cibuildwheel
run: python -m cibuildwheel --output-dir wheelhouse
- name: Publish
if: ${{ github.event_name == 'release' }}
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_SECRET }}
run: >
pip install twine &&
twine upload wheelhouse/*