Skip to content

Commit

Permalink
Increment GDAL and Python versions (#1464)
Browse files Browse the repository at this point in the history
* Increment GDAL and Python versions

* Micromamba!

* Come on setup-micromamba!

* setup-micromamba v1

* Special case for Windows

* Use mamba root prefix

* Delete fiona directory before running tests

We won't have to do this when we move to src

* Debugging

* Try to solve VSIRemovePluginHandler missing symbol

* Bump geos verion

* Ignore a coverage warning

* Try a best filter expression
  • Loading branch information
sgillies committed Nov 10, 2024
1 parent 864d532 commit 9f6ec48
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 39 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test_gdal_latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
test_gdal_latest:
name: GDAL Latest
runs-on: ubuntu-latest
container: osgeo/proj:9.1.0
container: osgeo/proj:9.2.0
env:
GDAL_DIR: ${{ github.workspace }}/gdal_install
GDAL_DATA: ${{ github.workspace }}/gdal_install/share/gdal
LD_LIBRARY_PATH: "${{ github.workspace }}/gdal_install/lib/:${LD_LIBRARY_PATH}"
steps:
- uses: actions/checkout@v4.1.3
- uses: actions/checkout@v4
- name: Update
run: |
apt-get update
Expand Down
79 changes: 42 additions & 37 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
gdal-version: ['3.9.3']
include:
- python-version: '3.8'
gdal-version: '3.4.3'
Expand All @@ -49,10 +51,12 @@ jobs:
- python-version: '3.11'
gdal-version: '3.7.3'
- python-version: '3.12'
gdal-version: '3.8.3'
gdal-version: '3.8.4'
- python-version: '3.12'
gdal-version: '3.9.3'

steps:
- uses: actions/checkout@v4.1.3
- uses: actions/checkout@v4

- name: Update
run: |
Expand Down Expand Up @@ -91,65 +95,66 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [macos-13, macos-14]
python-version: ['3.9', '3.10', '3.11', '3.12']
include:
- os: macos-13
python-version: '3.12'
- os: macos-14
python-version: '3.12'
- os: ubuntu-latest
python-version: '*'
- os: windows-latest
python-version: '3.12'
steps:
- uses: actions/checkout@v4

- name: Conda Setup
uses: conda-incubator/setup-miniconda@v3
- name: Setup Conda
uses: mamba-org/setup-micromamba@v1
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
auto-update-conda: true
use-only-tar-bz2: false
python-version: ${{ matrix.python-version }}

- name: Install Env (OSX)
if: matrix.os == 'macos-13' || matrix.os == 'macos-14'
micromamba-version: '1.5.10-0'
init-shell: >-
bash
powershell
environment-name: test
create-args: >-
python=${{ matrix.python-version }}
libgdal=3.9
geos>=3.12
cython=3
numpy
- name: Install Env
if: matrix.os != 'windows-latest'
shell: bash -l {0}
run: |
conda config --prepend channels conda-forge
conda config --set channel_priority strict
conda create -n test python=${{ matrix.python-version }} libgdal geos=3.12 cython=3
conda activate test
python -m pip install -e . || python -m pip install -e .
python -m pip install -r requirements-dev.txt
micromamba run -n test python -m pip install -e . --no-use-pep517 || micromamba run -n test python -m pip install -e .
micromamba run -n test python -m pip install -r requirements-dev.txt
- name: Install Env (Windows)
if: matrix.os == 'windows-latest'
shell: bash -l {0}
run: |
conda config --prepend channels conda-forge
conda config --set channel_priority strict
conda create -n test python=${{ matrix.python-version }} libgdal geos=3.12 cython=3
conda activate test
GDAL_VERSION="3.7" python setup.py build_ext -I"/c/Users/runneradmin/miniconda3/envs/test/Library/include" -lgdal -L"/c/Users/runneradmin/miniconda3/envs/test/Library/lib" install
python -m pip install -r requirements-dev.txt
GDAL_VERSION="3.9.3" micromamba run -n test python setup.py build_ext -I"$MAMBA_ROOT_PREFIX/envs/test/Library/include" -lgdal -L"$MAMBA_ROOT_PREFIX/envs/test/Library/lib" install
micromamba run -n test python -m pip install -r requirements-dev.txt
rm -rf fiona
- name: Check and Log Environment
shell: bash -l {0}
run: |
conda activate test
python -V
conda info
micromamba run -n test python -V
micromamba info
- name: Test with Coverage (Ubuntu)
if: matrix.os == 'ubuntu-latest'
shell: bash -l {0}
run: |
micromamba run -n test python -m pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing
- name: Test with Coverage (Windows)
if: matrix.os == 'windows-latest'
shell: bash -l {0}
run: |
conda activate test
pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing
micromamba run -n test python -m pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing
- name: Test with Coverage (OSX)
if: matrix.os == 'macos-13'
if: "${{matrix.os}} == 'macos-13' || ${{matrix.os}} == 'macos-14'"
shell: bash -l {0}
run: |
conda activate test
python -m pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing
micromamba run -n test python -m pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[pytest]
filterwarnings =
error
ignore:.*Plugin file tracers.*
ignore:.*Sequential read of iterator was interrupted*:RuntimeWarning
ignore:.*negative slices or start values other than zero may be slow*:RuntimeWarning
ignore:.*negative step size may be slow*:RuntimeWarning
Expand Down

0 comments on commit 9f6ec48

Please sign in to comment.