This repository has been archived by the owner on Nov 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
85 lines (76 loc) · 3.01 KB
/
.travis.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
matrix:
include:
# GCC on linux
- language: c
os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env:
- TRAVIS_COMPILER=gcc
# GCC on Darwin
- language: c
os: osx
osx_image: xcode10.1
env:
- TRAVIS_COMPILER=gcc
# Clang on Linux
- language: c
os: linux
addons:
apt:
sources:
- llvm-toolchain-trusty-5.0
packages:
- clang-5.0
env:
- TRAVIS_COMPILER=clang
# Clang on Darwin
- language: c
os: osx
osx_image: xcode10.1
env:
- TRAVIS_COMPILER=clang
# Mingw64 on Windows
# - language: shell
# os: windows
# cache:
# directories:
# - if [ "$TRAVIS_OS_NAME" != "windows" ]; then /c/tools; fi
# - $HOME/.gradle
# env:
# - TRAVIS_COMPILER=gcc
# Install dependencies
install:
- echo "Installing dependencies..."
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then export JAVA_HOME=/c/tools/jdk8; fi
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then export PATH=/c/tools/mingw64/bin:$PATH; fi
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then PowerShell -Command 'Set-ExecutionPolicy -ExecutionPolicy RemoteSigned'; fi
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then PowerShell -File ./.scripts/InstallMingw64.ps1; fi
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then PowerShell -File ./.scripts/InstallNpcap.ps1; fi
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then PowerShell -Command 'choco install jdk8 -params "installdir=C:\\tools\\jdk8"'; fi
- echo "Done."
# Build
before_script:
- echo "Building..."
- if [ "$TRAVIS_OS_NAME" != "windows" ]; then cd jxnet-native/libpcap && ./configure && make && cd ../..; fi
- if [ "$TRAVIS_OS_NAME" != "windows" ]; then cd jxnet-native && export JAVA_HOME=$(pwd) && ./bootstrap.sh && ./configure && make && sudo make install && cd ..; fi
- if [ "$TRAVIS_OS_NAME" != "windows" ]; then cd jxnet-native && mkdir build && cd build && cmake .. && make && sudo make install && cd ../..; fi
- if [ "$TRAVIS_OS_NAME" != "windows" ]; then cd jxnet-native/libpcap && sudo make install && cd ../..; fi
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then ./gradlew -p jxnet-native build; fi
- echo "Done."
script:
- echo "Verifying..."
- if [ "$TRAVIS_OS_NAME" != "windows" ]; then ls -lat jxnet-native/libpcap/libpcap* ; fi
- if [ "$TRAVIS_OS_NAME" != "windows" ]; then ls -lat jxnet-native/src/.libs/libjxnet* ; fi
- if [ "$TRAVIS_OS_NAME" != "windows" ]; then ls -lat jxnet-native/build/libjxnet* ; fi
- echo "Done."
after_success:
- echo "Cleaning..."
- if [ "$TRAVIS_OS_NAME" != "windows" ]; then cd jxnet-native/libpcap && make clean && make uninstall && cd ../..; fi
- if [ "$TRAVIS_OS_NAME" != "windows" ]; then cd jxnet-native && make clean && make uninstall && cd ..; fi
- if [ "$TRAVIS_OS_NAME" != "windows" ]; then cd jxnet-native/build/ && make clean && make uninstall && cd ../..; fi
- echo "Done."