-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (112 loc) · 6.75 KB
/
linux.yml
File metadata and controls
117 lines (112 loc) · 6.75 KB
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
115
116
117
name: Linux
on:
push:
branches: [ master, main ]
paths-ignore:
- 'docs/**'
tags-ignore:
- v*
pull_request:
branches: [ master, main ]
paths-ignore:
- 'docs/**'
tags-ignore:
- v*
workflow_dispatch:
#env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
#BUILD_TYPE: Release
defaults:
run:
shell: bash
jobs:
build-ubuntu:
name: Build
#env:
# osComplier:
# "ubuntu-24.04" : [ g++-12, g++-13, g++-14, clang++-16, clang++-17, clang++-18 ]
# "ubuntu-24.04-arm" : [ g++-12, g++-13, g++-14, clang++-16, clang++-17, clang++-18 ]
# "ubuntu-22.04" : [ g++-11, g++-12, clang++-13, clang++-14, clang++-15 ] # g++-10
# "ubuntu-22.04-arm" : [ g++-11, g++-12, g++-13, clang++-13, clang++-14, clang++-15 ] # g++-9, g++-10
strategy:
fail-fast: false
matrix:
# https://github.com/actions/runner-images#available-images
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories (os-labels : ubuntu-22.04)
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#preinstalled-software-for-github-owned-images
os: [ ubuntu-24.04, ubuntu-22.04, ubuntu-24.04-arm, ubuntu-22.04-arm ] # ubuntu-latest == ubuntu-24.04
# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#installed-software
# GNU C++: 9.5.0, 10.5.0, 11.4.0, 12.3.0, 13.1.0
# Clang: 13.0.1, 14.0.0, 15.0.7
# default == g++-11
# clang++ == clang++-14
compiler: [ default, g++-11, g++-12, g++-13, g++-14, clang++-13, clang++-14, clang++-15, clang++-16, clang++-17, clang++-18 ]
exclude: [
{ os: ubuntu-24.04 , compiler: g++-11 },
{ os: ubuntu-24.04 , compiler: g++-13 }, # default
{ os: ubuntu-24.04 , compiler: clang++-13 },
{ os: ubuntu-24.04 , compiler: clang++-14 },
{ os: ubuntu-24.04 , compiler: clang++-15 },
#{ os: ubuntu-24.04 , compiler: clang++-18 }, # clang++
{ os: ubuntu-24.04-arm, compiler: g++-11 },
{ os: ubuntu-24.04-arm, compiler: g++-13 }, # default
{ os: ubuntu-24.04-arm, compiler: clang++-13 },
{ os: ubuntu-24.04-arm, compiler: clang++-14 },
{ os: ubuntu-24.04-arm, compiler: clang++-15 },
#{ os: ubuntu-24.04-arm, compiler: clang++-18 }, # clang++
{ os: ubuntu-22.04 , compiler: g++-11 }, # default
{ os: ubuntu-22.04 , compiler: g++-13 }, # g++-13 got removed later from ubuntu-22 runner
{ os: ubuntu-22.04 , compiler: g++-14 },
#{ os: ubuntu-22.04 , compiler: clang++-14 }, # clang++
{ os: ubuntu-22.04 , compiler: clang++-16 },
{ os: ubuntu-22.04 , compiler: clang++-17 },
{ os: ubuntu-22.04 , compiler: clang++-18 },
{ os: ubuntu-22.04-arm, compiler: g++-11 }, # default
{ os: ubuntu-22.04-arm, compiler: g++-14 },
{ os: ubuntu-22.04-arm, compiler: clang++-13 }, # fails on chrono include, refer : https://github.com/actions/runner-images/issues/8659
{ os: ubuntu-22.04-arm, compiler: clang++-14 }, # clang++ fails on chrono include, refer : https://github.com/actions/runner-images/issues/8659
{ os: ubuntu-22.04-arm, compiler: clang++-16 },
{ os: ubuntu-22.04-arm, compiler: clang++-17 },
{ os: ubuntu-22.04-arm, compiler: clang++-18 } ]
runs-on: ${{matrix.os}}
steps:
- name: Compiler(s) Version
run: echo "g++ --version"; g++ --version; echo ""; echo "clang++ --version"; clang++ --version; echo ""; bash -c 'COMPILER="${{matrix.compiler}}"; if [ "${COMPILER}" == "default" ]; then COMPILER="g++"; fi; echo ""; echo "${COMPILER} --version"; ${COMPILER} --version'
- name: Checkout Repo
uses: actions/checkout@v4
- name: Get Version
run: uname -a && echo "------------" && cmake --version && echo "------------" ; bash -c 'COMPILER="${{matrix.compiler}}"; if [ "${COMPILER}" == "default" ]; then COMPILER="g++"; fi; ${COMPILER} -dM -E -x c++ /dev/null | egrep -i "(apple|mach|gnu|clang|llvm|linux|WIN|version|major|minor)"'
- name: Check Generators
# https://stackoverflow.com/questions/25941536/what-is-a-cmake-generator
run: cmake --help
- name: Compiler Macros Available
run: bash -c 'COMPILER="${{matrix.compiler}}"; if [ "${COMPILER}" == "default" ]; then COMPILER="g++"; fi; ${COMPILER} -dM -E -x c++ /dev/null'
- name: Deploy Test-Dependencies
run: ./make.sh deps
- name: Configure CMake (compiler=default) [Debug]
if: matrix.compiler == 'default'
run: cmake -S "${{github.workspace}}" -B "${{github.workspace}}/build-debug" -DDATASTRUCTURE_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Debug
- name: Configure CMake (compiler=NOT-default) [Debug]
if: matrix.compiler != 'default'
run: cmake -S "${{github.workspace}}" -B "${{github.workspace}}/build-debug" -DDATASTRUCTURE_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=${{matrix.compiler}}
- name: Check Work-Around-Flags
run: grep define "${{github.workspace}}/build-debug/_deps/converter-build/include/converter/_workaroundConfig.h" | grep -v -e "^//" -e " e_[^ ]*_FEATURE "
- name: Build [Debug]
run: cmake --build "${{github.workspace}}/build-debug" --config Debug -j$(nproc)
- name: Test [Debug]
working-directory: ${{github.workspace}}/build-debug
#run: ctest -C Debug --output-on-failure -j
run: ctest -C Debug --verbose
- name: Configure CMake (compiler=default) [Release]
if: matrix.compiler == 'default'
run: cmake -S "${{github.workspace}}" -B "${{github.workspace}}/build-release" -DDATASTRUCTURE_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release
- name: Configure CMake (compiler=NOT-default) [Release]
if: matrix.compiler != 'default'
run: cmake -S "${{github.workspace}}" -B "${{github.workspace}}/build-release" -DDATASTRUCTURE_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=${{matrix.compiler}}
- name: Build [Release]
run: cmake --build "${{github.workspace}}/build-release" --config Release -j$(nproc)
- name: Test [Release]
working-directory: ${{github.workspace}}/build-release
run: ctest -C Release --verbose
- name: Install [Release]
run: sudo cmake --install "${{github.workspace}}/build-release" --config Release