-
Notifications
You must be signed in to change notification settings - Fork 9
69 lines (68 loc) · 2.38 KB
/
gdal.yml
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
63
64
65
66
67
68
69
name: GDAL
on:
pull_request:
branches:
- main
jobs:
lint-api:
name: GDAL install
runs-on: ubuntu-24.04
container: ghcr.io/osgeo/gdal:ubuntu-small-3.9.2
strategy:
matrix:
python-version: [3.12.3]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install ubuntu pre-requisites (api)
run: |
apt-get update
apt-get -y install libudunits2-dev r-base-dev libproj-dev libgeos-dev libsqlite3-dev libtirpc-dev
gdal-config --version
- name: Setup Python ${{ matrix.python-version }} (api)
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache poetry installer
uses: actions/cache@v4
id: cache-poetry-installer
env:
cache-name: cache-poetry-installer
with:
path: "~/poetry_installer"
key: "poetry-installer-1.8.3"
- name: Download poetry installer
if: steps.cache-poetry-installer.outputs.cache-hit != 'true'
run: |
echo
mkdir ~/poetry_installer
curl -sSL https://install.python-poetry.org > ~/poetry_installer/install-poetry.py
- name: Install poetry (api)
run: |
cd ~/poetry_installer
python install-poetry.py --version 1.8.3
poetry config virtualenvs.create true
poetry config virtualenvs.in-project false
- name: Cache poetry
uses: actions/cache@v4
env:
cache-name: cache-poetry
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-1.8.3-cache-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-1.8.3-cache-
- name: Cache .venv
id: cache-venv
uses: actions/cache@v4
with:
path: ~/work/wps/wps/api/.venv
key: ${{ runner.os }}-venv-poetry-1.8.3-${{ hashFiles('**/poetry.lock') }}
- name: Install python dependencies using poetry (api)
if: steps.cache-venv.outputs.cache-hit != 'true'
working-directory: ./api
run: |
poetry run python -m pip install --upgrade pip
poetry install
poetry run python -m pip install -U setuptools wheel
poetry run python -m pip install --no-build-isolation --no-cache-dir --force-reinstall gdal==$(gdal-config --version)