generated from userver-framework/service_template
-
Notifications
You must be signed in to change notification settings - Fork 20
64 lines (53 loc) · 1.92 KB
/
ci.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
name: CI
'on':
schedule:
- cron: '30 5 * * 1' # Every Monday at 5:30
pull_request:
push:
branches:
- develop
env:
UBSAN_OPTIONS: print_stacktrace=1
jobs:
posix:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
make: test-debug
info: g++-11 + test-debug
- os: ubuntu-22.04
make: test-release
info: g++-11 + test-release
name: '${{matrix.os}}: ${{matrix.info}}'
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Reuse ccache directory
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: '${{matrix.os}} ${{matrix.info}} ccache-dir ${{github.ref}} run-${{github.run_number}}'
restore-keys: |
${{matrix.os}} ${{matrix.info}} ccache-dir ${{github.ref}} run-'
${{matrix.os}} ${{matrix.info}} ccache-
- name: Install packages
run: |
DEPS_FILE="https://raw.githubusercontent.com/userver-framework/userver/refs/heads/develop/scripts/docs/en/deps/${{matrix.os}}.md"
sudo apt update
sudo apt install --allow-downgrades -y postgresql $(wget -q -O - ${DEPS_FILE})
python3 -m pip install -r requirements.txt
- name: Reinstall postgres 14
run: |
sudo apt purge libpq5 libpq-dev postgresql-*
sudo apt install -y postgresql-14 postgresql-client-14 postgresql-server-dev-14
- name: Setup ccache
run: |
ccache -M 2.0GB
ccache -s
- name: Run ${{matrix.make}}
run: |
make ${{matrix.make}}