Skip to content

Commit

Permalink
Fix Travis-CI tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
aabc committed May 15, 2019
1 parent 52e9ca4 commit 8e375f2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 34 deletions.
36 changes: 16 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,38 +21,34 @@ matrix:
os: linux
- name: ppc64le Ubuntu 16.04.4 LTS Xenial
os: linux-ppc64le
- name: x86_64 CentOS 7.1810
OS_NAME: centos
OS_VERSION: 7.1810
- name: x86_64 CentOS 7.1708
OS_NAME: centos
OS_VERSION: 7.1708
- name: x86_64 CentOS 7.1611
OS_NAME: centos
OS_VERSION: 7.1611
- name: x86_64 CentOS 7.6.1810
env: OS_NAME=centos OS_VERSION=7.6.1810
- name: x86_64 CentOS 7.4.1708
env: OS_NAME=centos OS_VERSION=7.4.1708
- name: x86_64 CentOS 7.3.1611
env: OS_NAME=centos OS_VERSION=7.3.1611
- name: x86_64 CentOS 6.10
OS_NAME: centos
OS_VERSION: 6.10
env: OS_NAME=centos OS_VERSION=6.10
- name: x86_64 CentOS 6.9
OS_NAME: centos
OS_VERSION: 6.9
env: OS_NAME=centos OS_VERSION=6.9
- name: x86_64 CentOS 6.8
OS_NAME: centos
OS_VERSION: 6.8
env: OS_NAME=centos OS_VERSION=6.8


install:
- if [ -z "$OS_NAME" ]; then
sudo m-a prepare;
( set -x; sudo m-a prepare );
else
sudo docker pull ${OS_NAME}:${OS_VERSION};
sudo docker build --no-cache --rm --file=travis/Dockerfile.${OS_NAME}-${OS_VERSION} --tag=${OS_NAME}-${OS_VERSION}:test .;
( set -x;
sudo docker pull ${OS_NAME}:${OS_VERSION};
sudo docker build --no-cache --rm --file=travis/Dockerfile.${OS_NAME} --build-arg=OS_VERSION=${OS_VERSION} --tag=${OS_NAME}-${OS_VERSION}:test .;
);
fi

script:
- if [ -z "$OS_NAME" ]; then
./configure && make all && sudo make install;
( set -x; ./configure && make all && sudo make install );
else
sudo docker run -v $PWD:$PWD -w $PWD ${OS_NAME}-${OS_VERSION}:test;
( set -x; sudo docker run -v $PWD:$PWD -w $PWD ${OS_NAME}-${OS_VERSION}:test );
fi

6 changes: 5 additions & 1 deletion travis/Dockerfile.centos-6 → travis/Dockerfile.centos
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
FROM centos:6
# https://hub.docker.com/_/centos/

ARG OS_VERSION

FROM centos:$OS_VERSION

RUN yum -y install \
gcc \
Expand Down
13 changes: 0 additions & 13 deletions travis/Dockerfile.centos-7

This file was deleted.

0 comments on commit 8e375f2

Please sign in to comment.