-
Notifications
You must be signed in to change notification settings - Fork 38
153 lines (143 loc) · 4.33 KB
/
main.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
name: ci
on: [push, pull_request]
jobs:
mac:
strategy:
fail-fast: false
matrix:
os:
- macos-12
- macos-11
otp:
- 24
- 25
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure Homebrew cache
uses: actions/cache@v3
with:
path: |
~/Library/Caches/Homebrew/
~/Library/Caches/Homebrew/downloads/
key: brew-${{ matrix.os }}-${{ matrix.otp }}
- name: prepare
run: |
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
brew install erlang@${{ matrix.otp }}
- name: install rebar3
run: |
wget https://s3.amazonaws.com/rebar3/rebar3 && chmod +x rebar3
cp ./rebar3 /usr/local/bin/rebar3
- name: release build
run: |
export PATH="/usr/local/opt/erlang@${{ matrix.otp }}/bin:$PATH"
erl -eval 'erlang:display(erlang:system_info(system_version)),halt()'
ulimit -c unlimited
# run sudo for getting coredump
sudo make ci
- name: lldb bt
if: failure()
run: |
corefile=$(find /cores -name 'core.*')
if [ -n $corefile ]; then
sudo lldb --one-line bt $(erl -noshell -eval 'io:format(code:root_dir()),halt()')/erts-*/bin/beam.smp -c "${corefile}"
else
echo "No coredump found"
fi
- name: Archive CT Logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: mac-ct-logs
path: _build/test/logs
retention-days: 1
linux:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
otp:
- 24.3.4
- 25.3.2
openssl:
- openssl3
- openssl
rebar3:
- 3.20.0
build_type:
- RelWithDebInfo
- Debug
logging:
- ON
- OFF
arch:
- x86_64
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp }}
rebar3-version: ${{ matrix.rebar3 }}
- name: release build with debug log off
env:
CMAKE_BUILD_TYPE: ${{ matrix.build_type }}
QUIC_TLS: ${{ matrix.openssl }}
QUIC_ENABLE_LOGGING: ${{ matrix.logging }}
run: |
echo "github ref: ${{ github.event.ref }}"
echo "github ref: ${{ github.ref }}"
sudo sysctl -w kernel.core_pattern=core
ulimit -c unlimited
export CMAKE_BUILD_TYPE
export QUIC_TLS
export QUIC_ENABLE_LOGGING
if [ "${QUIC_ENABLE_LOGGING}" == "ON" ] ; then
export QUIC_LOGGING_TYPE=lttng
sudo apt-add-repository ppa:lttng/stable-2.13
sudo apt-get update
sudo apt-get install -y lttng-tools babeltrace liblttng-ust-dev lttng-modules-dkms-
which lttng
uname -a
mkdir msquic_lttng
lttng create msquic -o=./msquic_lttng
lttng enable-event --userspace CLOG_*
lttng add-context --userspace --type=vpid --type=vtid
lttng start
cleanup () {
lttng stop msquic;
babeltrace --names all ./msquic_lttng/* > _build/test/quic.babel.txt
}
trap "cleanup" EXIT
fi
make ci
- name: gdb bt
if: failure()
run: |
set -x
which gdb || sudo apt install gdb
corefile=$(find _build/test -name core.*)
if [ -n "$corefile" ]; then
echo "found corefile: $corefile";
gdb -ex bt $(erl -noshell -eval 'io:format(code:root_dir()),halt()')/erts-*/bin/beam.smp "${corefile}"
else
echo "No coredump found"
fi
- name: Archive CT Logs
uses: actions/upload-artifact@v3
if: failure()
with:
name: linux-ct-logs
path: _build/test/
retention-days: 1
- name: build rel tar file
if: startsWith(github.ref, 'refs/tags/')
run: |
make tar
mv _build/default/rel/quicer/quicer-*.tar.gz quicer.tar.gz