forked from OSGeo/grass
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (68 loc) · 2.05 KB
/
ci.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
name: CI
on:
- push
- pull_request
jobs:
build:
name: ${{ matrix.os }} build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-16.04
- ubuntu-18.04
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Get dependencies
run: |
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 installation directory
run: |
mkdir $HOME/install
- name: Ensure one core for compilation
run: |
echo "::set-env name=MAKEFLAGS::-j1"
- name: Set LD_LIBRARY_PATH for compilation
run: |
echo "::set-env name=LD_LIBRARY_PATH::$HOME/install/lib"
- name: Build
run: .github/workflows/build.sh $HOME/install
test:
name: ${{ matrix.os }} tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-16.04
- ubuntu-18.04
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Get dependencies
run: |
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 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 compilation
run: |
echo "::set-env name=LD_LIBRARY_PATH::$HOME/install/lib"
- name: Build
run: .github/workflows/build.sh $HOME/install
- name: Add the bin directory to PATH
run: |
echo "::add-path::$HOME/install/bin"
- name: Test executing of the grass command
run: .github/workflows/test_simple.sh
- name: Run tests
run: .github/workflows/test_thorough.sh