diff options
author | 1138-4EB <1138-4EB@users.noreply.github.com> | 2018-05-27 06:46:52 +0200 |
---|---|---|
committer | 1138-4EB <1138-4EB@users.noreply.github.com> | 2018-05-27 08:42:08 +0200 |
commit | feeb46d236b532eaf6e4b4f48925467a3573a207 (patch) | |
tree | 65f0506d3f7fa856ddf92434956d450ca65ca421 /dist/linux | |
parent | b350596efe2ff4da88b25de862d5ed4931386a46 (diff) | |
download | ghdl-feeb46d236b532eaf6e4b4f48925467a3573a207.tar.gz ghdl-feeb46d236b532eaf6e4b4f48925467a3573a207.tar.bz2 ghdl-feeb46d236b532eaf6e4b4f48925467a3573a207.zip |
move docker-related resources to ghdl/docker
Diffstat (limited to 'dist/linux')
-rwxr-xr-x | dist/linux/build.sh | 144 | ||||
-rw-r--r-- | dist/linux/create.sh | 24 | ||||
-rwxr-xr-x | dist/linux/deploy2dockerhub.sh | 32 | ||||
-rw-r--r-- | dist/linux/docker/build/buster | 11 | ||||
-rw-r--r-- | dist/linux/docker/build/fedora26 | 12 | ||||
-rw-r--r-- | dist/linux/docker/build/stretch | 11 | ||||
-rw-r--r-- | dist/linux/docker/build/ubuntu14 | 16 | ||||
-rw-r--r-- | dist/linux/docker/build/ubuntu16 | 16 | ||||
-rw-r--r-- | dist/linux/docker/build/ubuntu18 | 16 | ||||
-rw-r--r-- | dist/linux/docker/run/buster | 10 | ||||
-rw-r--r-- | dist/linux/docker/run/fedora26 | 12 | ||||
-rw-r--r-- | dist/linux/docker/run/stretch | 10 | ||||
-rw-r--r-- | dist/linux/docker/run/ubuntu14 | 16 | ||||
-rw-r--r-- | dist/linux/docker/run/ubuntu16 | 16 | ||||
-rw-r--r-- | dist/linux/docker/run/ubuntu18 | 16 | ||||
-rwxr-xr-x | dist/linux/test.sh | 114 | ||||
-rwxr-xr-x | dist/linux/travis-ci.sh | 132 | ||||
-rwxr-xr-x | dist/linux/travis-enc-dockerhub.sh | 13 | ||||
-rw-r--r-- | dist/linux/travis-utils.sh | 23 |
19 files changed, 0 insertions, 644 deletions
diff --git a/dist/linux/build.sh b/dist/linux/build.sh deleted file mode 100755 index 2f0e6c705..000000000 --- a/dist/linux/build.sh +++ /dev/null @@ -1,144 +0,0 @@ -#! /bin/bash - -. dist/linux/travis-utils.sh -. dist/ansi_color.sh -disable_color - -echo "$0" "$@" - -# Stop in case of error -set -e - -# Transform long options to short ones -for arg in "$@"; do - shift - case "$arg" in - "--color"|"-color") set -- "$@" "-c";; - "--build"|"-build") set -- "$@" "-b";; - "--pkg"|"-pkg") set -- "$@" "-p";; - "--gpl"|"-gpl") set -- "$@" "-g";; - *) set -- "$@" "$arg" - esac -done -# Parse args -while getopts ":b:p:cg" opt; do - case $opt in - c) enable_color;; - b) BLD=$OPTARG ;; - p) PKG_NAME=$OPTARG;; - g) ISGPL=true;; - \?) printf "$ANSI_RED[GHDL - build] Invalid option: -$OPTARG $ANSI_NOCOLOR\n" >&2 - exit 1 ;; - :) printf "$ANSI_RED[GHDL - build] Option -$OPTARG requires an argument. $ANSI_NOCOLOR\n" >&2 - exit 1 ;; - esac -done - -rm -f build_ok - -#--- Env - -echo "travis_fold:start:env.docker" -printf "$ANSI_YELLOW[Info] Environment $ANSI_NOCOLOR\n" -env -echo "travis_fold:end:env.docker" - -#--- GPL: gpl-ize sources - -if [ "$ISGPL" = "true" ]; then - echo "travis_fold:start:gpl.src" - printf "$ANSI_YELLOW[Source] create GPL sources $ANSI_NOCOLOR\n" - files=`echo *` - make -f Makefile.in srcdir=. clean-pure-gpl - mkdir ${PKG_NAME} - cp -pdrl $files ${PKG_NAME} - tar -zcf "${PKG_NAME}.tar.gz" ${PKG_NAME} - PKG_NAME="${PKG_NAME}-${BLD}" - echo "travis_fold:end:gpl.src" -fi - -#--- Configure - -echo "travis_fold:start:configure" -printf "$ANSI_YELLOW[GHDL - build] Configure $ANSI_NOCOLOR\n" - -CDIR=$(pwd) -export prefix="$CDIR/install-$BLD" -mkdir "$prefix" -mkdir "build-$BLD" -cd "build-$BLD" - -case "$BLD" in - mcode) - config_opts="" - CXX="" - ;; - llvm) - CXX="clang" - config_opts="--with-llvm-config CXX=$CXX" - ;; - llvm-3.5) - CXX="clang++" - config_opts="--with-llvm-config=llvm-config-3.5 CXX=$CXX" - ;; - llvm-3.8) - CXX="clang++-3.8" - config_opts="--with-llvm-config=llvm-config-3.8 CXX=$CXX" - ;; - llvm-3.9) - CXX="clang++-3.9" - config_opts="--with-llvm-config=llvm-config-3.9 CXX=$CXX" - ;; - llvm-4.0) - CXX="clang++-4.0" - config_opts="--with-llvm-config=llvm-config-4.0 CXX=$CXX" - ;; - llvm-5.0) - CXX="clang++-5.0" - config_opts="--with-llvm-config=llvm-config-5.0 CXX=$CXX" - ;; - *) - echo "$ANSI_RED[GHDL - build] Unknown build $BLD $ANSI_NOCOLOR" - exit 1;; -esac -echo "../configure --prefix=$prefix $config_opts" -../configure "--prefix=$prefix" $config_opts -echo "travis_fold:end:configure" - -#--- make - -echo "travis_fold:start:make" -travis_time_start -printf "$ANSI_YELLOW[GHDL - build] Make $ANSI_NOCOLOR\n" -make -travis_time_finish -echo "travis_fold:end:make" - -echo "travis_fold:start:install" -printf "$ANSI_YELLOW[GHDL - build] Install $ANSI_NOCOLOR\n" -make install -cd .. -echo "travis_fold:end:install" - -#--- package - -echo "travis_fold:start:tar.bin" -printf "$ANSI_YELLOW[GHDL - build] Create package ${ANSI_DARKCYAN}${PKG_NAME}.tgz $ANSI_NOCOLOR\n" -tar -zcvf "${PKG_NAME}.tgz" -C "$prefix" . -echo "travis_fold:end:tar.bin" - -#--- build tools versions - -{ - make --version | grep 'Make' - gnatls --version | grep 'GNATLS' - gcc --version | grep 'gcc' - if [ "$CXX" != "" ]; then - $CXX --version | grep 'clang' - fi -} > BUILD_TOOLS - -#--- - -echo "[SUCCESSFUL]" -touch build_ok diff --git a/dist/linux/create.sh b/dist/linux/create.sh deleted file mode 100644 index aed834fa0..000000000 --- a/dist/linux/create.sh +++ /dev/null @@ -1,24 +0,0 @@ -#! /bin/sh -# This script is executed in the travis-ci environment. - -set -e - -. dist/linux/travis-utils.sh -. dist/ansi_color.sh -#disable_color - -scriptdir=$(dirname $0) - -for d in build run; do - currentdir="${scriptdir}/docker/$d" - for f in `ls $currentdir`; do - for tag in `grep -oP "FROM.*AS \K.*" ${currentdir}/$f`; do - echo "travis_fold:start:${f}-$tag" - travis_time_start - printf "$ANSI_BLUE[DOCKER build] ${d} : ${f} - ${tag}$ANSI_NOCOLOR\n" - docker build -t ghdl/${d}:${f}-${tag} --target $tag - < ${currentdir}/$f - travis_time_finish - echo "travis_fold:end:${f}-$tag" - done - done -done diff --git a/dist/linux/deploy2dockerhub.sh b/dist/linux/deploy2dockerhub.sh deleted file mode 100755 index 63b9fc8d9..000000000 --- a/dist/linux/deploy2dockerhub.sh +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/sh - -set -e - -. dist/linux/travis-utils.sh -. dist/ansi_color.sh -#disable_color - -# Skip deploy if we are in stage 0 (i.e. IMAGE="") and there is no '[ci images]' in the commit message -if [ "$1" = "skip" ] || [ "${1}$(echo $2 | grep -o '\[ci images\]')" = "" ]; then - printf "${ANSI_GREEN}SKIP DEPLOY2DOCKERHUB$ANSI_NOCOLOR\n"; - exit 0; -fi - -case $1 in - "") FILTER="/";; - *) FILTER="/ghdl /pkg";; -esac - -docker login -u="$DOCKER_USER" -p="$DOCKER_PASS" -for key in $FILTER; do - for tag in `echo $(docker images ghdl$key* | awk -F ' ' '{print $1 ":" $2}') | cut -d ' ' -f2-`; do - if [ "$tag" = "REPOSITORY:TAG" ]; then break; fi - echo "travis_fold:start:`echo $tag | grep -oP 'ghdl/\K.*'`" - travis_time_start - printf "$ANSI_YELLOW[DOCKER push] ${tag}$ANSI_NOCOLOR\n" - docker push $tag - travis_time_finish - echo "travis_fold:end:`echo $tag | grep -oP 'ghdl/\K.*'`" - done -done -docker logout diff --git a/dist/linux/docker/build/buster b/dist/linux/docker/build/buster deleted file mode 100644 index 776b51485..000000000 --- a/dist/linux/docker/build/buster +++ /dev/null @@ -1,11 +0,0 @@ -# [build] Debian 10 - -FROM debian:buster-slim AS mcode - -RUN apt-get update -qq \ - && apt-get -y install --no-install-recommends \ - gnat gcc make zlib1g-dev \ - && apt-get autoclean && apt-get clean && apt-get autoremove - - -FROM mcode AS mcode-gpl diff --git a/dist/linux/docker/build/fedora26 b/dist/linux/docker/build/fedora26 deleted file mode 100644 index dfbf99a6c..000000000 --- a/dist/linux/docker/build/fedora26 +++ /dev/null @@ -1,12 +0,0 @@ -# [build] Fedora 26 - -FROM fedora:26 AS mcode - -RUN dnf --nodocs -y install gcc-gnat zlib-devel make \ - && dnf clean all --enablerepo=\* - - -FROM mcode AS llvm - -RUN dnf --nodocs -y install llvm-devel gcc-c++ clang \ - && dnf clean all --enablerepo=\* diff --git a/dist/linux/docker/build/stretch b/dist/linux/docker/build/stretch deleted file mode 100644 index 9803a5619..000000000 --- a/dist/linux/docker/build/stretch +++ /dev/null @@ -1,11 +0,0 @@ -# [build] Debian 9 - -FROM debian:stretch-slim AS mcode - -RUN apt-get update -qq \ - && apt-get -y install --no-install-recommends \ - gnat gcc make zlib1g-dev \ - && apt-get autoclean && apt-get clean && apt-get autoremove - - -FROM mcode AS mcode-gpl diff --git a/dist/linux/docker/build/ubuntu14 b/dist/linux/docker/build/ubuntu14 deleted file mode 100644 index 924fd7297..000000000 --- a/dist/linux/docker/build/ubuntu14 +++ /dev/null @@ -1,16 +0,0 @@ -# [build] Ubuntu 14 - -FROM ubuntu:trusty AS mcode - -RUN apt-get update -qq \ - && apt-get -y install --no-install-recommends \ - gnat gcc make zlib1g-dev \ - && apt-get autoclean && apt-get clean && apt-get autoremove - - -FROM mcode AS llvm-3.8 - -RUN apt-get update -qq \ - && apt-get -y install --no-install-recommends \ - llvm-3.8-dev clang-3.8 \ - && apt-get autoclean && apt-get clean && apt-get autoremove diff --git a/dist/linux/docker/build/ubuntu16 b/dist/linux/docker/build/ubuntu16 deleted file mode 100644 index 308377e19..000000000 --- a/dist/linux/docker/build/ubuntu16 +++ /dev/null @@ -1,16 +0,0 @@ -# [build] Ubuntu 16 - -FROM ubuntu:xenial AS mcode - -RUN apt-get update -qq \ - && apt-get -y install --no-install-recommends \ - gnat gcc make zlib1g-dev \ - && apt-get autoclean && apt-get clean && apt-get autoremove - - -FROM mcode AS llvm-3.9 - -RUN apt-get update -qq \ - && apt-get -y install --no-install-recommends \ - llvm-3.9-dev clang-3.9 \ - && apt-get autoclean && apt-get clean && apt-get autoremove diff --git a/dist/linux/docker/build/ubuntu18 b/dist/linux/docker/build/ubuntu18 deleted file mode 100644 index ac514a554..000000000 --- a/dist/linux/docker/build/ubuntu18 +++ /dev/null @@ -1,16 +0,0 @@ -# [build] Ubuntu 18 - -FROM ubuntu:bionic AS mcode - -RUN apt-get update -qq \ - && apt-get -y install --no-install-recommends \ - gnat gcc make zlib1g-dev \ - && apt-get autoclean && apt-get clean && apt-get autoremove - - -FROM mcode AS llvm-5.0 - -RUN apt-get update -qq \ - && apt-get -y install --no-install-recommends \ - llvm-5.0-dev clang-5.0 \ - && apt-get autoclean && apt-get clean && apt-get autoremove diff --git a/dist/linux/docker/run/buster b/dist/linux/docker/run/buster deleted file mode 100644 index ff5bbf3da..000000000 --- a/dist/linux/docker/run/buster +++ /dev/null @@ -1,10 +0,0 @@ -# [run] Debian 10 - -FROM debian:buster-slim AS mcode - -RUN apt-get update -qq \ - && apt-get -y install libgnat-7 gcc libc6-dev \ - && apt-get autoclean && apt-get clean && apt-get autoremove - - -FROM mcode AS mcode-gpl diff --git a/dist/linux/docker/run/fedora26 b/dist/linux/docker/run/fedora26 deleted file mode 100644 index ff0e17bc2..000000000 --- a/dist/linux/docker/run/fedora26 +++ /dev/null @@ -1,12 +0,0 @@ -# [run] Fedora 26 - -FROM fedora:26 AS mcode - -RUN dnf --nodocs -y install libgnat gcc \ - && dnf clean all --enablerepo=\* - - -FROM mcode AS llvm - -RUN dnf --nodocs -y install llvm-libs zlib-devel \ - && dnf clean all --enablerepo=\* diff --git a/dist/linux/docker/run/stretch b/dist/linux/docker/run/stretch deleted file mode 100644 index 1d42722eb..000000000 --- a/dist/linux/docker/run/stretch +++ /dev/null @@ -1,10 +0,0 @@ -# [run] Debian 9 - -FROM debian:stretch-slim AS mcode - -RUN apt-get update -qq \ - && apt-get -y install libgnat-6 gcc libc6-dev \ - && apt-get autoclean && apt-get clean && apt-get autoremove - - -FROM mcode AS mcode-gpl diff --git a/dist/linux/docker/run/ubuntu14 b/dist/linux/docker/run/ubuntu14 deleted file mode 100644 index 6c72d9c19..000000000 --- a/dist/linux/docker/run/ubuntu14 +++ /dev/null @@ -1,16 +0,0 @@ -# [run] Ubuntu 14 - -FROM ubuntu:trusty AS mcode - -RUN apt-get update -qq \ - && apt-get -y install --no-install-recommends \ - libgnat-4.6 gcc libc6-dev \ - && apt-get autoclean && apt-get clean && apt-get autoremove - - -FROM mcode AS llvm-3.8 - -RUN apt-get update -qq \ - && apt-get -y install --no-install-recommends \ - libllvm-3.8 zlib1g-dev \ - && apt-get autoclean && apt-get clean && apt-get autoremove diff --git a/dist/linux/docker/run/ubuntu16 b/dist/linux/docker/run/ubuntu16 deleted file mode 100644 index 2bccad554..000000000 --- a/dist/linux/docker/run/ubuntu16 +++ /dev/null @@ -1,16 +0,0 @@ -# [run] Ubuntu 16 - -FROM ubuntu:xenial AS mcode - -RUN apt-get update -qq \ - && apt-get -y install --no-install-recommends \ - libgnat-4.9 gcc libc6-dev \ - && apt-get autoclean && apt-get clean && apt-get autoremove - - -FROM mcode AS llvm-3.9 - -RUN apt-get update -qq \ - && apt-get -y install --no-install-recommends \ - libllvm-3.9 zlib1g-dev \ - && apt-get autoclean && apt-get clean && apt-get autoremove diff --git a/dist/linux/docker/run/ubuntu18 b/dist/linux/docker/run/ubuntu18 deleted file mode 100644 index 1b2f956ac..000000000 --- a/dist/linux/docker/run/ubuntu18 +++ /dev/null @@ -1,16 +0,0 @@ -# [run] Ubuntu 18 - -FROM ubuntu:bionic AS mcode - -RUN apt-get update -qq \ - && apt-get -y install --no-install-recommends \ - libgnat-7 gcc libc6-dev \ - && apt-get autoclean && apt-get clean && apt-get autoremove - - -FROM mcode AS llvm-5.0 - -RUN apt-get update -qq \ - && apt-get -y install --no-install-recommends \ - libllvm5.0 zlib1g-dev \ - && apt-get autoclean && apt-get clean && apt-get autoremove diff --git a/dist/linux/test.sh b/dist/linux/test.sh deleted file mode 100755 index e95bccbb6..000000000 --- a/dist/linux/test.sh +++ /dev/null @@ -1,114 +0,0 @@ -#! /bin/bash - -. dist/linux/travis-utils.sh -. dist/ansi_color.sh -disable_color - -echo "$0" "$@" - -# Stop in case of error -set -e - -# Transform long options to short ones -for arg in "$@"; do - shift - case "$arg" in - "--color"|"-color") set -- "$@" "-c";; - "--gpl"|"-gpl") set -- "$@" "-g";; - *) set -- "$@" "$arg" - esac -done -# Parse args -while getopts ":b:p:cg" opt; do - case $opt in - c) enable_color;; - g) ISGPL=true;; - \?) printf "$ANSI_RED[GHDL - test] Invalid option: -$OPTARG $ANSI_NOCOLOR\n" >&2 - exit 1 ;; - :) printf "$ANSI_RED[GHDL - test] Option -$OPTARG requires an argument. $ANSI_NOCOLOR\n" >&2 - exit 1 ;; - esac -done - -rm -f test_ok - -export ENABLECOLOR -if [ "$GHDL" = "" ]; then - export GHDL="$prefix/bin/ghdl" -fi -cd testsuite -failures="" - -echo "travis_fold:start:tests.sanity" -travis_time_start -printf "$ANSI_YELLOW[GHDL - test] sanity $ANSI_NOCOLOR\n" -cd sanity -for d in [0-9]*; do - cd $d - if ./testsuite.sh > test.log 2>&1 ; then - echo "sanity $d: ok" - # Don't disp log - else - echo "${ANSI_RED}sanity $d: failed${ANSI_NOCOLOR}" - cat test.log - failures="$failures $d" - fi - cd .. - # Stop at the first failure - [ "$failures" = "" ] || break -done -cd .. -travis_time_finish -echo "travis_fold:end:tests.sanity" -[ "$failures" = "" ] || exit 1 - -if [ "$ISGPL" != "true" ]; then - echo "travis_fold:start:tests.gna" - travis_time_start - printf "$ANSI_YELLOW[GHDL - test] gna $ANSI_NOCOLOR\n" - cd gna - dirs=`./testsuite.sh --list-tests` - for d in $dirs; do - cd $d - if ./testsuite.sh > test.log 2>&1 ; then - echo "gna $d: ok" - # Don't disp log - else - echo "${ANSI_RED}gna $d: failed${ANSI_NOCOLOR}" - cat test.log - failures="$failures $d" - fi - cd .. - # Stop at the first failure - [ "$failures" = "" ] || break - done - cd .. - travis_time_finish - echo "travis_fold:end:tests.gna" - [ "$failures" = "" ] || exit 1 -fi - -echo "travis_fold:start:tests.vests" -travis_time_start -printf "$ANSI_YELLOW[GHDL - test] vests $ANSI_NOCOLOR\n" -cd vests -if ./testsuite.sh > vests.log 2>&1 ; then - echo "${ANSI_GREEN}Vests is OK$ANSI_NOCOLOR" - wc -l vests.log -else - cat vests.log - echo "${ANSI_RED}Vests failure$ANSI_NOCOLOR" - failures=vests -fi -cd .. -travis_time_finish -echo "travis_fold:end:tests.vests" -[ "$failures" = "" ] || exit 1 - -$GHDL --version -cd .. - -#--- - -echo "[SUCCESSFUL]" -touch test_ok diff --git a/dist/linux/travis-ci.sh b/dist/linux/travis-ci.sh deleted file mode 100755 index 2585685c8..000000000 --- a/dist/linux/travis-ci.sh +++ /dev/null @@ -1,132 +0,0 @@ -#! /bin/bash -# This script is executed in the travis-ci environment. - -build_img_ghdl() { - # Build ghdl/ghdl from ghdl/run - echo "travis_fold:start:build_run" - travis_time_start - printf "$ANSI_BLUE[DOCKER build] ghdl : ${IMAGE_TAG}$ANSI_NOCOLOR\n" - - PKG=`ls | grep -oP 'ghdl-.*tgz'` - mkdir tmp-img && cd tmp-img - cp ../$PKG ./ - cp ../BUILD_TOOLS ./ - echo "FROM ghdl/run:$IMAGE_TAG" > Dockerfile - echo "ADD $PKG /usr/local" >> Dockerfile - docker build -t ghdl/ghdl:$IMAGE_TAG . - cd .. - travis_time_finish - echo "travis_fold:end:build_run" -} - -#--- - -set -e - -. dist/linux/travis-utils.sh -. dist/ansi_color.sh -#disable_color - -scriptdir=$(dirname $0) - - -# Display env (to debug) - -echo -en "travis_fold:start:travis_env\r" -printf "$ANSI_YELLOW[TRAVIS] Travis environment $ANSI_NOCOLOR\n" -env | grep TRAVIS -echo -en "travis_fold:end:travis_env\r" - - -if [ "$IMAGE" = "" ]; then - echo "IMAGE not defined" - exit 1 -fi - - -echo "travis_fold:start:fetch" -# The command 'git describe' (used for version) needs the history. Get it. -# But the following command fails if the repository is complete. -git fetch --unshallow || true - -echo "travis_fold:end:fetch" - - -# Compute package name - -PKG_SHORTCOMMIT="$(printf $TRAVIS_COMMIT | cut -c1-10)" -PKG_VER=`grep "ghdl_version=" configure | sed -e 's/.*"\(.*\)";/\1/'` -if [ -z "$TRAVIS_TAG" ]; then - # No tag: use date + commit id - PKG_TAG="$(date -u +%Y%m%d)-$PKG_SHORTCOMMIT"; -elif expr "$TRAVIS_TAG" : 'v[0-9].*' > /dev/null; then - # Remove leading 'v' in tags in the filenames. - PKG_TAG="$(echo $TRAVIS_TAG | cut -c2-)" -else - # Regular tag (like snapshots), nothing to change. - PKG_TAG="$TRAVIS_TAG" -fi - -# Extract from IMAGE (defined in .travis.yml) -IFS='+' read -ra REFS <<< "$IMAGE" -DDIST=${REFS[0]} # Linux distro (eg: ubuntuXX, fedoraXX) -DBLD=${REFS[1]} # Build/backend (eg: mcode, llvm) -DGPL=${REFS[2]} # GPL or not - -PKG_NAME="ghdl-${PKG_TAG}-${DDIST}-${DBLD}" -BUILD_CMD_OPTS="$ENABLECOLOR -b $DBLD" -if [ "$DGPL" = "gpl" ]; then - BUILD_CMD_OPTS="$BUILD_CMD_OPTS --gpl" - PKG_NAME="ghdl-gpl-${PKG_TAG}" -fi -BUILD_CMD_OPTS="${BUILD_CMD_OPTS} -p $PKG_NAME" - -echo "build cmd: $BUILD_CMD_OPTS" - - -# Build - -if [ "$TRAVIS_OS_NAME" = "osx" ]; then - # Install gnat compiler (use cache) - ./dist/macosx/install-ada.sh || exit 1 - PATH=$PWD/gnat/bin:$PATH - - bash -c "${scriptdir}/build.sh $BUILD_CMD_OPTS" -else - # Assume linux - - # Build version.tmp and replace version.in with it (so that the version is - # correctly set). - # This is a little bit hack-ish, as it assumes that 'git' is not - # available in docker (otherwise it will describe as -dirty - # because this modifies the source file version.in). - ghdl_version_line=`grep -e '^ghdl_version' configure` - make -f Makefile.in srcdir=. $ghdl_version_line version.tmp - cp version.tmp src/version.in - - # Run build in docker - IMAGE_TAG=`echo $IMAGE | sed -e 's/+/-/g'` - docker run --rm -t -v $(pwd):/work -w "/work" ghdl/build:$IMAGE_TAG bash -c "${scriptdir}/build.sh $BUILD_CMD_OPTS" -fi - -if [ ! -f build_ok ]; then - printf "$ANSI_RED[TRAVIS] BUILD failed $ANSI_NOCOLOR\n" - exit 1 -fi - - -# Test - -if [ "$TRAVIS_OS_NAME" = "osx" ]; then - bash -c "prefix=$(realpath ./install-mcode) ${scriptdir}/test.sh $BUILD_CMD_OPTS" -else - # Build ghdl/ghdl:$IMAGE_TAG image - build_img_ghdl - # Run test in docker container - docker run --rm -t -v $(pwd):/work -w "/work" ghdl/ghdl:$IMAGE_TAG bash -c "GHDL=ghdl ${scriptdir}/test.sh $BUILD_CMD_OPTS" -fi - -if [ ! -f test_ok ]; then - printf "$ANSI_RED[TRAVIS] TEST failed $ANSI_NOCOLOR\n" - exit 1 -fi diff --git a/dist/linux/travis-enc-dockerhub.sh b/dist/linux/travis-enc-dockerhub.sh deleted file mode 100755 index a677f8039..000000000 --- a/dist/linux/travis-enc-dockerhub.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -# - Run `$(command -v winpty) docker run --rm -it alpine sh -c "REPO='https://github.com/<user|organization>/<repo>'; USERNAME=<username>; PASSWORD=<password>; $(cat travis-enc.sh)"` -# - Check the log and copy the secure key to `.travis.yml`: https://docs.travis-ci.com/user/environment-variables/#Defining-encrypted-variables-in-.travis.yml - -apk add -U --no-cache git openssh ruby ruby-dev libffi-dev build-base ruby-dev libc-dev libffi-dev linux-headers -gem install travis --no-rdoc --no-ri - -git clone $REPO ./tmp-repo && cd tmp-repo - -travis login --org --auto -travis encrypt DOCKER_USER=$USERNAME -travis encrypt DOCKER_PASS=$PASSWORD diff --git a/dist/linux/travis-utils.sh b/dist/linux/travis-utils.sh deleted file mode 100644 index 8db013f7b..000000000 --- a/dist/linux/travis-utils.sh +++ /dev/null @@ -1,23 +0,0 @@ -# This is a trimmed down copy of -# https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/templates/header.sh -travis_time_start() { - # `date +%N` returns the date in nanoseconds. It is used as a replacement for $RANDOM, which is only available in bash. - travis_timer_id=`date +%N` - travis_start_time=$(travis_nanoseconds) - echo "travis_time:start:$travis_timer_id" -} -travis_time_finish() { - travis_end_time=$(travis_nanoseconds) - local duration=$(($travis_end_time-$travis_start_time)) - echo "travis_time:end:$travis_timer_id:start=$travis_start_time,finish=$travis_end_time,duration=$duration" -} - -if [ "$TRAVIS_OS_NAME" = "osx" ]; then - travis_nanoseconds() { - date -u '+%s000000000' - } -else - travis_nanoseconds() { - date -u '+%s%N' - } -fi |