-
Notifications
You must be signed in to change notification settings - Fork 9
88 lines (87 loc) · 3.34 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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 libpq-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: |
export PATH="/github/home/.local/bin:$PATH"
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: |
export PATH="/github/home/.local/bin:$PATH"
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)
- uses: r-lib/actions/setup-r@v2
# r-lib/actions/setup-r@v2 is supposed to install version ${{ matrix.R }}, BUT, it doesn't.
# When asking for 4.1.2 - it's installing a new version! Or at least reporting a newer
# version.
with:
r-version: ${{ matrix.R }}
- name: Cache /home/runner/work/_temp/Library
# When installing cffdrs, a bunch of stuff is downloaded and compiled and placed in
# /home/runner/work/_temp/Library ; By caching this folder, subsequent calls to
# install cffdrs run much faster.
id: cache-r-cffdrs
uses: actions/cache@v4
with:
path: /home/runner/work/_temp/Library
key: ${{ runner.os }}-r-${{ matrix.R }}-cffdrs
- name: Install R dependencies (api)
run: R -e "install.packages('cffdrs')"