-
Notifications
You must be signed in to change notification settings - Fork 8
67 lines (65 loc) · 2.28 KB
/
ubuntu.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
---
name: Build on Ubuntu
on:
- push
- pull_request
env:
GDAL_AUTOLOAD_DIR: $HOME/gdalplugins
GDAL_AUTOLOAD_CMAKE_DIR: $HOME/gdalplugins_cmake
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Get dependencies
run: |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update -y
sudo apt-get install -y wget git gawk findutils
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends \
--no-install-suggests
- name: Create GDAL_AUTOLOAD directory
run: |
mkdir ${{ env.GDAL_AUTOLOAD_DIR }}
- name: Setup test data
run: |
mkdir -p $HOME/grassdata
cd $HOME/grassdata/
wget -c --quiet https://grass.osgeo.org/sampledata/north_carolina/nc_spm_08_micro.zip
unzip nc_spm_08_micro.zip
rm -f nc_spm_08_micro.zip
- name: Build
run: .github/workflows/build_ubuntu.sh ${{ env.GDAL_AUTOLOAD_DIR }}
- name: Test executing of GDAL with driver on GRASS maps
run: .github/workflows/test_simple.sh ${{ env.GDAL_AUTOLOAD_DIR }}
- name: Create GDAL_AUTOLOAD directory for CMake
run: |
mkdir ${{ env.GDAL_AUTOLOAD_CMAKE_DIR }}
- name: Set up Python for tests
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-env pytest-sugar gdal==3.6.4
- name: CMake configure
run: |
cmake -B build -DAUTOLOAD_DIR=${{ env.GDAL_AUTOLOAD_CMAKE_DIR }}
- name: CMake build
run: |
cmake --build build
- name: CTest
run: |
export GDAL_DRIVER_PATH=${GITHUB_WORKSPACE}/build
export LD_LIBRARY_PATH=$(grass --config path)/lib
cd build
ctest --output-on-failure
- name: Install with CMake
run: |
cmake --install build
- name: Test executing of GDAL with driver on GRASS maps (CMake)
run: |
.github/workflows/test_simple.sh ${{ env.GDAL_AUTOLOAD_CMAKE_DIR }}