瀏覽代碼

ci: Remove obsolete script and dockerfiles

Jean-Christophe Fillion-Robin 7 年之前
父節點
當前提交
a461d18a25

+ 0 - 100
CMake/CircleCI/CircleCI_CTK_Docker.cmake

@@ -1,100 +0,0 @@
-##############################################################################
-#
-# Library:   CTK
-#
-# Copyright 2010 Kitware Inc. 28 Corporate Drive,
-# Clifton Park, NY, 12065, USA.
-#
-# All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-##############################################################################
-
-if( NOT "${CTK_QT_VERSION}" MATCHES "4|5" )
-  message( FATAL_ERROR "CTK_QT_VERSION should be set to either 4 or 5" )
-endif()
-
-set( CTK_SOURCE_DIR "/usr/src/CTK" )
-set( CTK_BINARY_DIR "/usr/src/CTK-build" )
-
-set( CTEST_SOURCE_DIRECTORY "${CTK_SOURCE_DIR}" )
-set( CTEST_BINARY_DIRECTORY "${CTK_BINARY_DIR}/CTK-build" )
-
-#############
-
-set( SITE_CTEST_MODE "Experimental" ) # Experimental, Continuous, or Nightly
-
-set( CTEST_CMAKE_GENERATOR "Unix Makefiles" ) # Ninja or Unix Makefiles
-
-set( CTK_GIT_REPOSITORY "https://github.com/commontk/CTK.git" )
-
-# Follow format for caps and components as given on CTK dashboard
-set( CTEST_SITE "CircleCI_CTK" )
-
-# Follow format for caps and components as given on CTK dashboard
-set( SITE_PLATFORM "Ubuntu-64" )
-
-# Use SITE_BUILD_TYPE specified by circle.yml
-set( SITE_BUILD_TYPE "$ENV{SITE_BUILD_TYPE}" )
-if( NOT( (SITE_BUILD_TYPE MATCHES "Debug") OR (SITE_BUILD_TYPE MATCHES "Release") ) )
-  set( SITE_BUILD_TYPE "Debug" ) # Release, Debug
-endif()
-
-# Named SITE_BUILD_NAME
-string( SUBSTRING $ENV{CIRCLE_SHA1} 0 7 commit )
-set( what $ENV{CIRCLE_BRANCH} )
-set( SITE_BUILD_NAME_SUFFIX _${commit}_${what} )
-
-set( SITE_BUILD_NAME "CircleCI-${SITE_PLATFORM}-${SITE_BUILD_TYPE}${SITE_BUILD_NAME_SUFFIX}" )
-
-set( CTEST_BUILD_NAME "${SITE_BUILD_NAME}-BuildTest-Qt${CTK_QT_VERSION}-${SITE_CTEST_MODE}" )
-
-###################
-
-set( CTEST_CONFIGURATION_TYPE "${SITE_BUILD_TYPE}")
-set( CMAKE_BUILD_TYPE "${SITE_BUILD_TYPE}")
-set( BUILD_TESTING ON )
-set( CTK_BUILD_EXAMPLES OFF )
-
-# Disable MIT_SHM X11 extension
-set( ENV{QT_X11_NO_MITSHM} 1 )
-
-###################
-
-set(ctk_configure_options
-  -DCTK_QT_VERSION:STRING=${CTK_QT_VERSION}
-  -DCTK_ENABLE_Widgets:BOOL=ON
-  )
-
-ctest_start( "${SITE_CTEST_MODE}" )
-
-ctest_configure(
-  BUILD "${CTK_BINARY_DIR}"
-  SOURCE "${CTK_SOURCE_DIR}"
-  OPTIONS "${ctk_configure_options}"
-  )
-
-ctest_build( BUILD ${CTK_BINARY_DIR} )
-
-ctest_test(
-  BUILD ${CTEST_BINARY_DIRECTORY}
-  EXCLUDE "ctkWidgetsUtilsTestGrabWidget" # See https://github.com/commontk/CTK/issues/764
-  RETURN_VALUE result
-  )
-
-ctest_submit()
-
-if(result)
-  message(FATAL_ERROR "ERROR: Tests failed")
-endif()

+ 0 - 12
CMake/CircleCI/Dockerfile-qt4

@@ -1,12 +0,0 @@
-FROM thewtex/opengl:debian
-MAINTAINER Insight Software Consortium <community@itk.org>
-
-RUN REPO=http://cdn-fastly.deb.debian.org && \
-  echo "deb $REPO/debian jessie main\ndeb $REPO/debian jessie-updates main\ndeb $REPO/debian-security jessie/updates main" > /etc/apt/sources.list
-
-RUN apt-get update && apt-get install -y \
-  qt4-dev-tools \
-  cmake \
-  && rm -rf /var/lib/apt/lists/*
-
-ENV APP "sudo chown -R user.user /usr/src/ && /usr/src/CTK/CMake/CircleCI/test.sh -DCTK_QT_VERSION:STRING=4"

+ 0 - 20
CMake/CircleCI/Dockerfile-qt5

@@ -1,20 +0,0 @@
-FROM thewtex/opengl:debian
-MAINTAINER Insight Software Consortium <community@itk.org>
-
-RUN REPO=http://cdn-fastly.deb.debian.org && \
-  echo "deb $REPO/debian jessie main\ndeb $REPO/debian jessie-updates main\ndeb $REPO/debian-security jessie/updates main" > /etc/apt/sources.list
-
-RUN apt-get update && apt-get install -y \
-  qttools5-dev \
-  libqt5xmlpatterns5-dev \
-  wget && \
-  rm -rf /var/lib/apt/lists/*
-
-# Allow code written for more recent Qt version to compile
-RUN cp -r  /usr/include/x86_64-linux-gnu/qt5/QtDesigner/ /usr/include/x86_64-linux-gnu/qt5/QtUiPlugin
-
-RUN wget https://cmake.org/files/v3.7/cmake-3.7.1-Linux-x86_64.tar.gz && \
-  tar -xzf cmake-3.7.1-Linux-x86_64.tar.gz && \
-  rsync -avz cmake-3.7.1-Linux-x86_64/ /usr/local
-
-ENV APP "sudo chown -R user.user /usr/src/ && /usr/src/CTK/CMake/CircleCI/test.sh -DCTK_QT_VERSION:STRING=5"

+ 0 - 13
CMake/CircleCI/build.sh

@@ -1,13 +0,0 @@
-#!/bin/bash
-
-set -e
-set -o pipefail
-
-script_dir="`cd $(dirname $0); pwd`"
-
-pushd $script_dir
-
-docker build -t commontk/ctk-test:opengl-qt4 $script_dir -f Dockerfile-qt4
-docker build -t commontk/ctk-test:opengl-qt5 $script_dir -f Dockerfile-qt5
-
-popd

+ 0 - 9
CMake/CircleCI/push.sh

@@ -1,9 +0,0 @@
-#!/bin/sh
-
-die() {
-  echo "Error: $@" 1>&2
-  exit 1;
-}
-
-docker push commontk/ctk-test:opengl-qt4
-docker push commontk/ctk-test:opengl-qt5

+ 0 - 8
CMake/CircleCI/run.sh

@@ -1,8 +0,0 @@
-#!/bin/bash
-
-set -e
-set -o pipefail
-
-script_dir="`cd $(dirname $0); pwd`"
-
-$script_dir/run_opengl.sh -i commontk/ctk-test:opengl-$1 -c opengl-$1 -p 6081 -r --env="CIRCLE_SHA1=$2" -r --env="CIRCLE_BRANCH=$3" -r --env="SITE_BUILD_TYPE=$4"

+ 0 - 161
CMake/CircleCI/run_opengl.sh

@@ -1,161 +0,0 @@
-#!/bin/bash
-
-container=opengl
-image=thewtex/opengl
-port=6080
-extra_run_args=""
-quiet=""
-
-show_help() {
-cat << EOF
-Usage: ${0##*/} [-h] [-q] [-c CONTAINER] [-i IMAGE] [-p PORT] [-r DOCKER_RUN_FLAGS]
-
-This script is a convenience script to run Docker images based on
-thewtex/opengl. It:
-
-- Makes sure docker is available
-- On Windows and Mac OSX, creates a docker machine if required
-- Informs the user of the URL to access the container with a web browser
-- Stops and removes containers from previous runs to avoid conflicts
-- Mounts the present working directory to /home/user/work on Linux and Mac OSX
-- Prints out the graphical app output log following execution
-- Exits with the same return code as the graphical app
-
-Options:
-
-  -h             Display this help and exit.
-  -c             Container name to use (default ${container}).
-  -i             Image name (default ${image}).
-  -p             Port to expose HTTP server (default ${port}). If an empty
-                 string, the port is not exposed.
-  -r             Extra arguments to pass to 'docker run'. E.g.
-                 --env="APP=glxgears"
-  -q             Do not output informational messages.
-EOF
-}
-
-while [ $# -gt 0 ]; do
-	case "$1" in
-		-h)
-			show_help
-			exit 0
-			;;
-		-c)
-			container=$2
-			shift
-			;;
-		-i)
-			image=$2
-			shift
-			;;
-		-p)
-			port=$2
-			shift
-			;;
-		-r)
-			extra_run_args="$extra_run_args $2"
-			shift
-			;;
-		-q)
-			quiet=1
-			;;
-		*)
-			show_help >&2
-			exit 1
-			;;
-	esac
-	shift
-done
-
-
-which docker 2>&1 >/dev/null
-if [ $? -ne 0 ]; then
-	echo "Error: the 'docker' command was not found.  Please install docker."
-	exit 1
-fi
-
-os=$(uname)
-if [ "${os}" != "Linux" ]; then
-	vm=$(docker-machine active 2> /dev/null || echo "default")
-	if ! docker-machine inspect "${vm}" &> /dev/null; then
-		if [ -z "$quiet" ]; then
-			echo "Creating machine ${vm}..."
-		fi
-		docker-machine -D create -d virtualbox --virtualbox-memory 2048 ${vm}
-	fi
-	docker-machine start ${vm} > /dev/null
-    eval $(docker-machine env $vm --shell=sh)
-fi
-
-ip=$(docker-machine ip ${vm} 2> /dev/null || echo "localhost")
-url="http://${ip}:$port"
-
-cleanup() {
-	docker stop $container >/dev/null
-
-    # Attempt to delete container
-    rm_output=$(docker rm -f $container 2>&1)
-    rm_exit_code=$?
-    if [[ $rm_exit_code != 0 ]]; then
-      if [[ "$CIRCLECI" == "true" ]] && [[ $rm_output == *"Driver btrfs failed to remove"* ]]; then
-        : # Ignore error because of https://circleci.com/docs/docker-btrfs-error/
-      else
-        echo "$rm_output"
-        return $rm_exit_code
-      fi
-    fi
-}
-
-running=$(docker ps -a -q --filter "name=${container}")
-if [ -n "$running" ]; then
-	if [ -z "$quiet" ]; then
-		echo "Stopping and removing the previous session..."
-		echo ""
-	fi
-	cleanup
-fi
-
-if [ -z "$quiet" ]; then
-	echo ""
-	echo "Setting up the graphical application container..."
-	echo ""
-	if [ -n "$port" ]; then
-		echo "Point your web browser to ${url}"
-		echo ""
-	fi
-fi
-
-pwd_dir="`cd $(dirname $0)/../..; pwd`"
-mount_local=""
-if [ "${os}" = "Linux" ] || [ "${os}" = "Darwin" ]; then
-	mount_local=" -v ${pwd_dir}:/usr/src/CTK "
-fi
-port_arg=""
-if [ -n "$port" ]; then
-	port_arg="-p $port:6080"
-fi
-
-docker run \
-  -d \
-  --name $container \
-  ${mount_local} \
-  $port_arg \
-  $extra_run_args \
-  $image >/dev/null
-
-print_app_output() {
-	docker cp $container:/var/log/supervisor/graphical-app-launcher.log - \
-		| tar xO
-	result=$(docker cp $container:/tmp/graphical-app.return_code - \
-		| tar xO)
-	cleanup
-	exit $result
-}
-
-trap "docker stop $container >/dev/null && print_app_output" SIGINT SIGTERM
-
-docker wait $container >/dev/null
-
-print_app_output
-
-# vim: noexpandtab shiftwidth=4 tabstop=4 softtabstop=0

+ 0 - 23
CMake/CircleCI/test.sh

@@ -1,23 +0,0 @@
-#!/bin/bash
-
-set -e
-set -o pipefail
-
-# This is a script to build the modules and run the test suite in the base
-# Docker container.
-
-die() {
-  echo "Error: $@" 1>&2
-  exit 1;
-}
-
-mkdir /usr/src/CTK-build
-cd /usr/src/CTK-build || die "Could not cd into the build directory"
-
-mkdir /usr/src/CTK-build/CTK-build
-cd /usr/src/CTK-build/CTK-build || die "Could not cd into the build directory"
-
-ctest \
-  $1 \
-  -S /usr/src/CTK/CMake/CircleCI/CircleCI_CTK_Docker.cmake \
-  -VV || die "ctest failed"