-
Notifications
You must be signed in to change notification settings - Fork 385
101 lines (87 loc) · 3.04 KB
/
ubuntu-minimal.yml
File metadata and controls
101 lines (87 loc) · 3.04 KB
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
name: Ubuntu
'on':
pull_request:
push:
branches:
- master
- develop
- feature/**
env:
JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64
UBSAN_OPTIONS: print_stacktrace=1
ASAN_OPTIONS: detect_odr_violation=2
CCACHE_DIR: /home/runner/.cache/ccache
CCACHE_NOHASHDIR: true
CPM_SOURCE_CACHE: /home/runner/.cache/CPM
REDIS_SLEEP_WORKAROUND_SECONDS: 60
jobs:
posix:
strategy:
fail-fast: false
env:
CMAKE_FLAGS: >-
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_CXX_STANDARD=20
-DUSERVER_SANITIZE="ub addr"
-DUSERVER_BUILD_SAMPLES=1
-DUSERVER_BUILD_TESTS=1
name: ubuntu (minimal installation)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Restore cached directories
id: restore-cache
uses: actions/cache/restore@v5
with:
path: |
${{env.CCACHE_DIR}}
${{env.CPM_SOURCE_CACHE}}
key: 'ubuntu-cache-dir ${{matrix.id}} ${{github.ref}} run-${{github.run_number}}'
restore-keys: |
ubuntu-cache-dir ${{matrix.id}} ${{github.ref}}
ubuntu-cache-dir ${{matrix.id}}
- name: Setup ramdrive for testsuites
run: |
sudo mkdir -p "/mnt/ramdisk/$USER"
sudo chmod 777 "/mnt/ramdisk/$USER"
sudo mount -t tmpfs -o size=2048M tmpfs "/mnt/ramdisk/$USER"
- name: Free disk space
run: ./scripts/githubci_free_space.sh
- name: Install common deps
run: |
sudo apt update
sudo apt install build-essential clang cmake ccache libjemalloc-dev
sudo apt install \
libssl-dev \
libboost-context1.83-dev \
libboost-coroutine1.83-dev \
libboost-filesystem1.83-dev \
libboost-iostreams1.83-dev \
libboost-locale1.83-dev \
libboost-program-options1.83-dev \
libboost-stacktrace1.83-dev \
libbenchmark-dev
- name: Setup ccache
run: |
ccache -M 2.0GB
ccache -s -v
- name: Run cmake
run: |
cmake -S . -B build_debug
- name: Compile
run: |
pwd
cd build_debug
cmake --build . -j $(nproc)
- name: Save cached directories
uses: actions/cache/save@v5
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