-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy path.travis.yml
72 lines (67 loc) · 2.84 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
---
dist: focal
env:
global:
- JRUBY_HOME=/opt/jruby
- JRUBY_VERSION=9.2.19.0
- LAUNCHER_PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- WORKDIR=/usr/local/src/jruby-launcher
language: ruby
services:
- docker
jobs:
- include:
- env:
- DOCKER_IMAGE=debian:9
- JDK_PKG=openjdk-8-jdk
- PKG_MGR=apt-get
- env:
- DOCKER_IMAGE=debian:10
- JDK_PKG=openjdk-11-jdk
- PKG_MGR=apt-get
- env:
- DOCKER_IMAGE=ubuntu:16.04
- JDK_PKG=openjdk-8-jdk
- PKG_MGR=apt-get
- env:
- DOCKER_IMAGE=ubuntu:20.04
- JDK_PKG=openjdk-11-jdk
- PKG_MGR=apt-get
- env:
- DOCKER_IMAGE=centos:7
- JDK_PKG=java-11-openjdk
- PKG_MGR=yum
- env:
- DOCKER_IMAGE=centos:8
- JDK_PKG=java-11-openjdk
- PKG_MGR=yum
- env:
- DOCKER_IMAGE=oraclelinux:7
- JDK_PKG=java-11-openjdk
- PKG_MGR=yum
- env:
- DOCKER_IMAGE=oraclelinux:8
- JDK_PKG=java-11-openjdk
- PKG_MGR=yum
before_install:
- docker pull ${DOCKER_IMAGE}
- docker run --detach --interactive --tty --name launcher --volume ${PWD}:${WORKDIR} ${DOCKER_IMAGE}
- if [ "${PKG_MGR}" == "apt-get" ]; then docker exec launcher apt-get update; fi
- if [ "${PKG_MGR}" == "apt-get" ]; then docker exec --env DEBIAN_FRONTEND=noninteractive launcher apt-get -yqq install build-essential curl ${JDK_PKG}; fi
- if [ "${PKG_MGR}" == "yum" ]; then docker exec launcher yum -yq groups install "Development Tools"; fi
- if [ "${PKG_MGR}" == "yum" ]; then docker exec launcher yum -yq install ${JDK_PKG}; fi
install:
- docker exec launcher bash -c "curl https://s3.amazonaws.com/jruby.org/downloads/${JRUBY_VERSION}/jruby-bin-${JRUBY_VERSION}.tar.gz | tar -zxC /opt"
- docker exec launcher ln -s jruby-${JRUBY_VERSION} ${JRUBY_HOME}
- docker exec --env PATH=${LAUNCHER_PATH}:${JRUBY_HOME}/bin --env JRUBY_HOME=${JRUBY_HOME} launcher jruby -S gem install bundler
- docker exec --env PATH=${LAUNCHER_PATH}:${JRUBY_HOME}/bin --env JRUBY_HOME=${JRUBY_HOME} --workdir ${WORKDIR} launcher bundle install
before_script:
- docker exec --env PATH=${LAUNCHER_PATH}:${JRUBY_HOME}/bin --env JRUBY_HOME=${JRUBY_HOME} --workdir ${WORKDIR} launcher make
script:
- docker exec --env PATH=${LAUNCHER_PATH}:${JRUBY_HOME}/bin --env JRUBY_HOME=${JRUBY_HOME} --workdir ${WORKDIR} launcher make test
- docker exec --env PATH=${LAUNCHER_PATH}:${JRUBY_HOME}/bin --env JRUBY_HOME=${JRUBY_HOME} --workdir ${WORKDIR} launcher bundle exec rake package
- docker exec --env PATH=${LAUNCHER_PATH}:${JRUBY_HOME}/bin --env JRUBY_HOME=${JRUBY_HOME} --workdir ${WORKDIR} launcher gem install pkg/jruby-launcher-*-java.gem
after_script:
- docker exec --env PATH=${LAUNCHER_PATH}:${JRUBY_HOME}/bin --env JRUBY_HOME=${JRUBY_HOME} launcher jruby -Xversion
- docker stop launcher
- docker rm launcher