Skip to content

Commit

Permalink
BLD: Update cibuildwheel setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mferrera committed Oct 2, 2023
1 parent b81cfae commit 72eb37a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
20 changes: 5 additions & 15 deletions .github/workflows/ci-test-xtgeo-cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,22 @@ jobs:
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@v3
- uses: actions/checkout@v4
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
pip install wheel cibuildwheel
- name: Run cibuildwheel
run: python -m cibuildwheel --output-dir wheelhouse

- name: Publish
if: ${{ github.event_name == 'release' }}
env:
Expand Down
14 changes: 14 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,20 @@ exclude = '''
)/
'''

[tool.cibuildwheel]
manylinux-x86_64-image = "manylinux2014"
test-extras = ["dev"]
before-build = "python -m pip install 'pip<=22.0.4'"
before-test = [
"pushd {package}",
"git clone --depth 1 https://github.com/equinor/xtgeo-testdata ../xtgeo-testdata",
]
test-command = [
"pushd {package}",
# Ignore forking tests as they do not work well with CIBW
"pytest --disable-warnings -x -m 'not hypothesis' --ignore tests/test_well --ignore-glob='*forks.py'",
]

[tool.isort]
profile = "black"

Expand Down

0 comments on commit 72eb37a

Please sign in to comment.