-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
106 lines (104 loc) · 5.28 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Copyright © 2010-2019 OddSource Code ([email protected])
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Here's some documentation about Maven and GitHub publication:
#
# $ gpg --full-generate-key
# $ gpg --list-keys
# $ gpg --export-secret-keys [key ID] > travis.gpg
# $ gpg --keyserver pgp.mit.edu --send-key [key ID]
# $ tar -cvf .travis.secrets.tar settings.xml travis.gpg
# $ travis login --org
# $ travis encrypt-file .travis.secrets.tar
# $ rm .travis.secrets.tar settings.xml travis.gpg
# $ travis setup releases
language: java
sudo: false
cache:
directories:
- "$HOME/.cache"
env:
global:
- secure: "1TjSIbRLVrPED0QR0FUAnN1sSxFjZds1bgnbxLW5KZJRPS8o4r30w7MBX6q56Y0uRQSm8VxkJQXLbrpWAiOcs8SvAOEgNqUEVv2ErMYqEaZa3WunzwNiuKbSam1TnMX192/Wkct+KFDBG7Uwkuk4NQmonky1Bpz4tKmKBtBO1n7MlzU2lEp8DyNzQlnPkSzvHGB258zygCe6Y15cIhgmh/snXCuY0D7+bTsOm0e3rulJGluj5Us77prE4yoOMuO43lD05Lcbk0ZRVjD3ZoNo6SAof6kf+ZnWbo/r0sZ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ION="us-east-1"
- ODDSOURCE_S3_BUCKET="builds.travis-ci.oddsource.io/java-raw-sockets"
jobs:
include:
- stage: build
os: linux
dist: xenial
jdk: openjdk8
script:
- sudo apt-get update
- sudo apt-get install -y gcc g++
- mvn test -B -V -e -Dcompile.native=true
- cp -v source/production/resources/io/oddsource/java/net/socket/libOddSourceRawSockets.so ~/$TRAVIS_BUILD_NUMBER/
- aws s3 sync ~/$TRAVIS_BUILD_NUMBER s3://$ODDSOURCE_S3_BUCKET/$TRAVIS_BUILD_NUMBER
- stage: build
os: linux
dist: xenial
jdk: openjdk11
script:
- sudo apt-get update
- sudo apt-get install -y gcc g++
- mvn test -B -V -e -Dcompile.native=true
- stage: build
os: osx
osx_image: xcode9.3
#jdk: openjdk8 (Java 8 is the default for xcode9.3, but it uses Oracle JDK, and that cannot be changed)
script:
- mvn test -B -V -e -Dcompile.native=true
- cp -v source/production/resources/io/oddsource/java/net/socket/libOddSourceRawSockets.dylib ~/$TRAVIS_BUILD_NUMBER/
- aws s3 sync ~/$TRAVIS_BUILD_NUMBER s3://$ODDSOURCE_S3_BUCKET/$TRAVIS_BUILD_NUMBER
- stage: build
os: osx
osx_image: xcode10.1
#jdk: oraclejdk11 (Java 11 is the default for xcode10.1, but it uses Oracle JDK, and that cannot be changed)
script:
- mvn test -B -V -e -Dcompile.native=true
# - stage: build
# os: windows
# language: shell
# before_install:
# - echo $PATH
# - choco --help
# - choco install jdk8
# - choco install maven
# - choco install python2
# script:
# - mvn --version
- stage: "Test Reconstitution"
os: linux
dist: xenial
jdk: openjdk8
script:
- cp -v ~/$TRAVIS_BUILD_NUMBER/libOddSourceRawSockets.dylib source/production/resources/io/oddsource/java/net/socket/
- cp -v ~/$TRAVIS_BUILD_NUMBER/libOddSourceRawSockets.so source/production/resources/io/oddsource/java/net/socket/
- mvn install -B -V -e -Dcompile.native=false
# For troubleshooting, uncomment the following two lines and comment out the after_success step.
# - cp -v target/raw-sockets-*.jar ~/$TRAVIS_BUILD_NUMBER/
# - aws s3 sync ~/$TRAVIS_BUILD_NUMBER s3://$ODDSOURCE_S3_BUCKET/$TRAVIS_BUILD_NUMBER
# We might need this at some point; don't know: aws s3 rm --recursive s3://$ODDSOURCE_S3_BUCKET/$TRAVIS_BUILD_NUMBER
stages:
- build
- "Test Reconstitution"
# - name: deploy
# if: tag =~ ^[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$
install:
- pip install --user awscli
- export PATH="$PATH:$HOME/Library/Python/2.7/bin"
- mkdir -p ~/$TRAVIS_BUILD_NUMBER
- aws s3 sync s3://$ODDSOURCE_S3_BUCKET/$TRAVIS_BUILD_NUMBER ~/$TRAVIS_BUILD_NUMBER
script:
- mvn --version