forked from c-ares/c-ares
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (93 loc) · 2.99 KB
/
alpine-latest.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
# Copyright (C) The c-ares project and its contributors
# SPDX-License-Identifier: MIT
name: Alpine (latest)
on:
push:
pull_request:
concurrency:
group: ${{ github.ref }}-alpine-latest
cancel-in-progress: true
env:
TEST_FILTER: "--gtest_filter=-*LiveSearchTXT*:*LiveSearchANY*"
CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=DEBUG -DCARES_STATIC=ON -DCARES_STATIC_PIC=ON -G Ninja"
MAKE: make
jobs:
build:
runs-on: ubuntu-latest
container:
image: alpine:latest
# Needed for TCP FastOpen
options: --privileged
name: "Alpine (latest)"
steps:
- name: Install packages
run: |
apk add bash cmake samurai gtest-dev autoconf autoconf-archive automake libtool pkgconf make clang clang-analyzer compiler-rt lldb gcc g++ valgrind gdb sudo
- name: Checkout c-ares
uses: actions/checkout@v4
- name: "Make sure TCP FastOpen is enabled"
run: |
sudo sysctl -w net.ipv4.tcp_fastopen=3
- name: "CMake: build and test c-ares"
env:
BUILD_TYPE: CMAKE
CMAKE_TEST_FLAGS: "-DCARES_BUILD_CONTAINER_TESTS=ON"
TEST_DEBUGGER: gdb
run: |
./ci/build.sh
./ci/test.sh
- name: "Autotools: build and test c-ares"
env:
BUILD_TYPE: autotools
TEST_DEBUGGER: gdb
run: |
./ci/build.sh
./ci/test.sh
- name: "CMake: UBSAN: build and test c-ares"
env:
BUILD_TYPE: "ubsan"
CC: "clang"
CXX: "clang++"
CMAKE_TEST_FLAGS: "-DCARES_BUILD_CONTAINER_TESTS=ON"
CFLAGS: "-fsanitize=undefined -fno-sanitize-recover"
CXXFLAGS: "-fsanitize=undefined -fno-sanitize-recover"
LDFLAGS: "-fsanitize=undefined"
TEST_DEBUGGER: "none"
run: |
./ci/build.sh
./ci/test.sh
- name: "CMake: ASAN: build and test c-ares"
env:
BUILD_TYPE: "asan"
CC: "clang"
CXX: "clang++"
CMAKE_TEST_FLAGS: "-DCARES_BUILD_CONTAINER_TESTS=ON"
CFLAGS: "-fsanitize=address"
CXXFLAGS: "-fsanitize=address"
LDFLAGS: "-fsanitize=address"
TEST_DEBUGGER: "none"
run: |
./ci/build.sh
./ci/test.sh
- name: "CMake: Static Analyzer: build c-ares"
env:
BUILD_TYPE: "analyze"
CC: "clang"
CXX: "clang++"
SCAN_WRAP: "scan-build -v --status-bugs"
CMAKE_TEST_FLAGS: "-DCARES_BUILD_TESTS=OFF"
TEST_DEBUGGER: "lldb"
run: |
./ci/build.sh
./ci/test.sh
- name: "Valgrind: build and test c-ares (no TCP FastOpen)"
env:
BUILD_TYPE: "valgrind"
TEST_WRAP: "valgrind --leak-check=full"
TEST_FILTER: "--gtest_filter=-*Container*:*LiveSearchANY*:*LiveSearchTXT*"
CMAKE_TEST_FLAGS: "-DCARES_BUILD_TESTS=ON"
TEST_DEBUGGER: none
run: |
sudo sysctl -w net.ipv4.tcp_fastopen=0
./ci/build.sh
./ci/test.sh