-
Notifications
You must be signed in to change notification settings - Fork 300
169 lines (139 loc) · 5.27 KB
/
macos.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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: MacOS
'on':
pull_request:
push:
branches:
- master
- develop
- feature/**
env:
CCACHE_DIR: /Users/runner/Library/Caches/ccache
CCACHE_NOHASHDIR: true
CPM_SOURCE_CACHE: /Users/runner/Library/Caches/CPM
jobs:
macos:
strategy:
fail-fast: false
name: macos-latest
runs-on: macos-latest
env:
CMAKE_FLAGS: >-
-GNinja
-DCMAKE_BUILD_TYPE=Debug
-DUSERVER_NO_WERROR=1
-DUSERVER_BUILD_ALL_COMPONENTS=1
-DUSERVER_BUILD_SAMPLES=1
-DUSERVER_BUILD_TESTS=1
-DUSERVER_FEATURE_REDIS_HI_MALLOC=1
-DUSERVER_FEATURE_CRYPTOPP_BLAKE2=0
-DUSERVER_USE_LD=lld
-DUSERVER_FORCE_DOWNLOAD_RE2=1
-DUSERVER_FORCE_DOWNLOAD_ABSEIL=1
-DUSERVER_FORCE_DOWNLOAD_PROTOBUF=1
-DUSERVER_FORCE_DOWNLOAD_GRPC=1
steps:
- uses: actions/checkout@v4
- name: Restore cached directories
id: restore-cache
uses: actions/cache/restore@v4
with:
path: |
${{env.CCACHE_DIR}}
${{env.CPM_SOURCE_CACHE}}
key: 'macos-cache-dir ${{github.ref}} run-${{github.run_number}}'
restore-keys: |
macos-cache-dir ${{github.ref}}
macos-cache-dir
- name: Install brew packages
run: |
export SDKROOT="`xcrun --show-sdk-path`"
brew update
brew install $(cat scripts/docs/en/deps/macos.md)
brew install clang-format
brew install [email protected]
brew install lld
brew link postgresql@16 # postgresql is keg-only
brew link --force zlib # keg-only + need for static linkage
brew link --force icu4c@76 # keg-only + need for static boost linkage
brew link --force curl # keg-only
brew link --force cyrus-sasl # keg-only
brew link --force openldap # keg-only
brew remove --ignore-dependencies abseil
- name: Install test dependencies
run: |
brew tap mongodb/brew
brew install clickhouse redis kafka mongodb-community rabbitmq
- name: Setup ccache
run: |
ccache -M 2.0GB
ccache -s -v
- name: Run cmake
run: |
cmake -S./ -B./build_debug -DUSERVER_PYTHON_PATH=$(brew --prefix)/bin/python3.11 $CMAKE_FLAGS
- name: Compile
run: |
cmake --build build_debug -j$(nproc) -- -k 1
- name: Save cached directories
uses: actions/cache/save@v4
with:
path: |
${{env.CCACHE_DIR}}
${{env.CPM_SOURCE_CACHE}}
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
- name: Show cache stats
run: |
du -h -d 1 ${{env.CCACHE_DIR}}
du -h -d 1 ${{env.CPM_SOURCE_CACHE}}
ccache -s -v
- name: Run tests (universal)
run: |
cd build_debug/universal
GTEST_FILTER="-UUID.ParseFail" ctest -V
- name: Run tests (samples)
run: |
cd build_debug/samples
ctest -V
- name: Run tests (core)
run: |
cd build_debug/core
ulimit -n 4096 && ctest -V -E "userver-core-unittest|testsuite-userver-core-tests-basic-chaos-tests-deadline|testsuite-userver-core-tests-websocket|testsuite-userver-core-tests-basic-chaos" # ~10 failed tests
- name: Run tests (libraries)
run: |
cd build_debug/libraries
ctest -V
- name: Run tests (clickhouse)
run: |
cd build_debug/clickhouse
ctest -V
- name: Run tests (rocks)
run: |
cd build_debug/rocks
ctest -V
- name: Run tests (kafka)
run: |
cd build_debug/kafka
ctest -V
- name: Run tests (rabbitmq)
run: |
cd build_debug/rabbitmq
ctest -V
- name: Run tests (grpc)
run: |
cd build_debug/grpc
ctest -V
- name: Run tests (mongo)
run: |
cd build_debug/mongo
ctest -V -R "userver-mongo-unittest|userver-mongo-benchmark" # many flaps in integrational tests
- name: Run tests (mysql)
run: |
cd build_debug/mysql
GTEST_FILTER="-*Transaction*" ctest -V
- name: Run tests (redis)
run: |
cd build_debug/redis
ctest -V -E testsuite-userver-redis-tests-basic-chaos
- name: Run tests (postgresql)
run: |
cd build_debug/postgresql
ulimit -n 4096 && GTEST_FILTER="-PostgreCluster.TransactionTimeouts" ctest -V -E testsuite-userver-postgresql-tests-basic-chaos