-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (90 loc) · 3.2 KB
/
cpp.yml
File metadata and controls
94 lines (90 loc) · 3.2 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
name: Benchmark C++ version
on:
push:
branches:
- add_cpp_benchmark
jobs:
benchmark:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up CMake and Conan
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install utilities
run: |
sudo apt update
sudo apt install -y cmake build-essential
pip install conan
- name: Set up Conan dependencies
run: |
conan profile detect
echo "
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu20
compiler.libcxx=libstdc++11
compiler.version=11
os=Linux
" > ~/.conan2/profiles/default
conan profile show
- name: Install dependencies
run: |
git clone https://github.com/linksplatform/conan-center-index
cd conan-center-index && cd recipes
conan create platform.interfaces/all --version 0.3.41
conan create platform.delegates/all --version 0.3.7
conan create platform.exceptions/all --version 0.3.2
conan create platform.converters/all --version 0.2.0
conan create platform.hashing/all --version 0.5.6 --build=missing
conan create platform.ranges/all --version 0.2.0
conan create platform.random/all --version 0.2.0
conan create platform.equality/all --version 0.0.1
conan create platform.collections/all --version 0.2.1
conan create platform.setters/all --version 0.1.0
conan create platform.data/all --version 0.1.1
conan create platform.numbers/all --version 0.1.0
conan create platform.memory/all --version 0.1.0 --build=missing
conan create platform.collections.methods/all --version 0.3.0
conan create platform.data.doublets/all --version 0.1.0
- name: Build benchmark
run: |
cd cpp
conan install . -of=build --build=missing
cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=/home/runner/work/Comparisons.PostgreSQLVSDoublets/Comparisons.PostgreSQLVSDoublets/cpp/build/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release -S . -B build
cd build
make
- name: Run benchmark
run: ./cpp/build/bin/PSQLBench --benchmark_out=cpp/out.txt --benchmark_out_format=console
- name: Prepare benchmark results
run: |
cd cpp
pip install numpy matplotlib
python3 out.py
- name: Save benchmark results
uses: actions/upload-artifact@v4
with:
name: Benchmark results
path: |
cpp/Bench1.png
cpp/Bench2.png