|
@@ -1,41 +1,12 @@
|
|
-name: Ubuntu18
|
|
|
|
|
|
+name: Ubuntu
|
|
|
|
+# Build and run tests on Ubuntu
|
|
|
|
|
|
on:
|
|
on:
|
|
- push
|
|
- push
|
|
- pull_request
|
|
- pull_request
|
|
|
|
|
|
jobs:
|
|
jobs:
|
|
- build:
|
|
|
|
- name: ${{ matrix.os }} build
|
|
|
|
-
|
|
|
|
- runs-on: ${{ matrix.os }}
|
|
|
|
- strategy:
|
|
|
|
- matrix:
|
|
|
|
- os:
|
|
|
|
- - 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 "MAKEFLAGS=-j1" >> $GITHUB_ENV
|
|
|
|
- - name: Set LD_LIBRARY_PATH for compilation
|
|
|
|
- run: |
|
|
|
|
- echo "LD_LIBRARY_PATH=$HOME/install/lib" >> $GITHUB_ENV
|
|
|
|
- - name: Build
|
|
|
|
- run: .github/workflows/build_ubuntu18.sh $HOME/install
|
|
|
|
-
|
|
|
|
- test:
|
|
|
|
|
|
+ build-and-test:
|
|
name: ${{ matrix.os }} tests
|
|
name: ${{ matrix.os }} tests
|
|
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
@@ -43,32 +14,41 @@ jobs:
|
|
matrix:
|
|
matrix:
|
|
os:
|
|
os:
|
|
- ubuntu-18.04
|
|
- ubuntu-18.04
|
|
|
|
+ - ubuntu-20.04
|
|
fail-fast: false
|
|
fail-fast: false
|
|
|
|
|
|
steps:
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/checkout@v2
|
|
|
|
+
|
|
- name: Get dependencies
|
|
- name: Get dependencies
|
|
run: |
|
|
run: |
|
|
sudo apt-get update -y
|
|
sudo apt-get update -y
|
|
sudo apt-get install -y wget git gawk findutils
|
|
sudo apt-get install -y wget git gawk findutils
|
|
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
|
|
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
|
|
sudo apt-get install -y --no-install-recommends --no-install-suggests
|
|
sudo apt-get install -y --no-install-recommends --no-install-suggests
|
|
|
|
+
|
|
- name: Create installation directory
|
|
- name: Create installation directory
|
|
run: |
|
|
run: |
|
|
mkdir $HOME/install
|
|
mkdir $HOME/install
|
|
|
|
+
|
|
- name: Set number of cores for compilation
|
|
- name: Set number of cores for compilation
|
|
run: |
|
|
run: |
|
|
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
|
|
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
|
|
|
|
+
|
|
- name: Set LD_LIBRARY_PATH for compilation
|
|
- name: Set LD_LIBRARY_PATH for compilation
|
|
run: |
|
|
run: |
|
|
echo "LD_LIBRARY_PATH=$HOME/install/lib" >> $GITHUB_ENV
|
|
echo "LD_LIBRARY_PATH=$HOME/install/lib" >> $GITHUB_ENV
|
|
|
|
+
|
|
- name: Build
|
|
- name: Build
|
|
- run: .github/workflows/build_ubuntu18.sh $HOME/install
|
|
|
|
|
|
+ run: .github/workflows/build_${{ matrix.os }}.sh $HOME/install
|
|
|
|
+
|
|
- name: Add the bin directory to PATH
|
|
- name: Add the bin directory to PATH
|
|
run: |
|
|
run: |
|
|
echo "$HOME/install/bin" >> $GITHUB_PATH
|
|
echo "$HOME/install/bin" >> $GITHUB_PATH
|
|
|
|
+
|
|
- name: Test executing of the grass command
|
|
- name: Test executing of the grass command
|
|
run: .github/workflows/test_simple.sh
|
|
run: .github/workflows/test_simple.sh
|
|
|
|
+
|
|
- name: Run tests
|
|
- name: Run tests
|
|
run: .github/workflows/test_thorough.sh
|
|
run: .github/workflows/test_thorough.sh
|
|
|
|
|