-
-
Notifications
You must be signed in to change notification settings - Fork 309
97 lines (80 loc) · 2.68 KB
/
ubuntu.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
88
89
90
91
92
93
94
95
96
97
---
name: Ubuntu
# Build and run tests on Ubuntu
on:
push:
branches:
- main
- releasebranch_*
pull_request:
branches:
- main
- releasebranch_*
jobs:
build-and-test:
name: ${{ matrix.name }} tests
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}-${{
matrix.name }}
cancel-in-progress: true
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: '22.04'
os: ubuntu-22.04
config: ubuntu-22.04
# This is without optional things but it still keeps things useful,
# so, e.g., without OpenMP, but with PDAL. Code or tests should be written
# so that test pass even when these optional things are not present.
- name: minimum config
os: ubuntu-22.04
config: ubuntu-22.04_without_x
fail-fast: false
steps:
- uses: actions/checkout@v3
- 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 "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
- name: Set LD_LIBRARY_PATH for compilation
run: |
echo "LD_LIBRARY_PATH=$HOME/install/lib" >> $GITHUB_ENV
- name: Print build environment variables
shell: bash -el {0}
run: |
printenv | sort
gcc --version
ldd --version
- name: Build
env:
# TODO: -pedantic-errors here won't go through ./configure (with GNU C)
CFLAGS: -fPIC
# TODO: -pedantic-errors here won't compile
CXXFLAGS: -fPIC
run: .github/workflows/build_${{ matrix.config }}.sh $HOME/install -Werror
- name: Add the bin directory to PATH
run: |
echo "$HOME/install/bin" >> $GITHUB_PATH
- name: Test executing of the grass command
run: .github/workflows/test_simple.sh
- name: Run tests
run: .github/workflows/test_thorough.sh
- name: Make HTML test report available
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: testreport-${{ matrix.config }}
path: testreport
retention-days: 3
- name: Print installed versions
if: always()
run: .github/workflows/print_versions.sh