Commit e3a479e 1 parent da5a4ff commit e3a479e Copy full SHA for e3a479e
File tree 3 files changed +37
-1
lines changed
3 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ on: [push, pull_request]
3
3
4
4
jobs :
5
5
ubuntu :
6
+ name : Ubuntu
6
7
runs-on : ubuntu-latest
7
8
steps :
8
9
- name : Checkout code
40
41
# run: $GITHUB_WORKSPACE/test.sh
41
42
42
43
centos7 :
44
+ name : CentOS 7
43
45
runs-on : ubuntu-latest
44
46
container : centos:7
45
47
steps :
79
81
run : $GITHUB_WORKSPACE/test.sh
80
82
81
83
centos8 :
84
+ name : CentOS 8
82
85
runs-on : ubuntu-latest
83
86
container : centos:8
84
87
steps :
@@ -118,7 +121,26 @@ jobs:
118
121
TEST_PREFIX : valgrind --error-exitcode=99 --track-origins=yes --leak-check=full
119
122
run : $GITHUB_WORKSPACE/test.sh
120
123
124
+ freebsd :
125
+ runs-on : macos-10.15
126
+ name : FreeBSD
127
+ steps :
128
+ - name : Checkout code
129
+ uses : actions/checkout@v2
130
+ with :
131
+ repository : ${{ env.GITHUB_REPOSITORY }}
132
+ ref : ${{ env.GITHUB_HEAD_REF }}
133
+
134
+ - name : Build in FreeBSD
135
+ uses : vmactions/freebsd-vm@v0.1.5
136
+ with :
137
+ prepare : pkg install -y gmake cmake
138
+ run : |
139
+ mkdir build && cd build && cmake .. && make && cd ..
140
+ gmake
141
+
121
142
macos :
143
+ name : macOS
122
144
runs-on : macos-latest
123
145
steps :
124
146
- name : Checkout code
@@ -140,6 +162,7 @@ jobs:
140
162
run : $GITHUB_WORKSPACE/test.sh
141
163
142
164
windows :
165
+ name : Windows
143
166
runs-on : windows-latest
144
167
steps :
145
168
- name : Checkout code
Original file line number Diff line number Diff line change @@ -59,6 +59,9 @@ SET_TARGET_PROPERTIES(hiredis_static
59
59
IF (WIN32 OR MINGW)
60
60
TARGET_LINK_LIBRARIES (hiredis PUBLIC ws2_32 crypt32)
61
61
TARGET_LINK_LIBRARIES (hiredis_static PUBLIC ws2_32 crypt32)
62
+ ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" )
63
+ TARGET_LINK_LIBRARIES (hiredis PUBLIC m)
64
+ TARGET_LINK_LIBRARIES (hiredis_static PUBLIC m)
62
65
ENDIF ()
63
66
64
67
TARGET_INCLUDE_DIRECTORIES (hiredis PUBLIC $<INSTALL_INTERFACE:include > $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} >)
Original file line number Diff line number Diff line change 92
92
SSL_LDFLAGS+ =-L$(OPENSSL_PREFIX ) /lib -lssl -lcrypto
93
93
endif
94
94
95
+ ifeq ($(uname_S ) ,FreeBSD)
96
+ LDFLAGS+ =-lm
97
+ IS_GCC =$(shell sh -c '$(CC ) --version 2>/dev/null |egrep -i -c "gcc"')
98
+ ifeq ($(IS_GCC),1)
99
+ REAL_CFLAGS+ =-pedantic
100
+ endif
101
+ else
102
+ REAL_CFLAGS+ =-pedantic
103
+ endif
104
+
95
105
ifeq ($(uname_S ) ,SunOS)
96
106
IS_SUN_CC =$(shell sh -c '$(CC ) -V 2>&1 |egrep -i -c "sun|studio"')
97
107
ifeq ($(IS_SUN_CC),1)
@@ -231,7 +241,7 @@ check: hiredis-test
231
241
TEST_SSL=$(USE_SSL ) ./test.sh
232
242
233
243
.c.o :
234
- $(CC ) -std=c99 -pedantic - c $(REAL_CFLAGS ) $<
244
+ $(CC ) -std=c99 -c $(REAL_CFLAGS ) $<
235
245
236
246
clean :
237
247
rm -rf $(DYLIBNAME ) $(STLIBNAME ) $(SSL_DYLIBNAME ) $(SSL_STLIBNAME ) $(TESTS ) $(PKGCONFNAME ) examples/hiredis-example* * .o * .gcda * .gcno * .gcov
You can’t perform that action at this time.
0 commit comments