-
Notifications
You must be signed in to change notification settings - Fork 45
120 lines (111 loc) · 3.82 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: ci
on: [push, pull_request]
jobs:
build_linux:
runs-on: ubuntu-latest
strategy:
matrix:
compiler:
- gcc:14
- gcc:13
- clang:19
- clang:18
boost:
- true
- false
container:
image: "registry.gitlab.com/offa/docker-images/${{ matrix.compiler }}"
name: "${{ matrix.compiler }} (Boost: ${{ matrix.boost }})"
steps:
- uses: actions/checkout@main
- name: Cache Conan Packages
uses: actions/cache@main
with:
path: ~/.conan2/p/
key: conan-${{ runner.os }}-${{ matrix.compiler }}-boost_${{ matrix.boost }}-${{ hashFiles('conanfile.py') }}
- name: Install dependencies
run: script/ci_setup.sh
- name: Install Boost
if: ${{ matrix.boost == true }}
run: |
add-apt-repository ppa:mhier/libboost-latest
apt-get update
apt-get install -y boost1.83
- name: Build
run: script/ci_build.sh -DINFLUXCXX_WITH_BOOST=${{ matrix.boost }}
- name: Check deployment as cmake subdirectory
run: script/ci_testdeploy.sh -DINFLUXCXX_AS_SUBDIR=ON -DINFLUXCXX_WITH_BOOST=${{ matrix.boost }}
- name: Install
run: cmake --install build
- name: Check installed library
run: script/ci_testdeploy.sh -DINFLUXCXX_AS_SUBDIR=OFF
build_windows:
runs-on: windows-latest
strategy:
matrix:
compiler:
- msvc
boost:
- "True"
- "False"
name: "${{ matrix.compiler }} (Boost: ${{ matrix.boost }})"
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@main
- name: Cache Conan Packages
uses: actions/cache@main
with:
path: ~/.conan2/p/
key: conan-${{ runner.os }}-${{ matrix.compiler }}-boost_${{ matrix.boost }}-${{ hashFiles('conanfile.py') }}
- name: Setup Ninja
uses: turtlesec-no/get-ninja@main
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Install dependencies
run: |
pip3 install -U conan
conan profile detect
echo "tools.cmake.cmaketoolchain:generator=Ninja" >> ~/.conan2/global.conf
mkdir build
conan install -o "influxdb-cxx/*":boost=${{ matrix.boost }} -o "influxdb-cxx/*":tests=True -s compiler.cppstd=17 --build=missing . -of build
conan install --build=missing -of build --requires "libcurl/7.87.0" --deployer full_deploy
- name: Build
run: |
export CL="/ID:\a\influxdb-cxx\influxdb-cxx\build\host\libcurl\7.87.0\Release\x86_64\include"
script/ci_build.sh -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS_INIT=-D_WIN32_WINNT=0x0A00
- name: Install
run: cmake --build --preset conan-release --target install
build_osx:
runs-on: macOS-latest
name: "mac os x"
steps:
- uses: actions/checkout@main
- name: Cache Conan Packages
uses: actions/cache@main
with:
path: ~/.conan2/p/
key: conan-${{ runner.os }}-macos-${{ hashFiles('conanfile.py') }}
- name: Install Dependencies
run: |
export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_INSTALL_CLEANUP=1
brew install boost
pipx install conan
conan profile detect
mkdir build
conan install -o "influxdb-cxx/*":system=True -o "influxdb-cxx/*":tests=True -s compiler.cppstd=17 --build=missing . -of build
- name: Build
run: script/ci_build.sh
- name: Install
run: cmake --install ./build --prefix /tmp/ci_ifdb
formatting-check:
name: "formatting"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: DoozyX/clang-format-lint-action@master
name: "Verify formatting"
with:
clangFormatVersion: 15