-
Notifications
You must be signed in to change notification settings - Fork 5
62 lines (58 loc) · 1.96 KB
/
pythonpackage.yml
File metadata and controls
62 lines (58 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Python package tests
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
python-version: [3.7, 3.8]
os: [ubuntu-20.04, macos-10.15] # , windows-2019]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get install -y libproj-dev libgeos-dev libspatialite-dev libgdal-dev gdal-bin netcdf-bin
gdal-config --version
- name: Install system dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install pkg-config gdal proj geos
gdal-config --version
- name: Install system dependencies (Windows)
if: runner.os == 'Windows'
run: |
nuget install GDAL -Version 2.4.4
- name: Install pygdal Python package (Ubuntu)
if: runner.os == 'Linux'
# see https://stackoverflow.com/a/17311033
run: |
export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal
pip install pygdal=="`gdal-config --version`.*"
- name: Install pygdal Python package (macOS)
if: runner.os == 'macOS'
run: |
pip install pygdal=="`gdal-config --version`.*"
- name: Install pygdal Python package (Windows)
# https://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries#Windows
if: runner.os == 'Windows'
run: |
pip install pygdal=="2.4.4.*"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install geoextent
run: |
pip install -e .
- name: Test with pytest
run: |
pip install -r requirements-dev.txt
pytest