Skip to content

Commit

Permalink
Bump version, update workflow anddisable builds for Mac13 (#7)
Browse files Browse the repository at this point in the history
- Bump version
- Disable builds for MacOS 13 (until #6 is fixed)
- Add build for Python 3.13
- Update `cibuildwheel`
- Change trigger event
  • Loading branch information
Diviloper authored Nov 30, 2024
1 parent b1d4b3f commit 7b30f85
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 16 deletions.
39 changes: 25 additions & 14 deletions .github/workflows/build_pymeos_cffi.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build PyMEOS CFFI

on:
create:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"

Expand All @@ -16,6 +16,7 @@ jobs:
is_rc: ${{ steps.check_rc.outputs.is_rc }}
is_prerelease: ${{ steps.check_prerelease.outputs.is_prerelease }}
branch: ${{ steps.check_branch.outputs.branch }}
version: ${{ steps.check_version.outputs.version }}

steps:
- name: Checkout
Expand Down Expand Up @@ -92,6 +93,13 @@ jobs:
echo "branch=$branch" >> $GITHUB_OUTPUT
echo "Branch is $branch."
- name: Check version
id: check_version
run: |
version=${GITHUB_REF#refs/tags/v}
echo "version=$version" >> $GITHUB_OUTPUT
echo "Version is $version."
build_sdist:
name: Build PyMEOS CFFI source distribution
Expand Down Expand Up @@ -129,7 +137,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-13, macos-14 ]
# os: [ ubuntu-latest, macos-13, macos-14 ]
os: [ ubuntu-latest, macos-14 ]
include:
- ld_prefix: "/usr/local"
- os: macos-14
Expand All @@ -139,6 +148,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Get dependencies from homebrew (cache)
uses: tecolicom/actions-use-homebrew-tools@v1
if: runner.os == 'macOS'
with:
tools: cmake libpq proj json-c gsl geos

- name: Update brew
if: matrix.os == 'macos-13'
# Necessary to avoid issue with macOS runners. See
Expand All @@ -148,12 +163,6 @@ jobs:
brew reinstall [email protected] || brew link --overwrite [email protected]
brew update
- name: Get dependencies from homebrew (cache)
uses: tecolicom/actions-use-homebrew-tools@v1
if: runner.os == 'macOS'
with:
tools: cmake libpq proj json-c gsl geos

- name: Get PROJ version
id: proj_version
if: runner.os == 'macOS'
Expand All @@ -168,6 +177,7 @@ jobs:
git clone --depth 1 --branch ${{ needs.checks.outputs.branch }} https://github.com/MobilityDB/MobilityDB
mkdir MobilityDB/build
cd MobilityDB/build
export MACOSX_DEPLOYMENT_TARGET="${{ matrix.os == 'macos-14' && 14 || 13.6 }}"
cmake .. -DMEOS=on
make -j
sudo make install
Expand All @@ -178,7 +188,7 @@ jobs:
cache: "pip"

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.20.0
run: python -m pip install cibuildwheel==2.22.0

- name: Set PROJ_DATA (macOS)
if: runner.os == 'macOS'
Expand Down Expand Up @@ -208,7 +218,7 @@ jobs:
CIBW_ARCHS_LINUX: "x86_64"
CIBW_ENVIRONMENT_PASS_LINUX: PACKAGE_DATA LD_LIBRARY_PATH PROJ_DATA C_INCLUDE_PATH
CIBW_ENVIRONMENT_MACOS: >
MACOSX_DEPLOYMENT_TARGET=14.0
MACOSX_DEPLOYMENT_TARGET="${{ matrix.os == 'macos-14' && 14 || 13.6 }}"
CIBW_BEFORE_ALL_LINUX: >
yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm &&
yum -y update &&
Expand Down Expand Up @@ -237,13 +247,14 @@ jobs:

test_wheels:
name: Test PyMEOS CFFI wheel - Python ${{ matrix.python-version }} on ${{ matrix.os }}
needs: build_wheels
needs: [ checks, build_wheels ]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
os: [ ubuntu-latest, macos-13, macos-14 ]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
# os: [ ubuntu-latest, macos-13, macos-14 ]
os: [ ubuntu-latest, macos-14 ]

steps:
- name: Checkout
Expand All @@ -264,7 +275,7 @@ jobs:
- name: Install PyMEOS-CFFI wheels
run: |
python -m pip install --upgrade pip
pip install -f ./pymeos_cffi_wheels pymeos_cffi
pip install -v -f ./pymeos_cffi_wheels pymeos_cffi==${{ needs.checks.outputs.version }}
- name: Run PyMEOS-CFFI check
run: |
Expand Down
2 changes: 1 addition & 1 deletion builder/templates/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from .enums import *
from .errors import *

__version__ = "1.1.2"
__version__ = "1.1.3"
__all__ = [
# Exceptions
"MeosException",
Expand Down
2 changes: 1 addition & 1 deletion pymeos_cffi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from .enums import *
from .errors import *

__version__ = "1.1.2"
__version__ = "1.1.3"
__all__ = [
# Exceptions
"MeosException",
Expand Down

0 comments on commit 7b30f85

Please sign in to comment.