forked from OneGet/oneget
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
49 lines (44 loc) · 1.85 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
version: 1.0.{build}
image: Visual Studio 2017
environment:
matrix:
- test_framework: fullclr
- test_framework: coreclr
configuration: Release
platform: Any CPU
init:
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# Install Pester
install:
- cinst -y pester
clone_folder: c:\projects\oneget
build_script:
- git submodule update --init
- ps: nuget locals all -clear
- ps: import-module c:\projects\oneget\test\TestUtility.psm1 -force
- ps: cd .\src; .\bootstrap.ps1; .\build.ps1 -framework "net452" Release -EmbedProviderManifest; .\build.ps1 -framework "netstandard2.0" Release -EmbedProviderManifest
deploy_script:
- ps: |
# Creating NuGet package artifact
$testframeworkEnv = [System.Environment]::GetEnvironmentVariable("test_framework")
if ($testframeworkEnv -eq "coreclr")
{
Import-Module PackageManagement -force
Get-Module -Name PackageManagement
Get-PackageProvider -Name NuGet -Force
Register-PSRepository -Name Local -SourceLocation C:\projects\oneget\src\out -verbose
Publish-Module -path C:\projects\oneget\src\out\PackageManagement -Repository Local -verbose
$nuGetPackageName=(Get-ChildItem C:\projects\oneget\src\out\PackageManagement*.nupkg).Name
@(
# You can add other artifacts here
"C:\projects\oneget\src\out\OneGet.FullClr.zip",
"C:\projects\oneget\src\out\OneGet.CoreClr.zip",
"C:\projects\oneget\src\out\$nuGetPackageName"
) | % {
Write-Host "Pushing package $_ as Appveyor artifact"
Push-AppveyorArtifact $_
}
}
test_script:
- ps: |
& "c:\projects\oneget\Test\run-tests.ps1" -nugetApiVersion all