mirror of https://github.com/c-ares/c-ares.git
CI: MacOS: move to GitHub Actions instead of Cirrus-CI (#825)
We've been using a lot of time on Cirrus-CI and our credits run out quickly. MacOS costs 15 compute credits vs 3 compute credits for Linux. Move MacOS testing to GitHub Actions. Fix By: Brad House (@bradh352)pull/826/head
parent
8a53099184
commit
072972aec1
5 changed files with 90 additions and 20 deletions
@ -0,0 +1,74 @@ |
|||||||
|
# Copyright (C) The c-ares project and its contributors |
||||||
|
# SPDX-License-Identifier: MIT |
||||||
|
name: MacOS |
||||||
|
on: |
||||||
|
push: |
||||||
|
pull_request: |
||||||
|
|
||||||
|
concurrency: |
||||||
|
group: ${{ github.ref }}-macos |
||||||
|
cancel-in-progress: true |
||||||
|
|
||||||
|
env: |
||||||
|
TEST_FILTER: "-v --gtest_filter=-*LiveSearchTXT*:*LiveSearchANY*:*LiveGetLocalhostByAddr*" |
||||||
|
CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=DEBUG -DCARES_STATIC=ON -DCARES_STATIC_PIC=ON -G Ninja" |
||||||
|
MAKE: make |
||||||
|
|
||||||
|
jobs: |
||||||
|
build: |
||||||
|
runs-on: macos-latest |
||||||
|
name: "MacOS" |
||||||
|
steps: |
||||||
|
- name: Install packages |
||||||
|
run: brew install cmake googletest llvm autoconf automake libtool make ninja |
||||||
|
- name: Checkout c-ares |
||||||
|
uses: actions/checkout@v4 |
||||||
|
- name: "CMake: build and test c-ares" |
||||||
|
env: |
||||||
|
BUILD_TYPE: CMAKE |
||||||
|
CMAKE_TEST_FLAGS: "-DCARES_BUILD_TESTS=ON" |
||||||
|
TEST_DEBUGGER: lldb |
||||||
|
run: | |
||||||
|
./ci/build.sh |
||||||
|
./ci/test.sh |
||||||
|
- name: "Autotools: build and test c-ares" |
||||||
|
env: |
||||||
|
BUILD_TYPE: autotools |
||||||
|
TEST_DEBUGGER: lldb |
||||||
|
run: | |
||||||
|
./ci/build.sh |
||||||
|
./ci/test.sh |
||||||
|
- name: "CMake: UBSAN: build and test c-ares" |
||||||
|
env: |
||||||
|
BUILD_TYPE: "ubsan" |
||||||
|
CC: "clang" |
||||||
|
CMAKE_TEST_FLAGS: "-DCARES_BUILD_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" |
||||||
|
CMAKE_TEST_FLAGS: "-DCARES_BUILD_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" |
||||||
|
SCAN_WRAP: "/opt/homebrew/opt/llvm/bin/scan-build-py -v --status-bugs" |
||||||
|
CMAKE_TEST_FLAGS: "-DCARES_BUILD_TESTS=OFF" |
||||||
|
TEST_DEBUGGER: "lldb" |
||||||
|
run: | |
||||||
|
./ci/build.sh |
||||||
|
./ci/test.sh |
Loading…
Reference in new issue