-
Notifications
You must be signed in to change notification settings - Fork 2
85 lines (78 loc) · 2.33 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
name: ci
on:
push:
branches: [ main ]
tags:
- 'v*'
pull_request:
branches: [ main ]
jobs:
cpplint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build cpplint image
run: pip install cpplint
- name: Check code in /src
run: find src/ -name "*.cc" -o -name "*.h" | xargs cpplint
- name: Check code in /tests
run: find tests/ -name "*.cc" -o -name "*.h" | xargs cpplint
- name: Check code in /examples
run: find examples/ -name "*.cc" -o -name "*.h" | xargs cpplint
test-pkg-with-conan:
runs-on: ${{ matrix.os }}
needs: cpplint
strategy:
matrix:
os: [ ubuntu-22.04, windows-2019 ]
steps:
- uses: actions/checkout@v4
- name: Install conan
run: pip3 install conan==1.64.1
- uses: ./.github/actions/build-package
test-pkg-without-conan:
runs-on: ${{ matrix.os }}
needs: cpplint
strategy:
matrix:
include:
- os: ubuntu-22.04
install: "true"
- os: windows-latest
install: "false"
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-package
with:
install: ${{ matrix.install }}
unit-tests:
strategy:
matrix:
token: [ "", "TOKEN" ]
reductstore_version: [ "main", "latest" ]
license_file: [ "", "lic.key" ]
include:
- token: ""
exclude_token_api_tag: "~[token_api]"
- token: "TOKEN"
exclude_token_api_tag: ""
- reductstore_version: "main"
exclude_api_version_tag: ""
- reductstore_version: "latest"
exclude_api_version_tag: "~[1_11]"
- license_file: ""
exclude_license_tag: "~[license]"
needs:
- cpplint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-package
- name: Generate license
run: echo '${{secrets.LICENSE_KEY}}' > lic.key
- uses: ./.github/actions/run-tests
with:
api-token: ${{matrix.token}}
tags: "${{matrix.exclude_token_api_tag}} ${{matrix.exclude_api_version_tag}} ${{matrix.exclude_license_tag}}"
reductstore-version: ${{matrix.reductstore_version}}
lic_file: ${{matrix.license_file}}