Skip to content

Commit

Permalink
CI: port macos.yml to macos-14 Arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Mar 17, 2024
1 parent 61bec08 commit 8e78342
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ permissions:
jobs:

macos_build:
# FIXME: Python tests fail with "ModuleNotFoundError: No module named '_gdal'" with macos-12
runs-on: macos-11
# Arm64
runs-on: macos-14
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
steps:

Expand Down
4 changes: 2 additions & 2 deletions ci/travis/osx/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ conda update -n base -c defaults conda
conda install -y compilers automake pkgconfig cmake

conda config --set channel_priority strict
conda install --yes --quiet proj python=3.8 swig lxml jsonschema numpy -y
conda install --yes --quiet libgdal=3.7.0=hc13fe4b_4 --only-deps -y
conda install --yes --quiet proj python=3.12 swig lxml jsonschema numpy -y
conda install --yes --quiet libgdal --only-deps -y
8 changes: 1 addition & 7 deletions ci/travis/osx/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

CONDA_PREFIX=/usr/local/miniconda/envs/test
CONDA_PREFIX=/Users/runner/miniconda3/envs/test

# Few tricks from https://github.com/conda-forge/gdal-feedstock/blob/master/recipe/build.sh

Expand All @@ -16,10 +16,6 @@ cd build
# to have an environment where we test this...
export GDAL_PYTHON_BINDINGS_WITHOUT_NUMPY=YES

# Disable Arrow/Parquet because the VM provides libraries in /usr/local/lib/
# that cause Illegal instruction error when running tests. I suspect the
# Arrow/Parquet libraries to be built with AVX2 support but the VM worker
# doesn't support it.
CFLAGS="-Wextra -Werror" CXXFLAGS="-Wextra -Werror" cmake .. \
-DCMAKE_INSTALL_PREFIX=$HOME/install-gdal \
-DCMAKE_PREFIX_PATH=${CONDA_PREFIX} \
Expand All @@ -28,8 +24,6 @@ CFLAGS="-Wextra -Werror" CXXFLAGS="-Wextra -Werror" cmake .. \
-DGDAL_USE_PNG_INTERNAL=ON \
-DGDAL_USE_POSTGRESQL=OFF \
-DGDAL_USE_WEBP=OFF \
-DGDAL_USE_ARROW=OFF \
-DGDAL_USE_PARQUET=OFF \
-DBUILD_CSHARP_BINDINGS=OFF \
-DCMAKE_UNITY_BUILD=ON
make -j3
Expand Down
8 changes: 5 additions & 3 deletions ci/travis/osx/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ mv autotest/pyscripts/test_ogr2ogr_py.py autotest/pyscripts/test_ogr2ogr_py.py.d
# Run all the Python autotests
(cd build && ctest -V -R autotest)

# For some reason, the tests crash at process exit
# (cd autotest; $PYTEST 2>&1 | tee /tmp/log.txt || /bin/true)
# tail /tmp/log.txt | grep "Failed: 0 (0 blew exceptions)" >/dev/null
export PYTEST="python3 -m pytest -vv -p no:sugar --color=no"

export DYLD_LIBRARY_PATH=/Users/runner/work/gdal/gdal/build:/Users/runner/work/gdal/gdal/build/lib

(cd autotest; $PYTEST)

0 comments on commit 8e78342

Please sign in to comment.