mirror of https://github.com/c-ares/c-ares.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
150 lines
4.4 KiB
150 lines
4.4 KiB
env: |
|
CIRRUS_CLONE_DEPTH: 1 |
|
|
|
task: |
|
matrix: |
|
- name: "Debian amd64" |
|
env: |
|
DIST: "DEBIAN" |
|
LC_ALL: "C" |
|
SCAN_BUILD: "scan-build" |
|
MAKE: "make" |
|
container: |
|
image: debian:latest |
|
- name: "Debian arm64" |
|
env: |
|
DIST: "DEBIAN-ARM" |
|
LC_ALL: "C" |
|
SCAN_BUILD: "scan-build" |
|
MAKE: "make" |
|
arm_container: |
|
image: debian:latest |
|
- name: "FreeBSD amd64" |
|
env: |
|
DIST: "FREEBSD" |
|
SCAN_BUILD: "scan-build" |
|
MAKE: "gmake" |
|
freebsd_instance: |
|
image_family: freebsd-13-0 |
|
- name: "MacOS" |
|
env: |
|
DIST: "MACOS" |
|
SCAN_BUILD: "/usr/local/opt/llvm/bin/scan-build" |
|
MAKE: "make" |
|
macos_instance: |
|
image: big-sur-xcode |
|
matrix: |
|
- name: "CMAKE" |
|
env: |
|
BUILD_TYPE: "cmake" |
|
- name: "AUTOTOOLS" |
|
env: |
|
BUILD_TYPE: "autotools" |
|
- name: "ASAN" |
|
# FreeBSD just hangs trying to run tests, think it may be trying to run leak sanitizer |
|
only_if: $DIST != 'FREEBSD' |
|
env: |
|
BUILD_TYPE: "asan" |
|
CC: "clang" |
|
CONFIG_OPTS: "--enable-debug" |
|
CFLAGS: "-fsanitize=address" |
|
CXXFLAGS: "-fsanitize=address" |
|
LDFLAGS: "-fsanitize=address -lpthread" |
|
- name: "UBSAN" |
|
# FreeBSD just hangs trying to run tests, think it may be trying to run leak sanitizer |
|
only_if: $DIST != 'FREEBSD' |
|
env: |
|
BUILD_TYPE: "ubsan" |
|
CC: "clang" |
|
CONFIG_OPTS: "--enable-debug" |
|
CFLAGS: "-fsanitize=undefined -fno-sanitize-recover" |
|
CXXFLAGS: "-fsanitize=undefined -fno-sanitize-recover" |
|
LDFLAGS: "-fsanitize=undefined -lpthread" |
|
- name: "LSAN" |
|
# lsan only works on debian x86/x64 |
|
only_if: $DIST == 'DEBIAN' |
|
env: |
|
BUILD_TYPE: "lsan" |
|
CC: "clang" |
|
CONFIG_OPTS: "--enable-debug" |
|
CFLAGS: "-fsanitize=leak" |
|
CXXFLAGS: "-fsanitize=leak" |
|
LDFLAGS: "-fsanitize=leak -lpthread" |
|
- name: "ANALYZE" |
|
env: |
|
BUILD_TYPE: "analyze" |
|
CC: "clang" |
|
SCAN_WRAP: "${SCAN_BUILD} -v --status-bugs" |
|
CONFIG_OPTS: "--enable-debug --disable-tests" |
|
- name: "VALGRIND" |
|
# FreeBSD just hangs trying to run tests, think it may be trying to run leak sanitizer |
|
only_if: $DIST == 'DEBIAN' |
|
env: |
|
BUILD_TYPE: "valgrind" |
|
TEST_WRAP: "valgrind --leak-check=full" |
|
TEST_FILTER: "--gtest_filter=-*Container*:-*LiveSearchANY*" |
|
- name: "COVERAGE" |
|
only_if: $DIST == 'DEBIAN' |
|
env: |
|
BUILD_TYPE: "coverage" |
|
CI_NAME: "cirrus-ci" |
|
CI_BUILD_NUMBER: "${CIRRUS_BUILD_ID}" |
|
CI_BUILD_URL: "${CIRRUS_REPO_CLONE_URL}" |
|
CI_BRANCH: "${CIRRUS_BRANCH}" |
|
CI_PULL_REQUEST: "${CIRRUS_PR}" |
|
CONFIG_OPTS: "--enable-debug --disable-shared --enable-code-coverage --enable-tests" |
|
|
|
install_script: |
|
- | |
|
case "${DIST}" in |
|
DEBIAN*) |
|
apt-get update && \ |
|
apt-get install -y cmake ninja-build autoconf automake libtool g++ pip |
|
case "${BUILD_TYPE}" in |
|
asan|lsan|ubsan) |
|
apt-get install -y clang |
|
;; |
|
analyze) |
|
apt-get install -y clang clang-tools |
|
;; |
|
valgrind) |
|
apt-get install -y valgrind |
|
;; |
|
coverage) |
|
apt-get install -y lcov |
|
pip3 install --user cpp-coveralls |
|
;; |
|
esac |
|
;; |
|
FREEBSD) |
|
# pkg upgrade -y && \ |
|
pkg install -y cmake ninja |
|
case "${BUILD_TYPE}" in |
|
asan|analyze|ubsan|lsan) |
|
pkg install -y llvm autoconf automake libtool gmake |
|
;; |
|
autotools) |
|
pkg install -y autoconf automake libtool gmake |
|
;; |
|
esac |
|
;; |
|
MACOS) |
|
brew update && \ |
|
brew install ninja cmake |
|
case "${BUILD_TYPE}" in |
|
asan|ubsan|lsan|analyze) |
|
brew install llvm autoconf automake libtool make |
|
;; |
|
autotools) |
|
brew install autoconf automake libtool make |
|
;; |
|
esac |
|
;; |
|
esac |
|
|
|
script: |
|
- ./ci/build.sh |
|
- ./ci/test.sh |
|
- if [ "$BUILD_TYPE" = "autotools" -a "$DIST" = "DEBIAN" ]; then ./ci/distcheck.sh ; fi |
|
- if [ "$BUILD_TYPE" = "coverage" ]; then ./ci/covupload.sh ; fi |
|
|
|
|