Bump base image Ubuntu to 24.04, Bump gdal to 3.9 #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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')" |