-
Notifications
You must be signed in to change notification settings - Fork 294
132 lines (116 loc) · 4.16 KB
/
alpine.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
name: Alpine
'on':
pull_request:
push:
branches:
- master
- develop
- feature/**
env:
UBSAN_OPTIONS: print_stacktrace=1
ASAN_OPTIONS: detect_odr_violation=2
CXX: clang++-18
CC: clang-18
CCACHE_DIR: /home/runner/.cache/ccache
CPM_SOURCE_CACHE: /home/runner/.cache/CPM
jobs:
posix:
strategy:
fail-fast: false
name: ubuntu-24.04 (build-only)
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Restore cached directories
id: restore-cache
uses: actions/cache/restore@v4
with:
path: |
${{env.CCACHE_DIR}}
${{env.CPM_SOURCE_CACHE}}
key: 'alpine-cache-dir ${{github.ref}} run-${{github.run_number}}'
restore-keys: |
alpine-cache-dir ${{github.ref}} run-
alpine-cache-dir
- name: Setup host dirs
run: |
mkdir -p ${{env.CCACHE_DIR}}
mkdir -p ${{env.CPM_SOURCE_CACHE}}
- name: Setup latest Alpine Linux
uses: jirutka/setup-alpine@v1
with:
volumes: |
${{env.CCACHE_DIR}}:${{env.CCACHE_DIR}}
${{env.CPM_SOURCE_CACHE}}:${{env.CPM_SOURCE_CACHE}}
- name: Install dependencies
shell: alpine.sh --root {0}
run: |
pwd
cat /etc/alpine-release
apk add lld
apk add ccache
apk add $(cat scripts/docs/en/deps/alpine.md)
- name: Install test dependencies
shell: alpine.sh --root {0}
run: |
apk add postgresql16 \
redis \
rabbitmq-server \
- name: Setup cache
shell: alpine.sh --root {0}
run: |
mkdir -p ${{env.CCACHE_DIR}}
mkdir -p ${{env.CPM_SOURCE_CACHE}}
ccache -M 2.0GB
ccache -s -v
- name: Run cmake
shell: alpine.sh --root {0}
run: |
pwd
mkdir build_debug
cd build_debug
CMAKE_PROGRAM_PATH=/usr/lib/llvm17/bin/ \
cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DUSERVER_NO_WERROR=OFF \
-DUSERVER_BUILD_ALL_COMPONENTS=1 \
-DUSERVER_BUILD_SAMPLES=1 \
-DUSERVER_BUILD_TESTS=1 \
-DUSERVER_FEATURE_JEMALLOC=OFF \
-DUSERVER_FEATURE_KAFKA=OFF \
-DUSERVER_FEATURE_CLICKHOUSE=OFF \
-DUSERVER_FEATURE_STACKTRACE=OFF \
-DUSERVER_FEATURE_PATCH_LIBPQ=OFF \
-DUSERVER_DOWNLOAD_PACKAGE_PROTOBUF=ON \
-DUSERVER_DISABLE_RSEQ_ACCELERATION=YES \
-DUSERVER_FORCE_DOWNLOAD_ABSEIL=1 \
-DUSERVER_FORCE_DOWNLOAD_PROTOBUF=1 \
-DUSERVER_FORCE_DOWNLOAD_GRPC=1 \
-DUSERVER_USE_LD=lld \
..
- name: Compile
shell: alpine.sh --root {0}
run: |
cd build_debug
cmake --build . -j$(nproc)
ls -lha ${{env.CCACHE_DIR}}
du -h -d 1 ${{env.CCACHE_DIR}}
ls -lha ${{env.CPM_SOURCE_CACHE}}
du -h -d 1 ${{env.CPM_SOURCE_CACHE}}
- 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 ccache progress
shell: alpine.sh --root {0}
run: |
ls -lha ${{env.CCACHE_DIR}}
du -h -d 1 ${{env.CCACHE_DIR}}
ls -lha ${{env.CPM_SOURCE_CACHE}}
du -h -d 1 ${{env.CPM_SOURCE_CACHE}}
ccache -s -v