Skip to content

Commit 9f2269c

Browse files
committed
Merge remote-tracking branch 'origin/develop' into feature/ci-create-service
2 parents 6301349 + 6210fd3 commit 9f2269c

File tree

189 files changed

+6955
-1195
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+6955
-1195
lines changed

.github/workflows/debian.yml

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
name: Debian
2+
3+
'on':
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- develop
9+
- feature/**
10+
11+
env:
12+
UBSAN_OPTIONS: print_stacktrace=1
13+
ASAN_OPTIONS: detect_odr_violation=2
14+
CCACHE_DIR: /home/runner/.cache/ccache
15+
CCACHE_NOHASHDIR: true
16+
CPM_SOURCE_CACHE: /home/runner/.cache/CPM
17+
18+
jobs:
19+
debian:
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
include:
24+
# TODO: debian-11 fails to compile core
25+
#
26+
# - cmake-flags: >-
27+
# -DUSERVER_FORCE_DOWNLOAD_GTEST=ON
28+
# -DCMAKE_CC_COMPILER=clang-11
29+
# -DCMAKE_CXX_COMPILER=clang++-11
30+
# image: debian:11
31+
# info: Debian 11
32+
# deps-file: debian-11.md
33+
34+
- cmake-flags: >-
35+
-DCMAKE_CC_COMPILER=clang-14
36+
-DCMAKE_CXX_COMPILER=clang++-14
37+
image: debian:12
38+
info: Debian 12
39+
deps-file: debian-12.md
40+
41+
# TODO: fails with:
42+
# 1) ld.lld: error: undefined symbol: icudt76_dat
43+
# >>> referenced by udata.ao:(openCommonData(char const*, int, UErrorCode*)) in archive /usr/lib/x86_64-linux-gnu/libicuuc.a
44+
# 2) userver/userver/universal/src/decimal64/decimal64_test.cpp:29:47: error: passing no argument for the '...' parameter of a variadic macro is a C++20 extension [-Werror,-Wc++20-extensions]
45+
# TYPED_TEST_SUITE(Decimal64Round, RoundPolicies);
46+
# - cmake-flags: >-
47+
# -DCMAKE_CC_COMPILER=clang-19
48+
# -DCMAKE_CXX_COMPILER=clang++-19
49+
# -DUSERVER_FEATURE_GRPC=OFF
50+
# -DUSERVER_FEATURE_OTLP=OFF
51+
# -DUSERVER_FEATURE_GRPC_REFLECTION=OFF
52+
# -DUSERVER_FORCE_DOWNLOAD_RE2=ON
53+
# image: debian:13
54+
# info: Debian 13
55+
# deps-file: debian-13.md
56+
57+
name: '${{ matrix.info }}'
58+
runs-on: ubuntu-latest
59+
container: ${{ matrix.image }}
60+
61+
env:
62+
CMAKE_FLAGS: >-
63+
-DCMAKE_BUILD_TYPE=Debug
64+
-DCMAKE_CXX_STANDARD=17
65+
-DUSERVER_USE_LD=lld
66+
-DUSERVER_NO_WERROR=OFF
67+
-DUSERVER_BUILD_ALL_COMPONENTS=1
68+
-DUSERVER_BUILD_SAMPLES=1
69+
-DUSERVER_BUILD_TESTS=1
70+
-DUSERVER_FEATURE_JEMALLOC=OFF
71+
-DUSERVER_FEATURE_KAFKA=OFF
72+
-DUSERVER_FEATURE_CLICKHOUSE=OFF
73+
-DUSERVER_FEATURE_STACKTRACE=OFF
74+
-DUSERVER_FEATURE_PATCH_LIBPQ=OFF
75+
-DUSERVER_DISABLE_RSEQ_ACCELERATION=YES
76+
-DUSERVER_CHAOTIC_FORMAT=OFF
77+
-DUSERVER_CHAOTIC_GOLDEN_TESTS=OFF
78+
79+
steps:
80+
- uses: actions/checkout@v4
81+
with:
82+
fetch-depth: 0
83+
84+
- name: Restore cached directories
85+
id: restore-cache
86+
uses: actions/cache/restore@v4
87+
with:
88+
path: |
89+
${{env.CCACHE_DIR}}
90+
${{env.CPM_SOURCE_CACHE}}
91+
key: 'debian-cache-dir ${{matrix.image}} ${{github.ref}} run-${{github.run_number}}'
92+
restore-keys: |
93+
debian-cache-dir ${{github.ref}}
94+
debian-cache-dir
95+
96+
- name: Setup host cache dirs
97+
run: |
98+
mkdir -p ${{env.CCACHE_DIR}}
99+
mkdir -p ${{env.CPM_SOURCE_CACHE}}
100+
101+
- name: Install dependencies
102+
run: |
103+
apt-get update
104+
apt-get install -y lsb-release wget gnupg
105+
106+
# Install clang and lld
107+
apt-get install -y clang lld
108+
109+
# Install project dependencies
110+
apt-get install -y $(cat scripts/docs/en/deps/${{ matrix.deps-file }})
111+
112+
- name: Install test dependencies
113+
if: ${{ false }}
114+
run: |
115+
apt-get install -y postgresql-15 \
116+
redis-server \
117+
rabbitmq-server
118+
119+
- name: Setup caches
120+
run: |
121+
echo "Cached CPM packages:"
122+
du -h -d 1 ${{env.CPM_SOURCE_CACHE}} || true
123+
for f in $(find ${{env.CPM_SOURCE_CACHE}} -name "cmake.lock" 2>/dev/null || true);
124+
do
125+
repo=$(ls -d $(dirname $f)/*/ 2>/dev/null || true);
126+
if [ -n "$repo" ]; then
127+
echo "Repository: $repo";
128+
git config --global --add safe.directory $repo;
129+
fi
130+
done
131+
132+
ccache -M 2.0GB
133+
ccache -s
134+
135+
- name: Run cmake
136+
run: |
137+
cmake -S . -B build_debug $CMAKE_FLAGS ${{ matrix.cmake-flags }}
138+
139+
- name: Compile
140+
run: |
141+
cmake --build build_debug --parallel $(nproc)
142+
143+
- name: Save cached directories
144+
uses: actions/cache/save@v4
145+
with:
146+
path: |
147+
${{env.CCACHE_DIR}}
148+
${{env.CPM_SOURCE_CACHE}}
149+
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
150+
151+
- name: Show cache stats
152+
run: |
153+
du -h -d 1 ${{env.CCACHE_DIR}} || true
154+
du -h -d 1 ${{env.CPM_SOURCE_CACHE}} || true
155+
ccache -s -v
156+
157+
- name: Run tests
158+
if: ${{ false }}
159+
run: |
160+
cd build_debug
161+
ctest -V

.github/workflows/macos.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020

21-
name: macos-latest
21+
name: macos-latest (brew)
2222
runs-on: macos-latest
2323

2424
env:
@@ -56,6 +56,7 @@ jobs:
5656
run: |
5757
export SDKROOT="`xcrun --show-sdk-path`"
5858
brew update
59+
brew uninstall cmake
5960
brew install $(cat scripts/docs/en/deps/macos.md)
6061
brew install clang-format
6162
brew install lld
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: Ubuntu
2+
3+
'on':
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- develop
9+
- feature/**
10+
11+
env:
12+
JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64
13+
UBSAN_OPTIONS: print_stacktrace=1
14+
ASAN_OPTIONS: detect_odr_violation=2
15+
CCACHE_DIR: /home/runner/.cache/ccache
16+
CCACHE_NOHASHDIR: true
17+
CPM_SOURCE_CACHE: /home/runner/.cache/CPM
18+
REDIS_SLEEP_WORKAROUND_SECONDS: 60
19+
20+
jobs:
21+
posix:
22+
strategy:
23+
fail-fast: false
24+
env:
25+
CMAKE_FLAGS: >-
26+
-DCMAKE_BUILD_TYPE=Debug
27+
-DCMAKE_CXX_STANDARD=17
28+
-DUSERVER_SANITIZE="ub addr"
29+
-DUSERVER_BUILD_SAMPLES=1
30+
-DUSERVER_BUILD_TESTS=1
31+
32+
name: ubuntu (minimal installation)
33+
runs-on: ubuntu-latest
34+
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- name: Restore cached directories
39+
id: restore-cache
40+
uses: actions/cache/restore@v4
41+
with:
42+
path: |
43+
${{env.CCACHE_DIR}}
44+
${{env.CPM_SOURCE_CACHE}}
45+
key: 'ubuntu-cache-dir ${{matrix.id}} ${{github.ref}} run-${{github.run_number}}'
46+
restore-keys: |
47+
ubuntu-cache-dir ${{matrix.id}} ${{github.ref}}
48+
ubuntu-cache-dir ${{matrix.id}}
49+
50+
- name: Setup ramdrive for testsuites
51+
run: |
52+
sudo mkdir -p "/mnt/ramdisk/$USER"
53+
sudo chmod 777 "/mnt/ramdisk/$USER"
54+
sudo mount -t tmpfs -o size=2048M tmpfs "/mnt/ramdisk/$USER"
55+
56+
- name: Free disk space
57+
run: |
58+
df -h
59+
# See https://stackoverflow.com/questions/75536771/github-runner-out-of-disk-space-after-building-docker-image
60+
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /usr/lib/php* /opt/ghc \
61+
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
62+
/opt/hostedtoolcache/CodeQL || true
63+
sudo docker image prune --all --force
64+
df -h
65+
66+
- name: Install common deps
67+
run: |
68+
sudo apt update
69+
sudo apt install build-essential clang cmake ccache libjemalloc-dev
70+
sudo apt install \
71+
libssl-dev \
72+
libboost-context1.83-dev \
73+
libboost-coroutine1.83-dev \
74+
libboost-filesystem1.83-dev \
75+
libboost-iostreams1.83-dev \
76+
libboost-locale1.83-dev \
77+
libboost-program-options1.83-dev \
78+
libboost-stacktrace1.83-dev \
79+
libbenchmark-dev
80+
81+
- name: Setup ccache
82+
run: |
83+
ccache -M 2.0GB
84+
ccache -s -v
85+
86+
- name: Run cmake
87+
run: |
88+
cmake -S . -B build_debug
89+
90+
- name: Compile
91+
run: |
92+
pwd
93+
cd build_debug
94+
cmake --build . -j $(nproc)
95+
96+
- name: Save cached directories
97+
uses: actions/cache/save@v4
98+
with:
99+
path: |
100+
${{env.CCACHE_DIR}}
101+
${{env.CPM_SOURCE_CACHE}}
102+
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
103+
104+
- name: Show cache stats
105+
run: |
106+
du -h -d 1 ${{env.CCACHE_DIR}}
107+
du -h -d 1 ${{env.CPM_SOURCE_CACHE}}
108+
ccache -s -v

0 commit comments

Comments
 (0)