-
Notifications
You must be signed in to change notification settings - Fork 49
114 lines (107 loc) · 3.15 KB
/
linux-simple-builds.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
103
104
105
106
107
108
109
110
111
112
113
114
name: Linux builds (basic)
on: [push, pull_request]
jobs:
build:
name: ${{matrix.cxx}}, C++${{matrix.std}}, ${{matrix.build_type}}
runs-on: ubuntu-20.04
strategy:
matrix:
cxx:
- g++-8
- g++-9
- g++-10
- g++-11
- clang++-6.0
- clang++-7
- clang++-8
- clang++-9
- clang++-10
build_type: [Debug] #, Release]
std: [17]
include:
# cannot be installed on ubuntu-20.04 be default?
- cxx: g++-8
cc: gcc-8
other_pkgs: g++-8
- cxx: g++-9
cc: gcc-9
other_pkgs: g++-9
- cxx: g++-10
cc: gcc-10
other_pkgs: g++-10
- cxx: g++-11
cc: gcc-11
other_pkgs: g++-11
- cxx: clang++-6.0
cc: clang-6.0
other_pkgs: clang-6.0
- cxx: clang++-7
cc: clang-7
other_pkgs: clang-7
- cxx: clang++-8
cc: clang-8
other_pkgs: clang-8
- cxx: clang++-9
cc: clang-9
other_pkgs: clang-9
- cxx: clang++-10
cc: clang-10
other_pkgs: clang-10
# GCC 10 + C++20
- cxx: g++-10
cc: gcc-10
other_pkgs: g++-10
std: 20
build_type: Debug
# Clang 10 + C++20
- cxx: clang++-10
cc: clang-10
other_pkgs: clang-10
std: 20
build_type: Debug
steps:
- uses: actions/checkout@v2
- name: Prepare environment
env:
TZ: "America/Los_Angeles"
run: |
sudo ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime
echo ${TZ} | sudo tee /etc/timezone
sudo apt-get install -y -y --no-install-recommends \
${{matrix.other_pkgs}} \
build-essential \
xorg-dev \
libmotif-dev \
libfreetype6-dev \
cmake \
git \
xwit \
xfonts-base \
xfonts-75dpi \
xfonts-100dpi \
tzdata \
libcurl4-gnutls-dev
- name: Configure build
working-directory: ${{runner.workspace}}
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
CXXFLAGS: ${{matrix.cxxflags}}
# Note: $GITHUB_WORKSPACE is distinct from ${{runner.workspace}}.
# This is important
run: |
cmake -H$GITHUB_WORKSPACE -B_build_${{matrix.cxx}}_${{matrix.std}} \
-DCMAKE_INSTALL_PREFIX="${PWD}/_install_${{matrix.cxx}}_${{matrix.std}}" \
-DCMAKE_BUILD_TYPE="${{matrix.build_type}}" \
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
-DCMAKE_CXX_EXTENSIONS=OFF \
- name: Build tests + lib
working-directory: ${{runner.workspace}}
run: |
cmake --build _build_${{matrix.cxx}}_${{matrix.std}} -j2
cmake --build _build_${{matrix.cxx}}_${{matrix.std}} --target install
- name: Run tests
env:
CTEST_OUTPUT_ON_FAILURE: 1
working-directory: ${{runner.workspace}}
run: cmake --build _build_${{matrix.cxx}}_${{matrix.std}} --target test