-
Notifications
You must be signed in to change notification settings - Fork 38
213 lines (201 loc) · 6.64 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
name: ci
on: [push, pull_request]
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Run clang-format style check for C/C++/Protobuf programs.
uses: jidicula/clang-format-action@c74383674bf5f7c69f60ce562019c1c94bc1421a # v4.13.0
with:
clang-format-version: '13'
check-path: 'c_src'
- name: Prepare OTP and rebar3
uses: erlef/setup-beam@2f0cc07b4b9bea248ae098aba9e1a8a1de5ec24c # v1.17.5
with:
otp-version: 26
rebar3-version: 3.20.0
- name: Run erlfmt for erlang code
run: |
rebar3 fmt -c
pre-check:
name: Pre check
needs: formatting-check
runs-on: ubuntu-latest
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
# https://builds.hex.pm/builds/otp/ubuntu-22.04/builds.txt
otp:
- 26.2.5.3
rebar3:
- 3.23.0
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
submodules: recursive
- uses: erlef/setup-beam@2f0cc07b4b9bea248ae098aba9e1a8a1de5ec24c # v1.17.5
with:
otp-version: ${{ matrix.otp }}
rebar3-version: ${{ matrix.rebar3 }}
- name: release build with debug log off
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=Debug
export QUICER_TLS_VER=sys
make ci
mac-mesh:
timeout-minutes: 60
needs: pre-check
strategy:
fail-fast: false
matrix:
os:
- macos-14
otp:
- 26
openssl:
- openssl3
- openssl
- sys
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
submodules: recursive
- name: Configure Homebrew cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
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 }}
echo "$(brew --prefix erlang@${{ matrix.otp }})/bin" >> $GITHUB_PATH
- name: release build
env:
QUICER_TLS_VER: ${{ matrix.openssl }}
run: |
wget https://s3.amazonaws.com/rebar3/rebar3
sudo mv rebar3 /usr/local/bin/ && sudo chmod +x /usr/local/bin/rebar3
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@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
if: failure()
with:
name: mac-ct-logs-${{ matrix.os }}-${{ matrix.otp }}
path: _build/test/logs
retention-days: 1
linux-mesh:
needs: pre-check
runs-on: ubuntu-latest
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
# https://builds.hex.pm/builds/otp/ubuntu-22.04/builds.txt
otp:
- 25.3.2.9
- 26.2.5.3
- 27.1
openssl:
- openssl3
- openssl
- sys
rebar3:
- 3.23.0
build_type:
- RelWithDebInfo
- Debug
logging:
- ON
- OFF
arch:
- x86_64
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
submodules: recursive
- uses: erlef/setup-beam@2f0cc07b4b9bea248ae098aba9e1a8a1de5ec24c # v1.17.5
with:
otp-version: ${{ matrix.otp }}
rebar3-version: ${{ matrix.rebar3 }}
- name: release build with debug log off
env:
CMAKE_BUILD_TYPE: ${{ matrix.build_type }}
QUICER_TLS_VER: ${{ 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 QUICER_TLS_VER
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@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
if: failure()
with:
name: linux-ct-logs-${{ matrix.otp }}-${{ matrix.openssl }}-${{ matrix.build_type }}-${{ matrix.logging }}-${{ matrix.arch }}
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