-
-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (67 loc) · 1.77 KB
/
test.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
# yaml-language-server: $schema=https://json-schema.org/draft-07/schema#
name: Test
on:
push:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
tool:
- cmake
- bazel
compiler:
- gcc
- clang
compiler_version:
- 12
- 15
exclude:
- compiler: gcc
compiler_version: 15
- compiler: clang
compiler_version: 12
runs-on: ${{ matrix.os }}
steps:
- name: Checkout codebase
uses: actions/checkout@v3
- name: Setup bazel
if: matrix.tool == 'bazel'
uses: jwlawson/actions-setup-bazel@v1
with:
bazel-version: "latest"
- name: Setup cmake
if: matrix.tool == 'cmake'
uses: jwlawson/actions-setup-cmake@v1
with:
cmake-version: "latest"
- name: Setup Clang
if: matrix.compiler == 'clang'
uses: KyleMayes/install-llvm-action@v1
with:
version: ${{ matrix.compiler_version }}
- name: Set Clang Compiler Env
if: matrix.compiler == 'clang'
run: |
echo "CC=${LLVM_PATH}/bin/clang" >> $GITHUB_ENV
echo "CXX=${LLVM_PATH}/bin/clang++" >> $GITHUB_ENV
- name: Setup GCC
uses: Dup4/actions-setup-gcc@v1
if: matrix.compiler == 'gcc'
with:
version: ${{ matrix.compiler_version }}
- name: Build And Test Use Cmake
if: matrix.tool == 'cmake'
run: |
make tests
make unittest
make benchmark
- name: Build And Test Use Bazel
if: matrix.tool == 'bazel'
run: |
make bazel_ut
make bazel_bench