-
Notifications
You must be signed in to change notification settings - Fork 371
105 lines (94 loc) · 2.59 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# GitHub Actions for GEOS
#
# Paul Ramsey <pramsey at cleverelephant dot ca>
# Based on AZP configuration by Mateusz Loskot <mateusz at loskot dot net>
name: CI
on: [push, pull_request]
env:
BUILD_TYPE: 'Release'
MAKEFLAGS: '-j2'
jobs:
linux:
name: 'Linux'
strategy:
matrix:
ci:
- {
compiler: g++,
build: cmake,
cxxstd: 11,
arch: 64,
packages: 'g++ cmake doxygen',
os: ubuntu-latest
}
- {
compiler: g++,
build: autotools,
cxxstd: 11,
arch: 64,
packages: 'g++ automake doxygen git2cl',
os: ubuntu-latest
}
# - {
# compiler: g++,
# build: autotools,
# cxxstd: 11,
# arch: 32,
# packages: 'g++-4.8-multilib gcc-4.8-multilib g++-multilib gcc-multilib doxygen automake git2cl',
# os: ubuntu-18.04
# }
- {
compiler: clang++,
build: cmake,
cxxstd: 11,
arch: 64,
packages: 'clang cmake doxygen',
os: ubuntu-latest
}
- {
compiler: g++,
build: cmake,
cxxstd: 11,
arch: 64,
packages: 'g++ cmake doxygen',
os: ubuntu-latest
}
- {
compiler: clang++,
build: cmake,
cxxstd: 14,
arch: 64,
packages: 'clang cmake doxygen',
os: ubuntu-latest
}
runs-on: ${{ matrix.ci.os }}
steps:
- name: 'Install'
run: |
set -e
uname -a
sudo -E apt-get update
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install make ${{ matrix.ci.packages }}
- name: 'Check Out'
uses: actions/checkout@v3
- name: 'Build'
run: |
set -e
if [ ${{ matrix.ci.build }} == 'cmake' ];
then
mkdir build.cmake
cd build.cmake
cmake --version
cmake -DCMAKE_CXX_COMPILER=${{ matrix.ci.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.ci.cxxstd }} -DBUILD_DOCUMENTATION=YES -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
make
cmake --build . --target docs
ctest --output-on-failure .
else
set -e
./autogen.sh
mkdir build.autotools
cd build.autotools
CFLAGS="-std=c++${{ matrix.ci.cxxstd }} -m${{ matrix.ci.arch }}"
../configure CC=${{ matrix.ci.compiler }} CXX=${{ matrix.ci.compiler }} CXXFLAGS="$CFLAGS" CFLAGS="$CFLAGS"
make && make check && make distcheck
fi