New: Set up CI with Azure Pipelines (#897)

* Set up CI with Azure Pipelines

[skip ci]

* Remove Travis, Build Multiple Environments

* Change Task Type to Bash

* Checkout submodules

* Remove Appveyor Tests, Add Azure Tests

* Oops Forget Steps

* bad name

* test script fixes

* add tests to build job

* fixup tests

* name test runs

* fpcalc and artifacts

* Try to fix installer

* Publish separately

* Try publish

* Another go at artifacts

* Tidy up

* Add sentry, assembly info patching and bump version

* Only patch one AssemblyInfo; set node version 10

* Try pipeline artifacts again

* Tidy up - pipeline artifact seems to be way forward

* Fix installer publish

* first go at test job seperation

* job names and depends/consitions for tests

* pusblish single file test artifact

* pipeline artifact for test

* blitz the pattern filter

* windows test jobs

* mac tests, checkout on test jobs

* try to download build artifact to test job

* download and extract artifact

* Set LD_LIBRARY_PATH and print some sqlite debug info on mac tests

* fixup! tests

* integration test fixes

* fixup! integration test fixes

* fixup! integration test fixes

* more fixup

* use bash cp

* test fixups

* mkdir before copy

* linux works! add osx integration tests

* im tooo tired

* coverage attempt

* coverage seperate stage

* windows paths for integration test

* switch coverage to windows where opencover actually works

* fix test script

* one last go

* Simplify installer, try to fix name

* Try to parallelize backend and frontend build

* Try adding a matrix

* Try matrix jobs not stages

* Try to fix package step

* Remove opencover install

* Try to fix tests

* coverage fixes

* revert build.sh changes

* triggers so we don't double build

* Publish coverage package so we can debug

* try coverage no build, output artifact

* use the full pipeline workspace from build job

* fix automation tests for new ui

* Assorted fix attempts

* Another go

* MacOS debug

* Tidy up, try to fix mac

* Fix mac fpcalc, add mac integration tests

* Add cross platform automation tests

* Fix packages

* Try to fix Automation tests

* Don't wait on the installer to create standard packages

* Fixes

* delete logentries reference

* run automation tests in headless mode

* try install firefox mac

* Revert "try install firefox mac"

This reverts commit 4684bb1901.

* test sonarcloud prepare outputs

* basic analyze and upload

* don't limit fetch depth on analyze

* manual scanner do front and backend?

* full analyize with tests, coverage

* should depend on tests, coverage

* no need for condition on coverage

* Fix up build numbering

* Try to fix sonar

* Separate coverage calculation and publication

* Try to fix coverage upload
This commit is contained in:
Qstick 2019-08-13 13:15:59 -04:00 committed by GitHub
parent 72947029f4
commit 6932046c5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 664 additions and 244 deletions

View file

@ -145,26 +145,6 @@ RunGulp()
ProgressEnd 'Running gulp'
}
CreateMdbs()
{
local path=$1
if [ $runtime = "dotnet" ] ; then
local pdbFiles=( $(find $path -name "*.pdb") )
for filename in "${pdbFiles[@]}"
do
if [ -e ${filename%.pdb}.dll ] ; then
tools/pdb2mdb/pdb2mdb.exe ${filename%.pdb}.dll
fi
if [ -e ${filename%.pdb}.exe ] ; then
tools/pdb2mdb/pdb2mdb.exe ${filename%.pdb}.exe
fi
done
echo "Removing PDBs"
find $path -name "*.pdb" -exec rm "{}" \;
fi
}
PackageMono()
{
ProgressStart 'Creating Mono Package'
@ -174,9 +154,6 @@ PackageMono()
echo "Copying Binaries"
cp -r $outputFolder $outputFolderLinux
echo "Creating MDBs"
CreateMdbs $outputFolderLinux
echo "Removing Service helpers"
rm -f $outputFolderLinux/ServiceUninstall.*
rm -f $outputFolderLinux/ServiceInstall.*
@ -268,10 +245,7 @@ PackageTests()
cp $outputFolder/*.dll $testPackageFolder
cp $outputFolder/*.exe $testPackageFolder
cp $outputFolder/fpcalc $testPackageFolder
cp ./*.sh $testPackageFolder
echo "Creating MDBs for tests"
CreateMdbs $testPackageFolder
cp ./test.sh $testPackageFolder
rm -f $testPackageFolder/*.log.config
@ -283,8 +257,8 @@ PackageTests()
echo "Copying CurlSharp libraries"
cp $sourceFolder/ExternalModules/CurlSharp/libs/i386/* $testPackageFolder
echo "Copying dylibs"
cp -r $outputFolderMacOS/*.dylib $testPackageFolder
echo "Adding sqlite dylibs"
cp $sourceFolder/Libraries/Sqlite/*.dylib $testPackageFolder
ProgressEnd 'Creating Test Package'
}
@ -338,11 +312,51 @@ case "$(uname -s)" in
;;
esac
Build
RunGulp
PackageMono
PackageMacOS
PackageMacOSApp
PackageTests
CleanupWindowsPackage
PackageArtifacts
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
--only-backend)
ONLY_BACKEND=YES
shift # past argument
;;
--only-frontend)
ONLY_FRONTEND=YES
shift # past argument
;;
--only-packages)
ONLY_PACKAGES=YES
shift # past argument
;;
*) # unknown option
POSITIONAL+=("$1") # save it in an array for later
shift # past argument
;;
esac
done
set -- "${POSITIONAL[@]}" # restore positional parameters
# Only build backend if we haven't set only-frontend or only-packages
if [ -z "$ONLY_FRONTEND" ] && [ -z "$ONLY_PACKAGES" ];
then
Build
PackageTests
fi
# Only build frontend if we haven't set only-backend or only-packages
if [ -z "$ONLY_BACKEND" ] && [ -z "$ONLY_PACKAGES" ];
then
RunGulp
fi
# Only package if we haven't set only-backend or only-frontend
if [ -z "$ONLY_BACKEND" ] && [ -z "$ONLY_FRONTEND" ];
then
PackageMono
PackageMacOS
PackageMacOSApp
CleanupWindowsPackage
PackageArtifacts
fi