-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathappveyor.yml
103 lines (88 loc) · 4.65 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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
image:
- Visual Studio 2022
- macos-sonoma
- Ubuntu2204
environment:
major: 4
minor: 0
release: 0
app_version: '$(major).$(minor).$(release).$(APPVEYOR_BUILD_NUMBER)'
version: '$(major).$(minor).$(release).{build}'
dotnet_csproj:
patch: true
file: '**\*.csproj'
assembly_version: '$(app_version)'
file_version: '$(app_version)'
informational_version: '$(app_version)'
build_script:
# windows
- cmd: msbuild OSPSuite.SimModel.sln -t:build -restore /property:Configuration=Debug;Platform=x64 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- cmd: msbuild OSPSuite.SimModel.sln -t:build -restore /property:Configuration=Release;Platform=x64 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
# linux release build
- sh: |
platform=$(uname -s)
if [[ $platform == Darwin ]]; then
EXT="dylib"
NIX="MacOS"
else
EXT="so"
NIX="Ubuntu22"
fi
echo $platform
- sh: cmake -BBuild/Release/x64/ -Hsrc/OSPSuite.SimModelNative/ -DCMAKE_BUILD_TYPE=Release -DFuncParserDir=Build/Release/x64/ -DEXT=$EXT
- sh: cp packages/OSPSuite.FuncParser.$NIX/OSPSuite.FuncParserNative/bin/native/x64/Release/libOSPSuite.FuncParserNative.$EXT Build/Release/x64/
- sh: cp packages/OSPSuite.SimModelSolver_CVODES.$NIX/OSPSuite.SimModelSolver_CVODES/bin/native/x64/Release/libOSPSuite.SimModelSolver_CVODES.$EXT Build/Release/x64/
- sh: make -C Build/Release/x64/
- sh: dotnet build OSPSuite.SimModel.sln /property:Configuration=Release;Platform=x64
- sh: export LD_LIBRARY_PATH=Build/Release/x64/:$LD_LIBRARY_PATH
- sh: export DYLD_LIBRARY_PATH=Build/Release/x64/:$DYLD_LIBRARY_PATH
# linux debug build
- sh: cmake -BBuild/Debug/x64/ -Hsrc/OSPSuite.SimModelNative/ -DCMAKE_BUILD_TYPE=Debug -DFuncParserDir=Build/Debug/x64/ -DEXT=$EXT
- sh: cp packages/OSPSuite.FuncParser.$NIX/OSPSuite.FuncParserNative/bin/native/x64/Debug/libOSPSuite.FuncParserNative.$EXT Build/Debug/x64/
- sh: cp packages/OSPSuite.SimModelSolver_CVODES.$NIX/OSPSuite.SimModelSolver_CVODES/bin/native/x64/Debug/libOSPSuite.SimModelSolver_CVODES.$EXT Build/Debug/x64/
- sh: make -C Build/Debug/x64/
- sh: dotnet build OSPSuite.SimModel.sln /property:Configuration=Debug;Platform=x64
before_build:
- git submodule update --init --recursive
- dotnet nuget add source --name bddhelper https://ci.appveyor.com/nuget/ospsuite-bddhelper
- dotnet nuget add source --name utility https://ci.appveyor.com/nuget/ospsuite-utility
- nuget source add -name funcparser -source https://ci.appveyor.com/nuget/ospsuite-funcparser
- nuget source add -name cvodes -source https://ci.appveyor.com/nuget/ospsuite-simmodel-solver-cvodes
- ps: (get-content src\OSPSuite.SimModelNative\version.h) | foreach-object {$_ -replace "RELEASE 0", "RELEASE $env:RELEASE" -replace "MAJOR 0", "MAJOR $env:MAJOR" -replace "MINOR 0", "MINOR $env:MINOR" -replace "BUILD 0", "BUILD $env:APPVEYOR_BUILD_NUMBER"} | set-content src\OSPSuite.SimModelNative\version.h
- sh: nuget install packages.config -OutputDirectory packages -ExcludeVersion
- dotnet add tests/OSPSuite.SimModel.Tests/OSPSuite.SimModel.Tests.csproj package Appveyor.TestLogger --version 2.0.0
# linux: remove all native c++ projects and test application from the solution
- sh: dotnet sln OSPSuite.SimModel.sln remove src/OSPSuite.SimModelNative/OSPSuite.SimModelNative.vcxproj
- sh: dotnet sln OSPSuite.SimModel.sln remove src/OSPSuite.SysTool/OSPSuite.SysTool.vcxproj
- sh: dotnet sln OSPSuite.SimModel.sln remove src/OSPSuite.XMLWrapper/OSPSuite.XMLWrapper.vcxproj
- sh: dotnet sln OSPSuite.SimModel.sln remove tests/TestAppNetCore/TestAppNetCore.csproj
# - sh: sudo update-alternatives --set gcc /usr/bin/gcc-7
install:
#linux: install libxml2
# - sh: sudo apt-get update --assume-yes
- sh: |
if [[ $platform == Linux ]]; then
sudo apt-get install libxml2-dev --assume-yes
fi
after_build:
- cmd: dotnet pack src/OSPSuite.SimModel/ -p:PackageVersion=%app_version% -o ./
- sh: dotnet pack src/OSPSuite.SimModel/ -p:PackageVersion=$app_version -o ./
- ps: Get-ChildItem .\OSPSuite.SimModel.*.nupkg | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
test_script:
- ps: dotnet test --no-build --no-restore --logger:Appveyor --configuration:Release --verbosity normal
branches:
only:
- master
- develop
skip_commits:
files:
- '*.md'
skip_tags: true
pull_requests:
do_not_increment_build_number: true
nuget:
disable_publish_on_pr: true
notifications:
- provider: Slack
incoming_webhook:
secure: 4MH9Em6TtrKalq6808dhPOqypTfYBJvVlqPaa9akNyF1h7st5qNdNezFp6T+bWXqrcZ4q/smtPcJ7LkUFHL46JDYUFlIL8FDz+ApX/vP+x0=