forked from Apollo3zehn/EtherCAT.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
105 lines (89 loc) · 2.87 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
104
105
version: '{build}'
clone_depth: 1
image:
- Ubuntu
- Visual Studio 2019
environment:
ApiKey:
secure: SeomICfFXAQobyK5uMGeAhb0uljBxicG4Z56pWxWCXA=
SatelliteJobName: 'Image: Ubuntu'
FileName: 'libsoem_wrapper.so'
branches:
only:
- master
- dev
configuration:
- Release
init:
- ps: git config --global core.autocrlf true
install:
- ps: |
if ($isLinux)
{
sudo apt-get update
sudo apt-get --yes install g++-multilib
}
before_build:
- ps: dotnet --info
- ps: "Get-ChildItem Env:"
- ps: ./init_solution.ps1
- ps: Import-Module ./build/Start-ArtifactDownload.ps1 -Force
- ps: |
if ($isWindows)
{
New-Item -Force -ItemType directory -Path "./artifacts/download/bin32/"
Start-ArtifactDownload -JobName $env:SatelliteJobName -SourceFileName "lib32" -TargetFilePath "./artifacts/download/bin32/$env:FileName" -ApiKey $env:ApiKey
New-Item -Force -ItemType directory -Path "./artifacts/download/bin64/"
Start-ArtifactDownload -JobName $env:SatelliteJobName -SourceFileName "lib64" -TargetFilePath "./artifacts/download/bin64/$env:FileName" -ApiKey $env:ApiKey
}
build_script:
- ps: |
if ($isLinux)
{
make --directory "./artifacts/bin32"
make --directory "./artifacts/bin64"
dotnet build ./src/EtherCAT.NET/EtherCAT.NET.csproj -c $Env:CONFIGURATION /p:Build=$Env:APPVEYOR_BUILD_NUMBER /p:IsFinalBuild=$Env:APPVEYOR_REPO_TAG
}
elseif ($isWindows)
{
msbuild ./artifacts/bin32/SOEM_wrapper/soem_wrapper.vcxproj /p:Configuration=$Env:CONFIGURATION
msbuild ./artifacts/bin64/SOEM_wrapper/soem_wrapper.vcxproj /p:Configuration=$Env:CONFIGURATION
dotnet build ./src/EtherCAT.NET/EtherCAT.NET.csproj -c $Env:CONFIGURATION /p:Build=$Env:APPVEYOR_BUILD_NUMBER /p:IsFinalBuild=$Env:APPVEYOR_REPO_TAG /p:IsPublicBuild=True
}
after_build:
- ps: |
if ($isLinux)
{
Push-AppveyorArtifact "./artifacts/bin32/SOEM_wrapper/$env:FileName" -FileName "lib32"
Push-AppveyorArtifact "./artifacts/bin64/SOEM_wrapper/$env:FileName" -FileName "lib64"
}
# On Windows, WinPcap is probably missing
test_script:
- ps: |
if ($isLinux)
{
dotnet test ./tests/EtherCAT.NET.Tests -c $Env:CONFIGURATION /p:BuildProjectReferences=false
}
artifacts:
- path: ./artifacts/packages/**/*.nupkg
deploy:
# MyGet (dev)
- provider: NuGet
server: https://www.myget.org/F/apollo3zehn-dev/api/v2/package
api_key:
secure: DVadlPknnKPMR4F2+3VqeU7BFFmtLcXDHzkySA590MqQNIdzbx8HRuaPwDVbHRqX
skip_symbols: true
artifact: /.*\.nupkg/
on:
branch: dev
CI_WINDOWS: true
# NuGet (master)
- provider: NuGet
server: https://www.nuget.org/api/v2/package
api_key:
secure: /+MsVllJKX6M/MHBmCXaBFf1ttNDSqO04J7frGM81UUgBwfDUs6Wn4WufiU0Wl3/
skip_symbols: true
artifact: /.*\.nupkg/
on:
CI_WINDOWS: true
APPVEYOR_REPO_TAG: true