-
Notifications
You must be signed in to change notification settings - Fork 5
130 lines (106 loc) · 3.59 KB
/
kiwidb.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
120
121
122
123
124
125
126
127
128
129
130
name: kiwi
on:
push:
branches: [ "unstable" ]
pull_request:
branches: [ "*" ]
env:
BUILD_DIR: cmake-build-release
jobs:
check_format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cmake -S . -B build
- name: Add LLVM apt repository
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" | sudo tee /etc/apt/sources.list.d/llvm.list
sudo apt update
- name: Install clang-format-18
run: |
sudo apt install -y clang-format-18
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-18 200
- name: Verify clang-format version
run: clang-format --version
- name: Check Format
working-directory: ${{ github.workspace }}/build
run: make check-format
build_on_macos:
runs-on: macos-14
needs: check_format
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
brew update
brew install autoconf
brew install go
- name: Restore cache
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/download
${{ github.workspace }}/build-release
${{ github.workspace }}/deps-release
key: ${{ runner.os }}-cache-${{ hashFiles('**/CMakeLists.txt') }}-clang
restore-keys: |
${{ runner.os }}-cache-
- name: Build
run: |
export LIBRARY_PATH=$(xcrun --show-sdk-path)/usr/lib
export DYLD_LIBRARY_PATH=$(xcrun --show-sdk-path)/usr/lib
bash ./etc/script/build.sh --verbose
- name: GTest
working-directory: ${{ github.workspace }}/${{ env.BUILD_DIR }}
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest
- name: Run TCL E2e Tests
working-directory: ${{ github.workspace }}
run:
./etc/script/kiwitests.sh all
- name: Run Go E2E Tests
working-directory: ${{ github.workspace }}/${{ env.BUILD_DIR }}
run: |
set +e
cd ../tests
go mod tidy
go test -timeout 15m --ginkgo.v
sh print_log.sh
build_on_ubuntu:
runs-on: ubuntu-latest
needs: check_format
steps:
- uses: actions/checkout@v4
- name: Restore ccache
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/download
${{ github.workspace }}/build-release
${{ github.workspace }}/deps-release
key: ${{ runner.os }}-cache-${{ hashFiles('**/CMakeLists.txt') }}-gcc
restore-keys: |
${{ runner.os }}-cache-
- name: Build
run: |
bash ./etc/script/build.sh --verbose
- name: GTest
working-directory: ${{ github.workspace }}/${{ env.BUILD_DIR }}
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest
- name: Run TCL E2e Tests
working-directory: ${{ github.workspace }}
run:
./etc/script/kiwitests.sh all
- name: Run Go E2E Tests
working-directory: ${{ github.workspace }}/${{ env.BUILD_DIR }}
run: |
set +e
cd ../tests
go mod tidy
go test -timeout 15m --ginkgo.v || exit 1
sh print_log.sh