-
Notifications
You must be signed in to change notification settings - Fork 7
51 lines (43 loc) · 1.92 KB
/
bvt-clang.yml
File metadata and controls
51 lines (43 loc) · 1.92 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
on:
workflow_call:
jobs:
bvt-clang:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: install meson
run: pipx install meson
- name: install clang
run: |
curl https://apt.llvm.org/llvm.sh | sudo bash -s -- 21
sudo apt install -y clang-21 libc++-21-dev clang-format-21
cat <<'EOF' >> "$GITHUB_ENV"
CC=clang-21
CXX=clang++-21
CXXFLAGS=-stdlib=libc++
EOF
- name: check compiler version
run: |
"$CXX" --version
- name: build and run test with clang 21 on cmake
run: |
cmake -B build-cmake -GNinja -DCMAKE_CXX_STANDARD=23 -DCMAKE_BUILD_TYPE=Release -DPROXY_BUILD_MODULES=TRUE
mapfile -t FILES < <(find include tests benchmarks build-cmake/examples_from_docs tools -type f \( -name '*.h' -o -name '*.ixx' -o -name '*.cpp' \))
echo "Running clang-format on ${#FILES[@]} files: ${FILES[*]}"
clang-format-21 --dry-run --Werror "${FILES[@]}"
cmake --build build-cmake -j
ctest --test-dir build-cmake -j
mkdir build-cmake/drop
bash ./tools/dump_build_env.sh "$CXX" build-cmake/drop/env-info.json
- name: build and run test with clang 21 on meson
run: |
meson setup build-meson --buildtype=release -Dtests=enabled -Dbenchmarks=enabled --force-fallback-for=fmt
meson test -C build-meson
meson test -C build-meson --benchmark --test-args=--benchmark_list_tests=true
- name: run benchmarks
run: build-cmake/benchmarks/msft_proxy_benchmarks --benchmark_min_warmup_time=0.1 --benchmark_min_time=0.1s --benchmark_repetitions=30 --benchmark_enable_random_interleaving=true --benchmark_report_aggregates_only=true --benchmark_format=json > build-cmake/drop/benchmarking-results.json
- name: archive benchmarking results
uses: actions/upload-artifact@v4
with:
name: drop-clang
path: build-cmake/drop/