Appveyor linux builds (#665)

* Fix copy

* Update appveyor.yml

* additional logging on gulp

* Fix permissions on appveyor-package.sh

* Clean debug and nuget cache on windows too
This commit is contained in:
ta264 2019-03-12 00:38:14 +00:00 committed by Qstick
parent 902f0c115b
commit 555ae89741
10 changed files with 43 additions and 42 deletions

View File

@ -6,14 +6,12 @@ addons:
apt:
packages:
- dos2unix
- nuget
- libchromaprint-tools
update: true
homebrew:
packages:
- yarn
- dos2unix
- nuget
update: true
solution: src/Lidarr.sln
before_install:

6
appveyor-package.sh Normal file → Executable file
View File

@ -20,8 +20,10 @@ PublishArtifacts()
7z a -tgzip $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.linux.tar.gz $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.linux.tar
rm -f $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.linux.tar
./setup/inno/ISCC.exe "./setup/lidarr.iss"
cp ./setup/output/Lidarr.*windows.exe $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.windows-installer.exe
if [ "${CI_WINDOWS}" = "True" ]; then
./setup/inno/ISCC.exe "./setup/lidarr.iss"
cp ./setup/output/Lidarr.*windows.exe $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.windows-installer.exe
fi
}
PublishArtifacts

View File

@ -1,6 +1,8 @@
version: '0.5.0.{build}'
image: Visual Studio 2017
image:
- Visual Studio 2017
- Ubuntu1804
assembly_info:
patch: true
@ -11,17 +13,22 @@ assembly_info:
environment:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
nodejs_version: "8"
nodejs_version: "10"
install:
- git submodule update --init --recursive
- ps: Install-Product node $env:nodejs_version
- cmd: powershell Install-Product node $env:nodejs_version
- sh: nvm install $nodejs_version
- sh: sudo apt update
- sh: sudo apt install -y libchromaprint-tools
build_script:
- C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./build.sh
- cmd: C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./build.sh
- sh: ./build.sh
after_build:
- C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./appveyor-package.sh
- cmd: C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./appveyor-package.sh
- sh: ./appveyor-package.sh
- ps: Get-ChildItem .\_artifacts\*.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
- ps: Get-ChildItem .\_artifacts\*.exe | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
- ps: Get-ChildItem .\_artifacts\*.tar.gz | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
@ -29,10 +36,11 @@ after_build:
test_script:
- node --version
- yarn --version
- C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./test.sh Windows Unit
- cmd: C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./test.sh Windows Unit
- sh: ./test.sh Linux Unit
- sh: find "$APPVEYOR_BUILD_FOLDER" -type f -name 'myresults.xml' -print0 | xargs -0 -I '{}' curl -F 'file=@{}' "https://ci.appveyor.com/api/testresults/nunit3/$APPVEYOR_JOB_ID"
cache:
- '%USERPROFILE%\.nuget\packages'
- node_modules -> package.json
pull_requests:

View File

@ -76,7 +76,9 @@ BuildWithMSBuild()
echo $msBuild
export PATH=$msBuild:$PATH
CheckExitCode MSBuild.exe $slnFile //p:Configuration=Debug //p:Platform=x86 //t:Clean //m
CheckExitCode MSBuild.exe $slnFile //p:Configuration=Release //p:Platform=x86 //t:Clean //m
$nuget locals all -clear
$nuget restore $slnFile
CheckExitCode MSBuild.exe $slnFile //p:Configuration=Release //p:Platform=x86 //t:Build //m //p:AllowedReferenceRelatedFileExtensions=.pdb
}
@ -86,6 +88,7 @@ BuildWithXbuild()
export MONO_IOMAP=case
CheckExitCode msbuild /p:Configuration=Debug /t:Clean $slnFile
CheckExitCode msbuild /p:Configuration=Release /t:Clean $slnFile
mono $nuget locals all -clear
mono $nuget restore $slnFile
CheckExitCode msbuild /p:Configuration=Release /p:Platform=x86 /t:Build /p:AllowedReferenceRelatedFileExtensions=.pdb $slnFile
}
@ -259,7 +262,7 @@ PackageTests()
if [ $runtime = "dotnet" ] ; then
$nuget install NUnit.ConsoleRunner -Version 3.7.0 -Output $testPackageFolder
else
nuget install NUnit.ConsoleRunner -Version 3.7.0 -Output $testPackageFolder
mono $nuget install NUnit.ConsoleRunner -Version 3.7.0 -Output $testPackageFolder
fi
cp $outputFolder/*.dll $testPackageFolder

View File

@ -2,7 +2,6 @@ const path = require('path');
const gulp = require('gulp');
const print = require('gulp-print').default;
const cache = require('gulp-cached');
const flatten = require('gulp-flatten');
const livereload = require('gulp-livereload');
const paths = require('./helpers/paths.js');
@ -10,16 +9,15 @@ gulp.task('copyJs', () => {
return gulp.src(
[
path.join(paths.src.root, 'polyfills.js')
])
], { base: paths.src.root })
.pipe(cache('copyJs'))
.pipe(print())
.pipe(flatten())
.pipe(gulp.dest(paths.dest.root))
.pipe(livereload());
});
gulp.task('copyHtml', () => {
return gulp.src(paths.src.html)
return gulp.src(paths.src.html, { base: paths.src.root })
.pipe(cache('copyHtml'))
.pipe(print())
.pipe(gulp.dest(paths.dest.root))
@ -28,22 +26,20 @@ gulp.task('copyHtml', () => {
gulp.task('copyFonts', () => {
return gulp.src(
path.join(paths.src.fonts, '**', '*.*')
path.join(paths.src.fonts, '**', '*.*'), { base: paths.src.root }
)
.pipe(cache('copyFonts'))
.pipe(print())
.pipe(flatten({ subPath: 2 }))
.pipe(gulp.dest(paths.dest.root))
.pipe(livereload());
});
gulp.task('copyImages', () => {
return gulp.src(
path.join(paths.src.images, '**', '*.*')
path.join(paths.src.images, '**', '*.*'), { base: paths.src.root }
)
.pipe(cache('copyImages'))
.pipe(print())
.pipe(flatten({ subPath: 2 }))
.pipe(gulp.dest(paths.dest.root))
.pipe(livereload());
});

View File

@ -1,15 +1,15 @@
const root = './frontend/src/';
const root = './frontend/src';
const paths = {
src: {
root,
html: `${root}*.html`,
scripts: `${root}**/*.js`,
content: `${root}Content/`,
fonts: `${root}Content/Fonts/`,
images: `${root}Content/Images/`,
html: `${root}/*.html`,
scripts: `${root}/**/*.js`,
content: `${root}/Content/`,
fonts: `${root}/Content/Fonts/`,
images: `${root}/Content/Images/`,
exclude: {
libs: `!${root}JsLibraries/**`
libs: `!${root}/JsLibraries/**`
}
},
dest: {

View File

@ -61,7 +61,6 @@
"gulp": "4.0.0",
"gulp-cached": "1.1.1",
"gulp-concat": "2.6.1",
"gulp-flatten": "0.4.0",
"gulp-livereload": "4.0.1",
"gulp-postcss": "8.0.0",
"gulp-print": "5.0.0",

13
test.sh
View File

@ -20,20 +20,23 @@ if [[ -z "${APPVEYOR}" ]]; then
NUNIT="$TEST_DIR/NUnit.ConsoleRunner.3.7.0/tools/nunit3-console.exe"
NUNIT_COMMAND="$NUNIT"
NUNIT_PARAMS="--workers=1"
else
elif [ "$PLATFORM" = "Windows" ]; then
NUNIT="nunit3-console"
NUNIT_COMMAND="$NUNIT"
NUNIT_PARAMS="--result=myresults.xml;format=AppVeyor --workers=1"
unset TMP
unset TEMP
else
NUNIT="$TEST_DIR/NUnit.ConsoleRunner.3.7.0/tools/nunit3-console.exe"
NUNIT_COMMAND="$NUNIT"
NUNIT_PARAMS="--result=myresults.xml --workers=1"
unset TMP
unset TEMP
fi
if [ "$PLATFORM" = "Windows" ]; then
WHERE="$WHERE && cat != LINUX"
elif [ "$PLATFORM" = "Linux" ]; then
WHERE="$WHERE && cat != WINDOWS"
NUNIT_COMMAND="mono --debug --runtime=v4.0 $NUNIT"
elif [ "$PLATFORM" = "Mac" ]; then
elif [ "$PLATFORM" = "Linux" ] || [ "$PLATFORM" = "Mac" ] ; then
WHERE="$WHERE && cat != WINDOWS"
NUNIT_COMMAND="mono --debug --runtime=v4.0 $NUNIT"
else

Binary file not shown.

View File

@ -3911,14 +3911,6 @@ gulp-concat@2.6.1:
through2 "^2.0.0"
vinyl "^2.0.0"
gulp-flatten@0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/gulp-flatten/-/gulp-flatten-0.4.0.tgz#d9ac819416c30fd5dfb3dea9da79c83a1bcd61d1"
integrity sha512-eg4spVTAiv1xXmugyaCxWne1oPtNG0UHEtABx5W8ScLiqAYceyYm6GYA36x0Qh8KOIXmAZV97L2aYGnKREG3Sg==
dependencies:
plugin-error "^0.1.2"
through2 "^2.0.0"
gulp-livereload@4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/gulp-livereload/-/gulp-livereload-4.0.1.tgz#cb438e62f24363e26b44ddf36fd37c274b8b15ee"