-
Notifications
You must be signed in to change notification settings - Fork 51
/
appveyor-nightly.yml
88 lines (74 loc) · 3.57 KB
/
appveyor-nightly.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
configuration: Debug
image: Visual Studio 2022
version: '{build}'
environment:
TARGET_FRAMEWORK: net8
init:
- ps: Update-AppveyorBuild -Version "$($env:ospsuite_version).$($env:appveyor_build_version)"
- ps: |
$lastCommitDate = git log -1 --format=%ci
$currentDate = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
$timeDiff = New-TimeSpan -Start $lastCommitDate -End $currentDate
if ($timeDiff.TotalHours -lt 24) {
Write-Host "Changes detected in the last 24 hours. Proceeding with the build."
}
else {
Write-Host "No changes in the last 24 hours. Skipping the build."
Exit-AppVeyorBuild
}
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '$(ospsuite_version).$(build_number)'
assembly_version: '$(ospsuite_version).$(build_number)'
file_version: '$(ospsuite_version).$(build_number)'
informational_version: '$(ospsuite_version).$(build_number)'
clone_depth: 1
install:
- set PATH=C:\Ruby25\bin;%PATH%
- gem install xml-simple
- ps: >-
(new-object net.webclient).DownloadFile('https://download.microsoft.com/download/A/2/D/A2D8587D-0027-4217-9DAD-38AFDB0A177E/msxml.msi', 'C:\msxml.msi')
Start-Process msiexec.exe -ArgumentList /i, C:\msxml.msi, /quiet, /qn, /norestart -Wait
before_build:
- nuget sources add -name bddhelper -source https://ci.appveyor.com/nuget/ospsuite-bddhelper
- nuget sources add -name utility -source https://ci.appveyor.com/nuget/ospsuite-utility
- nuget sources add -name serializer -source https://ci.appveyor.com/nuget/ospsuite-serializer
- nuget sources add -name texreporting -source https://ci.appveyor.com/nuget/ospsuite-texreporting
- nuget sources add -name databinding -source https://ci.appveyor.com/nuget/ospsuite-databinding
- nuget sources add -name databinding-devexpress -source https://ci.appveyor.com/nuget/ospsuite-databinding-devexpress
- nuget sources add -name funcparser -source https://ci.appveyor.com/nuget/ospsuite-funcparser
- nuget sources add -name simmodel -source https://ci.appveyor.com/nuget/ospsuite-simmodel
- nuget sources add -name cvodes -source https://ci.appveyor.com/nuget/ospsuite-simmodel-solver-cvodes
- nuget sources add -name core -source https://ci.appveyor.com/nuget/ospsuite-core
- nuget restore
- rake "update_go_license[ApplicationStartup.cs, %GO_DIAGRAM_KEY%]"
after_build:
- rake "create_setup[%APPVEYOR_BUILD_VERSION%, %CONFIGURATION%]"
- 7z a setup.zip %APPVEYOR_BUILD_FOLDER%\setup\deploy\*.msi
- rake "create_portable_setup[%APPVEYOR_BUILD_VERSION%, %CONFIGURATION%, pk-sim-portable-setup.zip]"
- cmd: >
pushd . &&
cd src\PKSimRDependencyResolution\bin\%CONFIGURATION%\%TARGET_FRAMEWORK% &&
"C:\Program Files\7-Zip\7z.exe" a pk-sim-r-dependencies.zip -x@excludedFiles.txt * -xr!runtimes &&
popd
build:
verbosity: minimal
project: PKSim.sln
on_finish:
- ps: Get-ChildItem setup.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
- ps: Get-ChildItem .\setup\*.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
- ps: |
$artifactPath = Join-Path $env:APPVEYOR_BUILD_FOLDER "src\PKSimRDependencyResolution\bin\$env:CONFIGURATION\$env:TARGET_FRAMEWORK\pk-sim-r-dependencies.zip"
Write-Host "Checking for artifact at: $artifactPath"
if (Test-Path $artifactPath) {
Write-Host "Artifact found. Pushing to AppVeyor."
Push-AppveyorArtifact -Path $artifactPath
} else {
Write-Error "Artifact path not found: $artifactPath"
}
test:
assemblies:
- PKSim.Tests.dll
- PKSim.UI.Tests.dll
- PKSim.Matlab.Tests.dll