Skip to content

ENH: Give more informative file format errors #147

ENH: Give more informative file format errors

ENH: Give more informative file format errors #147

Workflow file for this run

name: Build & Publish
on:
pull_request:
branches: [main, "*postfix"]
release:
types: [published]
jobs:
build:
name: CIBW Python ${{ matrix.cibw_python }} on ${{ matrix.os_arch[0] }}
runs-on: ${{ matrix.os_arch[0] }}
strategy:
fail-fast: false
matrix:
cibw_python: [cp38, cp39, cp310, cp311, cp312]
os_arch:
- [ubuntu-latest, manylinux_x86_64]
- [windows-latest, win_amd64]
- [macos-latest, macosx_x86_64]
- [macos-latest-xlarge, macosx_arm64]
exclude:
- os_arch: [macos-latest-xlarge, macosx_arm64]
cibw_python: cp39
env:
CIBW_BUILD: ${{ matrix.cibw_python }}-${{ matrix.os_arch[1] }}
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 twine
- name: Run cibuildwheel
run: cibuildwheel --output-dir wheelhouse
- name: Check metadata
run: twine check wheelhouse/*
- uses: actions/upload-artifact@v4
if: ${{ github.event_name == 'release' && github.event.action == 'published' }}
with:
name: cibw-${{ env.CIBW_BUILD }}
path: wheelhouse/*.whl
publish:
needs: [build]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
environment:
name: pypi
url: https://pypi.org/project/xtgeo
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: wheelhouse
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
packages-dir: wheelhouse
verbose: true