Repository navigation
46 lines (44 loc) · 1.53 KB
/
Copy pathhost.yml
File metadata and controls
46 lines (44 loc) · 1.53 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
name: host-regression
on: [push, pull_request, workflow_call]
permissions:
contents: read
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: clang-format 16 check (tracked .c/.h outside third_party/)
run: |
python -m pip install clang-format==16.0.6
clang-format --version
git ls-files -z '*.c' '*.h' ':(exclude)third_party' | xargs -0 clang-format --dry-run --Werror
asan-ubsan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure
run: >-
cmake -DTDSH_BUILD_HOST=ON -S . -B build-asan -DCMAKE_BUILD_TYPE=Debug
-DCMAKE_C_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer -g"
-DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address,undefined"
- name: Build
run: cmake --build build-asan --parallel
- name: Test
env:
ASAN_OPTIONS: detect_leaks=1:halt_on_error=1
UBSAN_OPTIONS: halt_on_error=1
run: ctest --test-dir build-asan --output-on-failure
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Build tdsh.exe (MinGW) and run its tests
shell: bash
run: |
choco install ninja -y
cmake -S . -B build-win -G Ninja -DCMAKE_C_COMPILER=gcc -DTDSH_BUILD_HOST=ON
cmake --build build-win
ctest --test-dir build-win --output-on-failure --no-tests=error