-
Notifications
You must be signed in to change notification settings - Fork 9
103 lines (86 loc) · 3.57 KB
/
ubuntu_gcc.yaml
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
on:
pull_request:
push:
branches:
- main
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
jobs:
build:
strategy:
matrix:
cxx_standard: [11, 14, 17]
build_type: ["Release", "Debug"]
configuration: [
{"UBUNTU_VERSION":"16.04", "TOOLCHAIN_VERSION":"4.9"},
{"UBUNTU_VERSION":"18.04", "TOOLCHAIN_VERSION":"4.8"},
{"UBUNTU_VERSION":"18.04", "TOOLCHAIN_VERSION":"5"},
{"UBUNTU_VERSION":"18.04", "TOOLCHAIN_VERSION":"6"},
{"UBUNTU_VERSION":"18.04", "TOOLCHAIN_VERSION":"7"},
{"UBUNTU_VERSION":"18.04", "TOOLCHAIN_VERSION":"8"},
{"UBUNTU_VERSION":"20.04", "TOOLCHAIN_VERSION":"7"},
{"UBUNTU_VERSION":"20.04", "TOOLCHAIN_VERSION":"8"},
{"UBUNTU_VERSION":"20.04", "TOOLCHAIN_VERSION":"9"},
{"UBUNTU_VERSION":"20.04", "TOOLCHAIN_VERSION":"10"},
{"UBUNTU_VERSION":"22.04", "TOOLCHAIN_VERSION":"9"},
{"UBUNTU_VERSION":"22.04", "TOOLCHAIN_VERSION":"10"},
{"UBUNTU_VERSION":"22.04", "TOOLCHAIN_VERSION":"11"},
{"UBUNTU_VERSION":"22.04", "TOOLCHAIN_VERSION":"12"}
]
exclude:
- cxx_standard: 17
configuration: {"UBUNTU_VERSION":"18.04", "TOOLCHAIN_VERSION":"4.8"}
- cxx_standard: 17
configuration: {"UBUNTU_VERSION":"16.04", "TOOLCHAIN_VERSION":"4.9"}
runs-on: ubuntu-latest
container:
image: ubuntu:${{matrix.configuration.UBUNTU_VERSION}}
steps:
- uses: actions/checkout@v2
- name: Install system dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt update && apt-get install -y \
software-properties-common ca-certificates \
ninja-build make \
zlib1g-dev wget
add-apt-repository ppa:ubuntu-toolchain-r/test
bash ./docker/gcc/pyinstall.sh $(cat /etc/os-release | grep -a UBUNTU_CODENAME | sed -e 's/UBUNTU_CODENAME=//g')
python3 -m pip install --upgrade pip
python3 -m pip install --no-cache-dir conan==1.59 cmake
- name: Install compiler
run: |
apt update && apt-get install -y gcc-${{matrix.configuration.TOOLCHAIN_VERSION}} g++-${{matrix.configuration.TOOLCHAIN_VERSION}}
update-alternatives \
--install /usr/bin/gcc gcc /usr/bin/gcc-${{matrix.configuration.TOOLCHAIN_VERSION}} 90 \
--slave /usr/bin/g++ g++ /usr/bin/g++-${{matrix.configuration.TOOLCHAIN_VERSION}} \
--slave /usr/bin/gcov gcov /usr/bin/gcov-${{matrix.configuration.TOOLCHAIN_VERSION}}
update-alternatives --config gcc
- name: Configure CMake
env:
CC: gcc-${{matrix.configuration.TOOLCHAIN_VERSION}}
CXX: g++-${{matrix.configuration.TOOLCHAIN_VERSION}}
BUILD_TYPE: ${{matrix.build_type}}
CXX_STANDARD: ${{matrix.cxx_standard}}
run: |
mkdir -p build
cmake -B build -GNinja \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_CXX_STANDARD=${CXX_STANDARD} \
-DCMAKE_C_COMPILER=${CC} \
-DCMAKE_CXX_COMPILER=${CXX} \
-DALLOW_EXAMPLES=ON \
-DALLOW_TESTS=ON \
-DENABLE_TESTS_MEASUREMENTS=ON \
-DALLOW_BENCHMARK=ON \
-DEXCEPTIONS_DISABLE=ON \
-DRTTI_DISABLE=ON
- name: Build
run: cmake --build build
- name: Test
working-directory: build
run: ctest --rerun-failed --output-on-failure
- name: Analyze dependencies
working-directory: build
run: ldd bin/dataflow