Remove old build scripts
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
version: 1.0.{build}
|
||||
image: Visual Studio 2019
|
||||
configuration: Debug
|
||||
platform: Any CPU
|
||||
#Don't build twice for PR's to same repo
|
||||
skip_branch_with_pr: true
|
||||
environment:
|
||||
AUTOUPDATER_Duplicati_SKIP_UPDATE: 1
|
||||
COVERALLS_REPO_TOKEN:
|
||||
secure: szQsrkP5rvra8L60SomD73/dFvRwot0UuyA566zqzI2qmLOr+MhLN0AyC8BTbhYY
|
||||
before_build:
|
||||
- ps: $env:UNITTEST_BASEFOLDER = "$Env:APPVEYOR_BUILD_FOLDER" + "\testdata"
|
||||
build_script:
|
||||
cmd: dotnet build Duplicati.sln
|
||||
test_script:
|
||||
- ps: |
|
||||
Start-FileDownload https://s3.amazonaws.com/duplicati-test-file-hosting/DSMCBE.zip
|
||||
|
||||
7z x DSMCBE.zip -otestdata
|
||||
mkdir .\testData\data
|
||||
|
||||
dotnet test --verbosity normal Duplicati.sln
|
||||
$testsPassed = $?
|
||||
|
||||
# Upload test results to AppVeyor.
|
||||
$wc = New-Object "System.Net.WebClient"
|
||||
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", "TestResults.xml")
|
||||
|
||||
if (!$testsPassed) {
|
||||
throw "Tests failed."
|
||||
}
|
||||
@@ -26,6 +26,7 @@ jobs:
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore --runtime=${{ matrix.cfg.runtime }} Duplicati.sln
|
||||
- name: Package
|
||||
#TODO: investigate #if __WindowsGTK__ || ENABLE_GTK via -p:DefineConstants=ENABLE_GTK Maybe needed for GUI?
|
||||
run: dotnet publish -c Release --runtime=${{ matrix.cfg.runtime }} -o publish Duplicati.sln
|
||||
- name: Save Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
|
||||
-47
@@ -1,47 +0,0 @@
|
||||
language: csharp
|
||||
mono: none
|
||||
dotnet: 5.0.101
|
||||
services: docker
|
||||
before_install:
|
||||
- sudo apt-get install moreutils
|
||||
- set -o pipefail
|
||||
env:
|
||||
global:
|
||||
- USAGEREPORTER_Duplicati_LEVEL=none
|
||||
- AUTOUPDATER_Duplicati_SKIP_UPDATE=1
|
||||
- BUILD_DIR=${TRAVIS_BUILD_DIR}/../.build
|
||||
- TEST_DIR=${TRAVIS_BUILD_DIR}/../.test
|
||||
- ROOT_DIR="$TRAVIS_BUILD_DIR"
|
||||
|
||||
# matrix expansion within jobs would be good:
|
||||
# https://github.com/travis-ci/travis-ci/issues/8295
|
||||
|
||||
# There is one cache per branch, so concurrent builds on different branches possible!
|
||||
# DO NOT SET ENVIRONMENT VARIABLES WITHIN JOBS, OR CACHES WILL NOT BE SHARED AMONGST JOBS!
|
||||
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: build
|
||||
cache:
|
||||
directories:
|
||||
- $BUILD_DIR
|
||||
script:
|
||||
- dotnet publish -r linux-x64 -o $BUILD_DIR ${ROOT_DIR}/Duplicati.sln
|
||||
- cp -R ${ROOT_DIR}/guiTests $BUILD_DIR/
|
||||
|
||||
|
||||
- stage: tests
|
||||
script:
|
||||
- dotnet test --verbosity normal ${ROOT_DIR}/Duplicati.sln
|
||||
|
||||
- stage: tests
|
||||
cache:
|
||||
directories:
|
||||
- $BUILD_DIR
|
||||
script:
|
||||
- ${ROOT_DIR}/pipeline/jobs/selenium_job.sh
|
||||
addons:
|
||||
sauce_connect:
|
||||
username: $SAUCE_USERNAME
|
||||
access_key: $SAUCE_ACCESS_KEY
|
||||
@@ -1,10 +0,0 @@
|
||||
|
||||
export ROOT_DIR=${SCRIPT_DIR}/../
|
||||
# caches
|
||||
export BUILD_DIR=/tmp/.duplicati_build
|
||||
export TEST_DIR=/tmp/.duplicati_test
|
||||
export ARCHIVE_DIR=${ROOT_DIR}/.duplicati_zip
|
||||
export PACKAGES_DIR=${ROOT_DIR}/.duplicati_packages
|
||||
export SIGN_DIR=${ROOT_DIR}/.duplicati_sign
|
||||
export UPLOAD_DIR=${ROOT_DIR}/.duplicati_upload
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
#!/bin/bash
|
||||
. "$( cd "$(dirname "$0")" ; pwd -P )/error_handling.sh"
|
||||
. "$( cd "$(dirname "$0")" ; pwd -P )/markers.sh"
|
||||
|
||||
function pull_docker_image () {
|
||||
travis_mark_begin "PULL MINIMAL DOCKER IMAGE"
|
||||
docker pull $DOCKER_IMAGE
|
||||
travis_mark_end "PULL MINIMAL DOCKER IMAGE"
|
||||
}
|
||||
|
||||
function add_option () {
|
||||
FORWARD_OPTS[${#FORWARD_OPTS[@]}]="$1"
|
||||
FORWARD_OPTS[${#FORWARD_OPTS[@]}]="$2"
|
||||
}
|
||||
|
||||
function add_volumes () {
|
||||
volume_args=()
|
||||
|
||||
volume_args[${#volume_args[@]}]="-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v ${TARGET_DIR}:/application \
|
||||
${DOCKER_VOLUME} \
|
||||
-v $( cd "$(dirname "$0")" ; pwd -P )/../:/pipeline ${DOCKER_SHARED_MEM}"
|
||||
|
||||
for (( i=1; i<${#SOURCE_DIR[@]}+1; i++ )); do
|
||||
volume_args[${#volume_args[@]}]="-v ${SOURCE_DIR[$i-1]}:/source_$i"
|
||||
done
|
||||
}
|
||||
|
||||
function run_with_docker () {
|
||||
if [ -z ${TARGET_DIR} ]; then
|
||||
echo "no target cache specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
add_volumes
|
||||
|
||||
docker run ${volume_args[@]} \
|
||||
--privileged $DOCKER_AS_ROOT --rm $DOCKER_IMAGE "/pipeline/docker-run/runner.sh" "${FORWARD_OPTS[@]}"
|
||||
}
|
||||
|
||||
function parse_options () {
|
||||
FORWARD_OPTS=()
|
||||
SOURCE_DIR=()
|
||||
|
||||
while true ; do
|
||||
case "$1" in
|
||||
--image)
|
||||
DOCKER_IMAGE="$2"
|
||||
;;
|
||||
--sourcedir)
|
||||
SOURCE_DIR[${#SOURCE_DIR[@]}]="$2"
|
||||
;;
|
||||
--targetdir)
|
||||
TARGET_DIR="$2"
|
||||
;;
|
||||
--asroot)
|
||||
DOCKER_AS_ROOT="-u 0"
|
||||
;;
|
||||
--volume)
|
||||
DOCKER_VOLUME="-v $2"
|
||||
;;
|
||||
--sharedmem)
|
||||
DOCKER_SHARED_MEM="-v /dev/shm:/dev/shm"
|
||||
;;
|
||||
--*)
|
||||
if [[ $2 =~ ^--.* || -z $2 ]]; then
|
||||
FORWARD_OPTS[${#FORWARD_OPTS[@]}]="$1"
|
||||
else
|
||||
FORWARD_OPTS[${#FORWARD_OPTS[@]}]="$1"
|
||||
FORWARD_OPTS[${#FORWARD_OPTS[@]}]="$2"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ -z $1 ]]; then
|
||||
break
|
||||
elif [[ $2 =~ ^--.* || -z $2 ]]; then
|
||||
shift
|
||||
else
|
||||
shift
|
||||
shift
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
if [ "${TARGET_DIR##${SOURCE_DIR}}" != "${TARGET_DIR}" ]; then
|
||||
echo "targetdir $TARGET_DIR is not allowed to be a subdir of sourcedir $SOURCE_DIR"
|
||||
fi
|
||||
|
||||
|
||||
add_option "--workingdir" "$TARGET_DIR"
|
||||
add_option "--sourcedirnum" ${#SOURCE_DIR[@]}
|
||||
}
|
||||
|
||||
parse_options "$@"
|
||||
pull_docker_image
|
||||
run_with_docker
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
function quit_on_error() {
|
||||
local parent_lineno="$1"
|
||||
local message="$2"
|
||||
local code="${3:-1}"
|
||||
if [[ -n "$message" ]] ; then
|
||||
echo "Error in $0 line ${parent_lineno}: ${message}; exiting with status ${code}"
|
||||
else
|
||||
echo "Error in $0 line ${parent_lineno}; exiting with status ${code}"
|
||||
fi
|
||||
exit "${code}"
|
||||
}
|
||||
|
||||
set -eE
|
||||
trap 'quit_on_error $LINENO' ERR
|
||||
set -o pipefail
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
function travis_mark_begin () {
|
||||
echo "travis_fold:start:$1"
|
||||
echo "+ START $1"
|
||||
}
|
||||
|
||||
function travis_mark_end () {
|
||||
echo "travis_fold:end:$1"
|
||||
echo "+ DONE $1"
|
||||
}
|
||||
@@ -1,108 +0,0 @@
|
||||
#!/bin/bash
|
||||
. "$( cd "$(dirname "$0")" ; pwd -P )/error_handling.sh"
|
||||
. "$( cd "$(dirname "$0")" ; pwd -P )/markers.sh"
|
||||
|
||||
function sync_dirs () {
|
||||
rsync_delete_option="--delete"
|
||||
for (( i=1; i<$SOURCE_DIR_NUM+1; i++ )); do
|
||||
travis_mark_begin "SYNCING DIR source_${i}"
|
||||
rsync -a $rsync_delete_option "/source_${i}/" "/application/"
|
||||
unset rsync_delete_option
|
||||
travis_mark_end "SYNCING DIR source_${i}"
|
||||
done
|
||||
}
|
||||
|
||||
function setup () {
|
||||
travis_mark_begin "INSTALLING PACKAGES IN DOCKER"
|
||||
|
||||
if [ -f /sbin/apk ]; then
|
||||
apk --update add $DOCKER_PACKAGES
|
||||
elif [ -f /usr/bin/apt-get ]; then
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get update && apt-get install -y $DOCKER_PACKAGES
|
||||
fi
|
||||
travis_mark_end "INSTALLING PACKAGES IN DOCKER"
|
||||
}
|
||||
|
||||
function clean_up () {
|
||||
if [[ -z $KEEP_TARGET_FILTER ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
cd /application
|
||||
find . -type f ! -regex "${KEEP_TARGET_FILTER}" -delete
|
||||
find . -type d -empty -delete
|
||||
|
||||
for (( i=1; i<${#KEEP_SOURCE_FILTER[@]}+1; i++ )); do
|
||||
cd /source_${i}
|
||||
find . -type f ! -regex "${KEEP_SOURCE_FILTER[$i-1]}" -delete
|
||||
find . -type d -empty -delete
|
||||
done
|
||||
}
|
||||
|
||||
function parse_options () {
|
||||
KEEP_SOURCE_FILTER=()
|
||||
|
||||
while true ; do
|
||||
case "$1" in
|
||||
--command)
|
||||
DOCKER_COMMAND="$2"
|
||||
;;
|
||||
--packages)
|
||||
DOCKER_PACKAGES="$2"
|
||||
;;
|
||||
--sourcedirnum)
|
||||
SOURCE_DIR_NUM="$2"
|
||||
;;
|
||||
--keeptargetfilter)
|
||||
KEEP_TARGET_FILTER="$2"
|
||||
;;
|
||||
--keepsourcefilter)
|
||||
KEEP_SOURCE_FILTER[${#KEEP_SOURCE_FILTER[@]}]="$2"
|
||||
;;
|
||||
--*)
|
||||
if [[ $2 =~ ^--.* || -z $2 ]]; then
|
||||
FORWARD_OPTS[${#FORWARD_OPTS[@]}]="$1"
|
||||
else
|
||||
FORWARD_OPTS[${#FORWARD_OPTS[@]}]="$1"
|
||||
FORWARD_OPTS[${#FORWARD_OPTS[@]}]="$2"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ -z $1 ]]; then
|
||||
break
|
||||
elif [[ $2 =~ ^--.* || -z $2 ]]; then
|
||||
shift
|
||||
else
|
||||
shift
|
||||
shift
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function set_user_script_vars () {
|
||||
option_found=false
|
||||
for arg in ${FORWARD_OPTS[@]}; do
|
||||
if [[ $option_found == true ]]; then
|
||||
eval $option=$arg
|
||||
export $option
|
||||
option_found=false
|
||||
elif [[ $arg =~ ^--.* ]]; then
|
||||
option_found=true
|
||||
option=${arg#"--"}
|
||||
elif [[ $arg =~ ^-.* ]]; then
|
||||
flag=${arg#"-"}
|
||||
eval $flag=true
|
||||
export $flag
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
parse_options "$@"
|
||||
setup
|
||||
sync_dirs
|
||||
cd /application
|
||||
set_user_script_vars
|
||||
$DOCKER_COMMAND "${FORWARD_OPTS[@]}"
|
||||
clean_up
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
export PATH="$PATH:${ROOT_DIR}/pipeline/docker-run"
|
||||
. error_handling.sh
|
||||
|
||||
which ts > /dev/null
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "please install ts. e.g. brew install moreutils/apt-get install moreutils"
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||
. "${SCRIPT_DIR}/_imports.sh"
|
||||
|
||||
${ROOT_DIR}/pipeline/stage_build/trigger.sh \
|
||||
--sourcedir "${ROOT_DIR}" \
|
||||
--targetdir "${BUILD_DIR}" $@ | ts
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||
. "${SCRIPT_DIR}/_imports.sh"
|
||||
|
||||
${ROOT_DIR}/pipeline/stage_integrationtests/trigger.sh \
|
||||
--sourcedir "${BUILD_DIR}" \
|
||||
--targetdir "${TEST_DIR}" $@ | ts
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||
. "${SCRIPT_DIR}/_imports.sh"
|
||||
|
||||
${ROOT_DIR}/pipeline/stage_unittests/trigger.sh \
|
||||
--sourcedir $BUILD_DIR \
|
||||
--targetdir $TEST_DIR $@ | ts
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
. "$( cd "$(dirname "$0")" ; pwd -P )/../docker-run/error_handling.sh"
|
||||
|
||||
export DUPLICATI_ROOT="/application/"
|
||||
declare -a FORWARD_OPTS
|
||||
|
||||
export UPDATE_SOURCE="${DUPLICATI_ROOT}/Updates/build/${BUILDTAG}_source"
|
||||
export UPDATE_TARGET="${DUPLICATI_ROOT}/Updates/build/${BUILDTAG}_target"
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/bin/bash
|
||||
. /pipeline/docker-run/markers.sh
|
||||
. /pipeline/shared/duplicati.sh
|
||||
|
||||
function build () {
|
||||
nuget restore "${DUPLICATI_ROOT}"/Duplicati.sln
|
||||
|
||||
if [ ! -d "${DUPLICATI_ROOT}"/packages/SharpCompress.0.23.0 ]; then
|
||||
ln -s "${DUPLICATI_ROOT}"/packages/sharpcompress.0.23.0 "${DUPLICATI_ROOT}"/packages/SharpCompress.0.23.0
|
||||
fi
|
||||
|
||||
# build version stamper
|
||||
msbuild -p:Configuration=Release -v:minimal "${DUPLICATI_ROOT}/BuildTools/UpdateVersionStamp/UpdateVersionStamp.csproj"
|
||||
mono "${DUPLICATI_ROOT}/BuildTools/UpdateVersionStamp/bin/Release/UpdateVersionStamp.exe" --version="${releaseversion}"
|
||||
|
||||
# build autoupdate
|
||||
nuget restore "${DUPLICATI_ROOT}/BuildTools/AutoUpdateBuilder/AutoUpdateBuilder.sln"
|
||||
msbuild -p:Configuration=Release -v:minimal "${DUPLICATI_ROOT}/BuildTools/AutoUpdateBuilder/AutoUpdateBuilder.sln"
|
||||
|
||||
# build gpg signing tool
|
||||
nuget restore "${DUPLICATI_ROOT}/BuildTools/GnupgSigningTool/GnupgSigningTool.sln"
|
||||
msbuild -p:Configuration=Release -v:minimal "${DUPLICATI_ROOT}/BuildTools/GnupgSigningTool/GnupgSigningTool.sln"
|
||||
|
||||
# build duplicati
|
||||
msbuild -p:DefineConstants=ENABLE_GTK /p:Configuration=Release "${DUPLICATI_ROOT}/Duplicati.sln"
|
||||
|
||||
cp -r "${DUPLICATI_ROOT}"/Duplicati/Server/webroot "${DUPLICATI_ROOT}"/Duplicati/GUI/Duplicati.GUI.TrayIcon/bin/Release/webroot
|
||||
}
|
||||
|
||||
travis_mark_begin "BUILDING BINARIES"
|
||||
build
|
||||
travis_mark_end "BUILDING BINARIES"
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
. error_handling.sh
|
||||
|
||||
PACKAGES="libgtk2.0-cil rsync"
|
||||
docker-run --image mono \
|
||||
--packages "$PACKAGES" \
|
||||
--command "/pipeline/stage_build/job.sh" $@
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/bin/bash
|
||||
. /pipeline/docker-run/markers.sh
|
||||
. /pipeline/shared/duplicati.sh
|
||||
|
||||
function start_test () {
|
||||
pip3 install selenium
|
||||
#pip install --upgrade urllib3
|
||||
|
||||
# wget "https://github.com/mozilla/geckodriver/releases/download/v0.23.0/geckodriver-v0.23.0-linux32.tar.gz"
|
||||
# tar -xvzf geckodriver*
|
||||
# chmod +x geckodriver
|
||||
# export PATH=$PATH:/duplicati/
|
||||
|
||||
#echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | tee -a /etc/ssl/certs/ca-
|
||||
cd
|
||||
AUTOUPDATER_Duplicati_SKIP_UPDATE=1 "${DUPLICATI_ROOT}/Duplicati.Server" &
|
||||
python3 "${DUPLICATI_ROOT}/guiTests/guiTest.py"
|
||||
}
|
||||
|
||||
travis_mark_begin "INTEGRATION TESTING"
|
||||
start_test
|
||||
travis_mark_end "INTEGRATION TESTING"
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
. error_handling.sh
|
||||
|
||||
PACKAGES="python3-pip rsync"
|
||||
docker-run --image selenium/standalone-firefox \
|
||||
--packages "$PACKAGES" \
|
||||
--asroot \
|
||||
--sharedmem \
|
||||
--command "sudo -u seluser /pipeline/stage_integrationtests/job.sh" $@
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
. /pipeline/docker-run/markers.sh
|
||||
. /pipeline/shared/duplicati.sh
|
||||
|
||||
function start_test () {
|
||||
travis_mark_begin "SETUP NUGET"
|
||||
nuget install NUnit.Runners -Version 3.10.0 -OutputDirectory testrunner
|
||||
travis_mark_end "SETUP NUGET"
|
||||
|
||||
for CAT in $(echo $testcategories | sed "s/,/ /g")
|
||||
do
|
||||
travis_mark_begin "UNIT TESTING CATEGORY $CAT"
|
||||
mono "${DUPLICATI_ROOT}"/testrunner/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe \
|
||||
"${DUPLICATI_ROOT}"/Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==$CAT --workers=1
|
||||
travis_mark_end "UNIT TESTING CATEGORY $CAT"
|
||||
done
|
||||
}
|
||||
|
||||
start_test
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
. error_handling.sh
|
||||
|
||||
PACKAGES="wget unzip rsync"
|
||||
docker-run --image mono \
|
||||
--packages "$PACKAGES" \
|
||||
--command "/pipeline/stage_unittests/job.sh" $@
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||
. "${SCRIPT_DIR}/docker-run/error_handling.sh"
|
||||
. "${SCRIPT_DIR}/.local_config.sh"
|
||||
|
||||
${ROOT_DIR}/pipeline/jobs/build_job.sh
|
||||
${ROOT_DIR}/pipeline/jobs/unittest_job.sh --testcategories BulkNormal
|
||||
${ROOT_DIR}/pipeline/jobs/unittest_job.sh --testcategories BulkNoSize
|
||||
${ROOT_DIR}/pipeline/jobs/unittest_job.sh --testcategories SVNDataLong,SVNData,RecoveryTool,ProblematicPath,SymLink
|
||||
${ROOT_DIR}/pipeline/jobs/unittest_job.sh --testcategories Border
|
||||
${ROOT_DIR}/pipeline/jobs/unittest_job.sh --testcategories Filter,Targeted,Purge,Serialization,WebApi,Utility,UriUtility,IO,ImportExport,Disruption,RestoreHandler,RepairHandler,DeleteHandler,Controller
|
||||
Reference in New Issue
Block a user