Skip to content

Commit

Permalink
CI maintenance
Browse files Browse the repository at this point in the history
* lessons learned from morphio
  • Loading branch information
mgeplf committed Oct 11, 2024
1 parent 4e4611e commit dc39048
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clang_format_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

steps:
- name: Fetch repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Install packages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Fetch repository
run: git fetch --prune --unshallow
- name: Get submodules
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docstring_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

steps:
- name: Fetch repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand Down
29 changes: 9 additions & 20 deletions .github/workflows/publish-sdist-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ env:

CIBW_BUILD_VERBOSITY: 3
CIBW_BUILD: 'cp*'
CIBW_SKIP: 'cp35-* cp36-* cp37-* *-musllinux_* *-manylinux_i686'
CIBW_SKIP: 'cp35-* cp36-* cp37-* cp38-* *-musllinux_* *-manylinux_i686'
CIBW_TEST_COMMAND: ( cd {project}/python/tests; python -m unittest -v )
UNIXY_HDF5_VERSION: 1.14.3

Expand All @@ -19,14 +19,15 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-latest]
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-20.04, macos-13, macos-14]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.11'
Expand Down Expand Up @@ -68,7 +69,7 @@ jobs:
if: runner.os == 'macOS'

env:
CIBW_ENVIRONMENT_PASS: "STATIC_HDF5 CMAKE_PREFIX_PATH CMAKE_OSX_ARCHITECTURES MACOSX_DEPLOYMENT_TARGET"
CIBW_ENVIRONMENT_PASS: "STATIC_HDF5 CMAKE_PREFIX_PATH"
CIBW_BEFORE_BUILD: |
# CMake complains if the dependencies come from within the same tree
# as the source, so we'll just pretend they are elsewhere
Expand All @@ -79,19 +80,7 @@ jobs:
# used by setup.py to decide if to set `FindHDF5` to use static hdf5 libraries
export STATIC_HDF5=True
# x86_64 macOS allows for cross compilation; first we do arm64,
# only for the 11.0 target; and store in the cache the compiled code...
export CIBW_ARCHS_MACOS="arm64"
export CMAKE_OSX_ARCHITECTURES="arm64"
export MACOSX_DEPLOYMENT_TARGET="11.0"
export CMAKE_PREFIX_PATH=/Users/runner/work/src-cache/install-$CIBW_ARCHS_MACOS/install
python -m cibuildwheel --output-dir dist
# ...and now we do both targets for x86_64
export CIBW_ARCHS_MACOS="x86_64"
export CMAKE_OSX_ARCHITECTURES="x86_64"
unset MACOSX_DEPLOYMENT_TARGET
export CMAKE_PREFIX_PATH=/Users/runner/work/src-cache/install-$CIBW_ARCHS_MACOS/install
export CMAKE_PREFIX_PATH=/Users/runner/work/src-cache/install-`uname -m`/install
python -m cibuildwheel --output-dir dist
- name: Store wheel as artifact
Expand All @@ -106,12 +95,12 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'

- name: Set up Python 3.11
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
CXX: g++
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: 'true'

Expand All @@ -49,7 +49,7 @@ jobs:
CXX: g++
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: 'true'

Expand All @@ -71,15 +71,15 @@ jobs:

strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: 'true'

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -101,7 +101,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: 'true'

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def build_extension(self, ext):
extras_require={
'docs': ['sphinx-bluebrain-theme'],
},
python_requires=">=3.8",
python_requires=">=3.9",
use_scm_version={"local_scheme": "no-local-version",
},
package_dir={"": "python"},
Expand Down

0 comments on commit dc39048

Please sign in to comment.