-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (82 loc) · 2.58 KB
/
ci.yml
File metadata and controls
103 lines (82 loc) · 2.58 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
name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
build-ubuntu:
name: Build and Test (Ubuntu)
runs-on: ubuntu-latest
strategy:
matrix:
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake g++
- name: Configure CMake
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DVECTORVAULT_ENABLE_AVX2=ON \
-DVECTORVAULT_WERROR=OFF \
-DVECTORVAULT_BUILD_TESTS=ON \
-DVECTORVAULT_BUILD_BENCH=ON
- name: Build
run: cmake --build build -j$(nproc)
- name: Run Tests
working-directory: build
run: ctest --output-on-failure --timeout 300
- name: Upload artifacts
if: matrix.build_type == 'Release'
uses: actions/upload-artifact@v4
with:
name: vectorvault-ubuntu-${{ matrix.build_type }}
path: |
build/vectorvault_api
build/vectorvault_bench
build-windows:
name: Build and Test (Windows)
runs-on: windows-latest
strategy:
matrix:
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v4
- name: Setup MSVC
uses: microsoft/setup-msbuild@v2
- name: Configure CMake
run: |
cmake -B build `
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} `
-DVECTORVAULT_ENABLE_AVX2=ON `
-DVECTORVAULT_WERROR=OFF `
-DVECTORVAULT_BUILD_TESTS=ON `
-DVECTORVAULT_BUILD_BENCH=ON
- name: Build
run: cmake --build build --config ${{ matrix.build_type }} -j
- name: Run Tests
working-directory: build
run: ctest -C ${{ matrix.build_type }} --output-on-failure --timeout 300
- name: Upload artifacts
if: matrix.build_type == 'Release'
uses: actions/upload-artifact@v4
with:
name: vectorvault-windows-${{ matrix.build_type }}
path: |
build/${{ matrix.build_type }}/vectorvault_api.exe
build/${{ matrix.build_type }}/vectorvault_bench.exe
format-check:
name: Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install clang-format
run: sudo apt-get update && sudo apt-get install -y clang-format
- name: Check formatting
run: |
find include src api bench tests -name '*.cpp' -o -name '*.hpp' | \
xargs clang-format --dry-run --Werror