-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
36 lines (35 loc) · 2.31 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
language: c
sudo: required
services:
- docker
env:
- OS_TYPE=centos:7
- OS_TYPE=opensuse:13.2
before_install:
- docker pull ${OS_TYPE}
- docker run -it -d -h testdev.pbspro.com --name testdev -v `pwd`:`pwd` --privileged -w `pwd` ${OS_TYPE} /bin/bash
- docker ps -a
- export DOCKER_EXEC="docker exec -it testdev"
install:
- '[ "${OS_TYPE}" == "centos:7" ] && travis_retry ${DOCKER_EXEC} yum -y update || true'
- '[ "${OS_TYPE}" == "centos:7" ] && travis_retry ${DOCKER_EXEC} yum -y install yum-utils epel-release rpmdevtools || true'
- '[ "${OS_TYPE}" == "opensuse:13.2" ] && travis_retry ${DOCKER_EXEC} zypper -n ar -f -G http://download.opensuse.org/repositories/devel:/tools/openSUSE_13.2/devel:tools.repo || true'
- '[ "${OS_TYPE}" == "opensuse:13.2" ] && travis_retry ${DOCKER_EXEC} zypper -n ref || true'
- '[ "${OS_TYPE}" == "opensuse:13.2" ] && travis_retry ${DOCKER_EXEC} zypper -n install rpmdevtools || true'
- ${DOCKER_EXEC} rpmdev-setuptree
- '[ "${OS_TYPE}" == "centos:7" ] && travis_retry ${DOCKER_EXEC} yum-builddep -y ./pbspro.spec || true'
- '[ "${OS_TYPE}" == "opensuse:13.2" ] && travis_retry ${DOCKER_EXEC} /bin/bash -c "zypper -n install \$(rpmspec --buildrequires -q pbspro.spec)" || true'
- ${DOCKER_EXEC} ./autogen.sh
- ${DOCKER_EXEC} ./configure
- ${DOCKER_EXEC} make dist
- ${DOCKER_EXEC} /bin/bash -c "cp pbspro-*.tar.gz /root/rpmbuild/SOURCES/"
- ${DOCKER_EXEC} rpmbuild -bb pbspro.spec
- '[ "${OS_TYPE}" == "centos:7" ] && travis_retry ${DOCKER_EXEC} /bin/bash -c "yum -y install /root/rpmbuild/RPMS/x86_64/pbspro-server-*.x86_64.rpm" || true'
- '[ "${OS_TYPE}" == "opensuse:13.2" ] && travis_retry ${DOCKER_EXEC} /bin/bash -c "zypper -n install /root/rpmbuild/RPMS/x86_64/pbspro-server-*.x86_64.rpm" || true'
- ${DOCKER_EXEC} /etc/init.d/pbs start
- '[ "${OS_TYPE}" == "centos:7" ] && travis_retry ${DOCKER_EXEC} yum -y install python-pip sudo which net-tools || true'
- '[ "${OS_TYPE}" == "opensuse:13.2" ] && travis_retry ${DOCKER_EXEC} zypper -n install python-pip sudo which net-tools || true'
- ${DOCKER_EXEC} /bin/bash -c "cd test/fw; pip install -r requirements.txt ."
- ${DOCKER_EXEC} pbs_config --make-ug
- ${DOCKER_EXEC} /bin/bash -c "cd test/tests; pbs_benchpress -l INFOCLI2 -o ../../ptl.txt"
script: true