-
Notifications
You must be signed in to change notification settings - Fork 13
87 lines (83 loc) · 2.79 KB
/
ci-compiled.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
name: CI with latest GRASS GIS
on:
push:
pull_request:
schedule:
# 01:00 Pacific Time (in UTC), every day (morning)
- cron: '0 8 * * *'
jobs:
test-with-compiled:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Get dependencies
run: |
sudo apt-get update -qq -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: Set up R
uses: r-lib/actions/setup-r@v1
with:
r-version: "4.2.1"
- name: Get R dependencies
run: |
./.github/workflows/install_r_packages.R
- name: Get versions installed
run: |
python3 --version
python --version
Rscript --version
- name: Create installation directory
run: |
mkdir $HOME/install
- name: Set number of cores for compilation
run: |
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
- name: Set LD_LIBRARY_PATH for GRASS GIS compilation
run: |
echo "LD_LIBRARY_PATH=$HOME/install/lib" >> $GITHUB_ENV
- name: Get and build GRASS GIS
run: .github/workflows/build.sh $HOME/install
- name: Add the bin directory to PATH
run: |
echo "$HOME/install/bin" >> $GITHUB_PATH
- name: Get GRASS GIS version
run: |
grass --version
- name: Install dependencies from GRASS Addons
run: |
for NAME in $(awk '! /^ *(#|$)/' ".github/workflows/grass_extensions_v8.txt"); do
grass --tmp-location XY --exec g.extension --verbose extension=$NAME
done
- name: Install the module
run: |
grass --tmp-location XY --exec g.extension extension=r.futures url=./r.futures/ --verbose
- name: Cache data for testing
id: cache-nc_spm_08_grass7
uses: actions/cache@v1
with:
path: nc_spm_08_grass7
key: ${{ runner.os }}-nc_spm_08_grass7
- name: Get sample data for testing (NC SPM sample location)
if: steps.cache-nc_spm_08_grass7.outputs.cache-hit != 'true'
run: |
grass --tmp-location XY --exec \
g.download.location \
url=https://grass.osgeo.org/sampledata/north_carolina/nc_spm_08_grass7.tar.gz \
path=~ \
--verbose
- name: Run tests
run: |
cd ./r.futures/
grass --tmp-location XY --exec \
python3 -m grass.gunittest.main \
--grassdata $HOME --location nc_spm_08_grass7 --location-type nc \
--min-success 100
- name: Make HTML test report available
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: futures-testreport-compiled
path: ./r.futures/testreport
retention-days: 3