forked from c-ares/c-ares
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (47 loc) · 2.08 KB
/
solaris.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
# Copyright (C) The c-ares project and its contributors
# SPDX-License-Identifier: MIT
name: Solaris
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
name: "Solaris Build and Test"
env:
DIST: SOLARIS
BUILD_TYPE: "cmake"
CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=DEBUG -DCARES_STATIC=ON -DCARES_STATIC_PIC=ON"
CMAKE_TEST_FLAGS: "-DCMAKE_PREFIX_PATH=/usr/local/ -DCARES_BUILD_TESTS=ON -DCMAKE_CXX_FLAGS=-DGTEST_HAS_PTHREAD=0"
TEST_FILTER: "--gtest_filter=-*Live*"
# Due to the ancient GDB version in the repo right now, we can't run it through GDB
TEST_DEBUGGER: "none"
steps:
- uses: actions/checkout@v4
- name: Solaris Build and Test
id: solaris
uses: vmactions/solaris-vm@v1
with:
envs: 'DIST BUILD_TYPE CMAKE_FLAGS CMAKE_TEST_FLAGS TEST_FILTER CXXFLAGS TEST_DEBUGGER'
usesh: true
# package list: http://pkg.oracle.com/solaris/release/en/catalog.shtml
prepare: |
pkg install -v --no-refresh cmake gcc pkg-config gnu-make git gdb
# We have to jump through a lot of hoops with google test.
# - We need to max out at v1.13.x because this solaris VM is old and
# only has cmake 3.9
# - We have to compile google test ourselves because it isn't available.
# - We have to forcibly compile google test without threading because
# solaris throws an exception for some unknown reason.
# - The forcible threading disablement doesn't appear to propagate to
# proper cflags with compiling c-ares tests so we need to set a
# CXX flag to let google test know it was compiled without threading.
run: |
git clone --depth=1 -b v1.13.x https://github.com/google/googletest googletest
cd googletest
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_GMOCK=ON -DINSTALL_GTEST=ON -Dgtest_disable_pthreads=ON -DCMAKE_VERBOSE_MAKEFILE=ON .
gmake
gmake install
cd ..
./ci/build.sh
./ci/test.sh