Repository navigation
142 lines (136 loc) · 6.39 KB
/
Copy pathMddlogIntegration.yml
File metadata and controls
142 lines (136 loc) · 6.39 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
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
name: Optional mddlog integration
on:
schedule:
- cron: '43 4 * * 1'
workflow_dispatch:
concurrency:
group: mddlog-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
clang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/checkout@v4
with:
persist-credentials: false
repository: ambroise-leclerc/mddlog
ref: 5b43265664d83c3b7135d328f611e685792a1b02
path: dependencies/mddlog
- name: Setup CMake (4.3.1, within the qualified 4.0-4.3 window)
uses: ./.github/actions/setup-cmake
with:
version: '4.3.1'
- name: Install LLVM/Clang 21 and libc++
run: |
set -euo pipefail
sudo apt-get update
LLVM_KEY_FPR="6084F3CF814B57C1CF12EFD515CF4D18AF4F7421"
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key -o /tmp/llvm-snapshot.asc
gpg --show-keys --with-colons --fingerprint /tmp/llvm-snapshot.asc \
| awk -F: '/^fpr:/ {print $10}' | grep -qx "$LLVM_KEY_FPR"
gpg --dearmor < /tmp/llvm-snapshot.asc > /tmp/llvm.gpg
sudo install -m 0644 /tmp/llvm.gpg /etc/apt/keyrings/llvm.gpg
codename="$(. /etc/os-release && echo "$VERSION_CODENAME")"
echo "deb [signed-by=/etc/apt/keyrings/llvm.gpg] https://apt.llvm.org/${codename}/ llvm-toolchain-${codename}-21 main" \
| sudo tee /etc/apt/sources.list.d/llvm-toolchain-21.list
sudo apt-get update
sudo apt-get install -y ninja-build build-essential ccache clang-21 clang-tidy-21 libc++-21-dev libc++abi-21-dev python3
- name: Configure source integration
run: >-
cmake -S . -B build-mddlog-source -G Ninja
-DCMAKE_BUILD_TYPE=Release -DENABLE_CACHE=OFF -DWEBFRONT_ENABLE_TESTING=ON -DWEBFRONT_BUILD_EXAMPLES=OFF
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/dependencies/mddlog/cmake/toolchains/linux-clang21-libcxx.cmake
-DWEBFRONT_USE_MDDLOG=ON
-DWEBFRONT_MDDLOG_SOURCE_DIR=${{ github.workspace }}/dependencies/mddlog
- name: Compile and link source integration
run: cmake --build build-mddlog-source --parallel 2
- name: Run source integration
run: ctest --test-dir build-mddlog-source --output-on-failure --no-tests=error
- name: Install mddlog
run: cmake --install build-mddlog-source/mddlog --prefix "${{ github.workspace }}/mddlog-install"
- name: Configure installed integration
run: >-
cmake -S . -B build-mddlog-install -G Ninja
-DCMAKE_BUILD_TYPE=Release -DENABLE_CACHE=OFF -DWEBFRONT_ENABLE_TESTING=ON -DWEBFRONT_BUILD_EXAMPLES=OFF
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/dependencies/mddlog/cmake/toolchains/linux-clang21-libcxx.cmake
-DWEBFRONT_USE_MDDLOG=ON
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/mddlog-install
- name: Compile and link installed integration
run: cmake --build build-mddlog-install --parallel 2
- name: Run installed integration
run: ctest --test-dir build-mddlog-install --output-on-failure --no-tests=error
# The bounded browser transport lane (mddlog#72) under sanitizers. Every translation unit,
# including mddlog's modules and the std module, is instrumented through the global flags.
sanitizers:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: address-undefined
flags: -fsanitize=address,undefined -fno-sanitize-recover=undefined
- name: thread
flags: -fsanitize=thread
name: sanitizers (${{ matrix.name }})
env:
ASAN_OPTIONS: detect_leaks=1:abort_on_error=1
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
TSAN_OPTIONS: halt_on_error=1:second_deadlock_stack=1
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/checkout@v4
with:
persist-credentials: false
repository: ambroise-leclerc/mddlog
ref: 5b43265664d83c3b7135d328f611e685792a1b02
path: dependencies/mddlog
- name: Setup CMake (4.3.1, within the qualified 4.0-4.3 window)
uses: ./.github/actions/setup-cmake
with:
version: '4.3.1'
- name: Install LLVM/Clang 21 and libc++
run: |
set -euo pipefail
sudo apt-get update
LLVM_KEY_FPR="6084F3CF814B57C1CF12EFD515CF4D18AF4F7421"
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key -o /tmp/llvm-snapshot.asc
gpg --show-keys --with-colons --fingerprint /tmp/llvm-snapshot.asc \
| awk -F: '/^fpr:/ {print $10}' | grep -qx "$LLVM_KEY_FPR"
gpg --dearmor < /tmp/llvm-snapshot.asc > /tmp/llvm.gpg
sudo install -m 0644 /tmp/llvm.gpg /etc/apt/keyrings/llvm.gpg
codename="$(. /etc/os-release && echo "$VERSION_CODENAME")"
echo "deb [signed-by=/etc/apt/keyrings/llvm.gpg] https://apt.llvm.org/${codename}/ llvm-toolchain-${codename}-21 main" \
| sudo tee /etc/apt/sources.list.d/llvm-toolchain-21.list
sudo apt-get update
sudo apt-get install -y ninja-build build-essential clang-21 libc++-21-dev libc++abi-21-dev
- name: Restrict address-space randomization for ThreadSanitizer
if: matrix.name == 'thread'
run: sudo sysctl -w vm.mmap_rnd_bits=28
- name: Configure instrumented source integration
run: >-
cmake -S . -B build-sanitized -G Ninja
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_CACHE=OFF -DWEBFRONT_ENABLE_TESTING=ON -DWEBFRONT_BUILD_EXAMPLES=OFF
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/dependencies/mddlog/cmake/toolchains/linux-clang21-libcxx.cmake
"-DCMAKE_CXX_FLAGS=-stdlib=libc++ ${{ matrix.flags }} -fno-omit-frame-pointer"
"-DCMAKE_EXE_LINKER_FLAGS=${{ matrix.flags }}"
-DWEBFRONT_USE_MDDLOG=ON
-DWEBFRONT_MDDLOG_SOURCE_DIR=${{ github.workspace }}/dependencies/mddlog
- name: Compile and link instrumented tests
run: cmake --build build-sanitized --parallel 2 --target tests
- name: Run the transport and WebLink scenarios repeatedly
run: |
for iteration in 1 2 3 4 5; do
echo "Transport iteration $iteration"
./build-sanitized/test/unit/tests "[transport],[weblink]" --order rand
done
- name: Run every test once
run: ./build-sanitized/test/unit/tests --order rand