@@ -2,6 +2,7 @@ language: cpp
2
2
os :
3
3
- linux
4
4
- osx
5
+ - windows
5
6
compiler :
6
7
- gcc
7
8
- clang
10
11
- DEBUG="nodebug" COVERAGE="nocoverage"
11
12
- LINKING="static"
12
13
before_install :
14
+ - ps -ef
15
+ - if [ "$TRAVIS_OS_NAME" = "windows" ]; then ps -Wla | sort ; fi
13
16
- eval "${MATRIX_EVAL}"
14
- - export LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/lib"
15
- - export PATH=$PATH:/usr/local/lib
16
- - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
17
- - export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/lib
17
+ - if [ "$TRAVIS_OS_NAME" != "windows" ]; then export LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/lib"; fi
18
+ - if [ "$TRAVIS_OS_NAME" != "windows" ]; then export PATH=$PATH:/usr/local/lib; fi
19
+ - if [ "$TRAVIS_OS_NAME" != "windows" ]; then export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib; fi
20
+ - if [ "$TRAVIS_OS_NAME" != "windows" ]; then export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/lib; fi
18
21
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install info install-info; fi
19
22
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo pip install codecov; fi
20
23
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo pip install gcovr; fi
21
24
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install cppcheck; fi
22
25
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export CFLAGS='-mtune=generic'; fi
26
+ - if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install -r --no-progress -y msys2 make; fi
27
+ - if [ "$TRAVIS_OS_NAME" = "windows" ]; then PATH=$PATH:/c/tools/msys64/usr/bin/ ; fi
28
+ - if [ "$TRAVIS_OS_NAME" = "windows" ]; then powershell -executionpolicy bypass "pacman -Syu --noconfirm autoconf libtool automake make autoconf-archive pkg-config mingw-w64-x86_64-libsystre" ; fi
29
+ - if [ "$TRAVIS_OS_NAME" = "windows" ]; then
30
+ ln -s /c/tools/msys64/usr/share/autoconf* /usr/share/ ;
31
+ ln -s /c/tools/msys64/usr/share/automake* /usr/share/ ;
32
+ ln -s /c/tools/msys64/usr/share/aclocal* /usr/share/ ;
33
+ ln -s /c/tools/msys64/usr/share/libtool* /usr/share/ ;
34
+ ln -s /c/tools/msys64/usr/share/pkgconfig /usr/share/ ;
35
+ ln -s /c/tools/msys64/usr/bin/autom4te /usr/bin/ ;
36
+ ln -s /c/tools/msys64/usr/bin/autoconf /usr/bin/ ;
37
+ ln -s /c/tools/msys64/usr/bin/autoheader /usr/bin/ ;
38
+ ln -s /c/tools/msys64/usr/bin/m4 /usr/bin/ ;
39
+
40
+ PATH=$PATH:/c/tools/msys64/usr/bin/ ;
41
+ export SHELL=/usr/bin/sh.exe ;
42
+ fi
23
43
- curl https://s3.amazonaws.com/libhttpserver/libmicrohttpd_releases/libmicrohttpd-0.9.59.tar.gz -o libmicrohttpd-0.9.59.tar.gz
24
- - tar -xvzf libmicrohttpd-0.9.59.tar.gz
44
+ - tar -xzf libmicrohttpd-0.9.59.tar.gz
25
45
- cd libmicrohttpd-0.9.59
26
- - if [[ "$ARM_ARCH_DIR" != "" ]]; then ./configure --build `./config.guess` --host $ARM_ARCH_DIR --disable-examples; else ./configure --disable-examples; fi
46
+ - if [[ "$ARM_ARCH_DIR" != "" ]]; then
47
+ ./configure --build `./config.guess` --host $ARM_ARCH_DIR --disable-examples;
48
+ elif [[ "$TRAVIS_OS_NAME" = "windows" ]]; then
49
+ ./configure --prefix=/usr --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --disable-examples --disable-https --enable-shared --enable-static ;
50
+ else
51
+ ./configure --disable-examples;
52
+ fi
53
+ - if [ "$TRAVIS_OS_NAME" = "windows" ]; then find . -name Makefile -type f -exec sed -i "s/\${SHELL}/\/usr\/bin\/sh.exe/" "{}" + ; fi
54
+ - if [ "$TRAVIS_OS_NAME" = "windows" ]; then find . -name Makefile -type f -exec sed -i "s/\$(SHELL)/\/usr\/bin\/sh.exe/" "{}" + ; fi
27
55
- make
28
- - sudo make install
56
+ - if [ "$TRAVIS_OS_NAME" = "windows" ]; then make install; else sudo make install; fi
29
57
- cd ..
30
58
- if [ "$BUILD_TYPE" = "asan" ]; then export CFLAGS='-fsanitize=address'; export CXXLAGS='-fsanitize=address'; export LDFLAGS='-fsanitize=address'; fi
31
59
- if [ "$BUILD_TYPE" = "msan" ]; then export CFLAGS='-fsanitize=memory'; export CXXLAGS='-fsanitize=memory'; export LDFLAGS='-fsanitize=memory'; fi
32
60
- if [ "$BUILD_TYPE" = "lsan" ]; then export CFLAGS='-fsanitize=leak'; export CXXLAGS='-fsanitize=leak'; export LDFLAGS='-fsanitize=leak'; fi
33
61
- if [ "$BUILD_TYPE" = "tsan" ]; then export CFLAGS='-fsanitize=thread'; export CXXLAGS='-fsanitize=thread'; export LDFLAGS='-fsanitize=thread'; fi
34
62
- if [ "$BUILD_TYPE" = "ubsan" ]; then export export CFLAGS='-fsanitize=undefined'; export CXXLAGS='-fsanitize=undefined'; export LDFLAGS='-fsanitize=undefined'; fi
35
63
install :
64
+ - ps -ef
36
65
- if [[ "$CROSS_COMPILE" == 1 ]] ; then
37
66
if [[ "$ARM_ARCH_DIR" == "aarch64-linux-gnu" ]] ; then
38
67
mkdir $HOME/linker_bin ;
@@ -45,7 +74,12 @@ install:
45
74
- ./bootstrap
46
75
- mkdir build
47
76
- cd build
48
- - if [ "$LINKING" = "static" ]; then
77
+ - if [ "$TRAVIS_OS_NAME" = "windows" ]; then
78
+ ../configure --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --disable-fastopen --disable-examples CPPFLAGS='-I/c/tools/msys64/mingw64/include/ -I/usr/include/' LDFLAGS='-L/c/tools/msys64/mingw64/lib -L/usr/lib/' ;
79
+ cd .. ;
80
+ find . -name Makefile -type f -exec sed -i "s/\$(SHELL)/\/usr\/bin\/sh.exe/" "{}" + ;
81
+ cd build ;
82
+ elif [ "$LINKING" = "static" ]; then
49
83
../configure --enable-static --disable-fastopen;
50
84
elif [ "$DEBUG" = "debug" ] && [ "$COVERAGE" = "coverage" ]; then
51
85
../configure --enable-debug --enable-coverage --disable-shared --disable-fastopen;
@@ -63,8 +97,9 @@ install:
63
97
- if [ "$CROSS_COMPILE" = "1" ] && [ "$ARM_ARCH_DIR" = "aarch64-linux-gnu" ]; then sed -i 's+/usr/bin/ld+$HOME/linker_bin/ld+g' libtool; fi
64
98
- if [ "$CROSS_COMPILE" = "1" ] && [ "$ARM_ARCH_DIR" = "aarch64-linux-gnu" ]; then sed -i 's+/usr/bin/ld+$HOME/linker_bin/ld+g' Makefile; fi
65
99
- make
66
- - make check TESTS=
100
+ - if [ "$TRAVIS_OS_NAME" != "windows" ]; then make check TESTS= ; fi
67
101
script :
102
+ - ps -ef
68
103
- if [[ "$CROSS_COMPILE" == 1 ]]; then
69
104
cd test ;
70
105
if [[ "$ARM_ARCH_DIR" == "aarch64-linux-gnu" ]]; then
@@ -85,12 +120,10 @@ script:
85
120
qemu-arm -L /usr/arm-linux-gnueabi/ ./.libs/threaded ;
86
121
fi
87
122
fi
88
- - make check
89
- - cat test/test-suite.log
123
+ - if [ "$TRAVIS_OS_NAME" != "windows" ]; then make check ; fi
124
+ - if [ "$TRAVIS_OS_NAME" != "windows" ]; then cat test/test-suite.log; fi
90
125
- if [ "$VALGRIND" = "valgrind" ]; then make check-valgrind; fi;
91
126
- if [ "$VALGRIND" = "valgrind" ]; then cat test/test-suite-memcheck.log; fi;
92
- - ls -l /usr/local/lib/
93
- - ls -l /usr/lib/
94
127
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then cd ../src/; cppcheck --error-exitcode=1 .; cd ../build; fi
95
128
- |
96
129
if [ "$PERFORMANCE" = "select" ]; then
@@ -110,15 +143,23 @@ script:
110
143
./benchmark_threads 8080 &
111
144
sleep 5 && ab -n 10000000 -c 100 localhost:8080/plaintext
112
145
fi
146
+ after_script :
147
+ - ps -ef
148
+ - if [ "$TRAVIS_OS_NAME" = "windows" ]; then ps -Wla | sort ; fi
149
+ - if [ "$TRAVIS_OS_NAME" = "windows" ]; then gpgconf --kill gpg-agent ; fi
150
+ - if [ "$TRAVIS_OS_NAME" = "windows" ]; then taskkill //F //PID $(ps -Wla | tr -s ' ' | grep gpg | cut -f2 -d' ') ; fi
151
+ - if [ "$TRAVIS_OS_NAME" = "windows" ]; then ps -Wla | sort ; fi
152
+ - echo $$
113
153
after_success :
114
154
- if [ "$DEBUG" = "debug" ] && [ "$COVERAGE" = "coverage" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then bash <(curl -s https://codecov.io/bash); fi
115
155
matrix :
116
156
exclude :
117
157
- compiler : clang
118
158
env : DEBUG="debug" COVERAGE="coverage"
119
- - compiler : clang
120
- env : LINKING='static'
159
+ - os : windows
121
160
include :
161
+ - os : windows
162
+ env : DEBUG="nodebug" COVERAGE="nocoverage" YARN_GPG=no
122
163
- os : linux
123
164
addons :
124
165
apt :
0 commit comments