-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds a new set of scripts for build, i.e., it does not use the current build script because they mix 6 and 7 and are not parametrized enough. The build also does not return non-zero in case of failure. Specifically, the make step does not return non-zero in case of failure because module failure is not counted as overall failure. (This does not go well with GitHub Actions or Travis style CI). To avoid problems with getting the right Python package version combo, version is not required in the requirements.txt file. (This may need to be addressed in the future.) There is only a small number of tests, i.e., the test coverage is small, but they are running now. However, most of the tests are failing. (Many can be probably fixed by reviewing the datasets used.)
- Loading branch information
1 parent
d422fa9
commit 3d73a40
Showing
5 changed files
with
166 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
bison | ||
build-essential | ||
flex | ||
libbz2-dev | ||
libcairo-dev | ||
libfftw3-dev | ||
libgdal-dev | ||
libgl1-mesa-dev | ||
libglu1-mesa-dev | ||
libnetcdf-dev | ||
libopenblas-dev | ||
libpng-dev | ||
libproj-dev | ||
libreadline-dev | ||
libzstd-dev | ||
sqlite3 | ||
subversion | ||
zlib1g-dev |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env bash | ||
|
||
# The make step requires something like: | ||
# export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PREFIX/lib" | ||
# further steps additionally require: | ||
# export PATH="$PATH:$PREFIX/bin" | ||
|
||
# fail on non-zero return code from a subprocess | ||
set -e | ||
|
||
if [ -z "$1" ] | ||
then | ||
echo "Usage: $0 PREFIX" | ||
exit 1 | ||
fi | ||
|
||
export INSTALL_PREFIX=$1 | ||
|
||
# GRASS GIS | ||
|
||
./configure \ | ||
--prefix="$INSTALL_PREFIX/" \ | ||
--enable-largefile \ | ||
--with-cxx \ | ||
--with-zstd \ | ||
--with-bzlib \ | ||
--with-blas \ | ||
--with-lapack \ | ||
--with-readline \ | ||
--with-openmp \ | ||
--with-pthread \ | ||
--with-tiff \ | ||
--with-freetype \ | ||
--with-freetype-includes="/usr/include/freetype2/" \ | ||
--with-proj-share=/usr/share/proj \ | ||
--with-geos \ | ||
--with-sqlite \ | ||
--with-fftw \ | ||
--with-netcdf | ||
|
||
make | ||
make install |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Build and test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
# 01:00 Pacific Time (in UTC), every day (late night PT) | ||
- cron: '0 8 * * *' | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.grass_version }} | ||
|
||
runs-on: ubuntu-18.04 | ||
|
||
strategy: | ||
matrix: | ||
grass_version: | ||
- master | ||
- releasebranch_7_8 | ||
fail-fast: false | ||
|
||
steps: | ||
|
||
- name: Checkout addons | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: OSGeo/grass | ||
ref: ${{ matrix.grass_version }} | ||
path: grass | ||
|
||
- name: Checkout core | ||
uses: actions/checkout@v2 | ||
with: | ||
path: grass-addons | ||
|
||
- name: Get dependencies | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get install -y wget git gawk findutils | ||
xargs -a <(awk '! /^ *(#|$)/' "grass-addons/.github/workflows/apt.txt") -r -- \ | ||
sudo apt-get install -y --no-install-recommends --no-install-suggests | ||
- name: Set up Python 3 as default Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.6 | ||
|
||
- name: Get Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r grass-addons/.github/workflows/requirements.txt | ||
- name: Create installation directory | ||
run: | | ||
mkdir $HOME/install | ||
- name: Set number of cores for compilation | ||
run: | | ||
echo "::set-env name=MAKEFLAGS::-j$(nproc)" | ||
- name: Set LD_LIBRARY_PATH for GRASS GIS compilation | ||
run: | | ||
echo "::set-env name=LD_LIBRARY_PATH::$HOME/install/lib" | ||
- name: Build GRASS GIS core | ||
run: | | ||
cd grass | ||
../grass-addons/.github/workflows/build_grass.sh $HOME/install | ||
- name: Add the bin directory to PATH | ||
run: | | ||
echo "::add-path::$HOME/install/bin" | ||
- name: Make simple grass command available | ||
run: | | ||
ln -s $HOME/install/bin/grass* $HOME/install/bin/grass | ||
- name: Build addons | ||
run: | | ||
cd grass-addons/grass7 | ||
GRASS_INSTALL=$HOME/install/grass* | ||
make MODULE_TOPDIR=$GRASS_INSTALL | ||
- name: Run tests | ||
run: | | ||
cd grass-addons/grass7 | ||
../.github/workflows/test.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
matplotlib | ||
numpy | ||
scipy | ||
six |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
# fail on non-zero return code from a subprocess | ||
set -e | ||
|
||
grass --tmp-location XY --exec \ | ||
g.extension g.download.location | ||
grass --tmp-location XY --exec \ | ||
g.download.location url=http://fatra.cnr.ncsu.edu/data/nc_spm_full_v2alpha2.tar.gz dbase=$HOME | ||
|
||
grass --tmp-location XY --exec \ | ||
python3 -m grass.gunittest.main \ | ||
--grassdata $HOME --location nc_spm_full_v2alpha2 --location-type nc \ | ||
--min-success 30 |