except:
- tags
-.test_template: &deb_test_definition
+.test_template: &test_definition
stage: test
script:
- - cat /etc/os-release
- - GV_VERSION=$( cat VERSION )
- - COLLECTION=$( cat COLLECTION )
- - zcat graphviz-${GV_VERSION}.tar.gz | tar xf -
- - . /etc/os-release
- - DIR=Packages/${COLLECTION}/${ID}/${VERSION_ID}
- - ARCH=$( uname -m )
- - apt install ./${DIR}/os/${ARCH}/libgraphviz4_${GV_VERSION}-1_amd64.deb
- - apt install ./${DIR}/os/${ARCH}/graphviz_${GV_VERSION}-1_amd64.deb
- - cd graphviz-${GV_VERSION}
- - ./configure
- - make -C tests/regression_tests/shapes check
+ - ci/test.sh
centos6-build:
<<: *rpm_build_definition
image: "graphviz/graphviz:ubuntu-19.10"
ubuntu18-04-test:
- <<: *deb_test_definition
+ <<: *test_definition
tags:
- linux
image: "graphviz/graphviz:ubuntu-18.04"
ubuntu19-04-test:
- <<: *deb_test_definition
+ <<: *test_definition
tags:
- linux
image: "graphviz/graphviz:ubuntu-19.04"
ubuntu19-10-test:
- <<: *deb_test_definition
+ <<: *test_definition
tags:
- linux
image: "graphviz/graphviz:ubuntu-19.10"
--- /dev/null
+#!/bin/sh -e
+
+set -x
+
+if test -f /etc/os-release; then
+ cat /etc/os-release
+ . /etc/os-release
+else
+ cat /etc/redhat-release
+ ID=$( cat /etc/redhat-release | cut -d' ' -f1 | tr 'A-Z' 'a-z' )
+ VERSION_ID=$( cat /etc/redhat-release | cut -d' ' -f3 | cut -d'.' -f1 )
+fi
+GV_VERSION=$( cat VERSION )
+COLLECTION=$( cat COLLECTION )
+tar xfz graphviz-${GV_VERSION}.tar.gz
+DIR=Packages/${COLLECTION}/${ID}/${VERSION_ID}
+ARCH=$( uname -m )
+if [ "${ID_LIKE}" = "debian" ]; then
+ apt install ./${DIR}/os/${ARCH}/libgraphviz4_${GV_VERSION}-1_amd64.deb
+ apt install ./${DIR}/os/${ARCH}/graphviz_${GV_VERSION}-1_amd64.deb
+else
+ rpm --install --force ${DIR}/os/${ARCH}/*.rpm
+fi
+cd graphviz-${GV_VERSION}
+./configure
+ln -s /usr/bin/dot cmd/dot/dot_builtins
+ln -s /usr/bin/diffimg contrib/diffimg/diffimg
+make -C tests/regression_tests/shapes check