fine-tune wording #68
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: 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 }} |