-
Notifications
You must be signed in to change notification settings - Fork 23
/
appveyor.yml
88 lines (78 loc) · 4.25 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
version: 30.1.{build}
# Try to fix "The project file ... is not supported by MSBuild and cannot be built."
image: Visual Studio 2022
before_build:
# enable RDP (session ends when build ends!)
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
- nuget restore Loyc.netfx.sln
- nuget restore Loyc.netstd.sln
- nuget restore Core\LoycCore.netfx.sln
- nuget restore Core\LoycCore.netstd.sln
build_script:
# First, set some environment variables.
# SEMVER is set manually. Not sure how this can be automated.
- set SEMVER=30.1.3
- echo %APPVEYOR_REPO_TAG%
# Build packages as SEMVER-ci{build}
- ps: if ($env:APPVEYOR_REPO_TAG -eq $True) { $env:PKG_VERSION = $env:SEMVER; } else { $env:PKG_VERSION = "$($env:SEMVER)-ci$($env:APPVEYOR_BUILD_NUMBER)"; }
- echo %PKG_VERSION%
# Build the Loyc libraries in release mode, for all possible configurations.
- msbuild /p:Configuration=Release Loyc.netstd.sln
- msbuild /p:Configuration=Release Loyc.netfx.sln
after_build:
# Package the Core libraries:
# - Loyc.Essentials.dll (Loyc.Essentials.$PKG_VERSION.nupkg)
# - Loyc.Interfaces.dll (Loyc.Interfaces.$PKG_VERSION.nupkg)
# - Loyc.Collections.dll (Loyc.Collections.$PKG_VERSION.nupkg)
# - Loyc.Math.dll (Loyc.Math.$PKG_VERSION.nupkg)
# - Loyc.Syntax.dll (Loyc.Syntax.$PKG_VERSION.nupkg)
# - Loyc.Utilities.dll (Loyc.Utilities.$PKG_VERSION.nupkg)
# - All 5 together (LoycCore.$PKG_VERSION.nupkg)
- nuget pack -Version %PKG_VERSION% -Symbols -SymbolPackageFormat snupkg Core\Loyc.Interfaces.nuspec
- nuget pack -Version %PKG_VERSION% -Symbols -SymbolPackageFormat snupkg Core\Loyc.Essentials.nuspec
- nuget pack -Version %PKG_VERSION% -Symbols -SymbolPackageFormat snupkg Core\Loyc.Collections.nuspec
- nuget pack -Version %PKG_VERSION% -Symbols -SymbolPackageFormat snupkg Core\Loyc.Math.nuspec
- nuget pack -Version %PKG_VERSION% -Symbols -SymbolPackageFormat snupkg Core\Loyc.Syntax.nuspec
- nuget pack -Version %PKG_VERSION% -Symbols -SymbolPackageFormat snupkg Core\Loyc.Utilities.nuspec
- nuget pack -Version %PKG_VERSION% Core\LoycCore.nuspec
# Package the Main libraries:
# - Loyc.Ecs.dll (Loyc.Ecs.$PKG_VERSION.nupkg)
# - LeMP.exe (LeMP.$PKG_VERSION.nupkg)
# - LLLPG.exe (LLLPG.$PKG_VERSION.nupkg)
- nuget pack -Version %PKG_VERSION% -Symbols -SymbolPackageFormat snupkg Main\Loyc.Ecs.nuspec
- nuget pack -Version %PKG_VERSION% -Symbols -SymbolPackageFormat snupkg Main\LeMP.nuspec
- nuget pack -Version %PKG_VERSION% -Symbols -SymbolPackageFormat snupkg Main\LLLPG.nuspec
# .NET Core builds produce output that can ONLY run on the current machine
# (because important DLLs are not included in the output folder).
# To produce something runnable elsewhere, use a publish command:
- dotnet publish -c Release "Main\LeMP\LeMP.csproj" --no-build -o .\Bin\published
# The output of "dotnet publish" is needed to build LeMP-Tool, because tool packages
# must be self-contained (no dependencies)
- nuget pack -Version %PKG_VERSION% Main\LeMP-Tool.nuspec
test_script:
# Unfortunately, test set 8 (LLLPG) sometimes fails due to nondeterminism.
- Bin\Release\Tests.exe 12345
- Bin\Release\Tests.exe 67
# In case I'm debugging the build over RDP, give me a little time
- sleep 30
# "task for setting values in AssemblyInfo files during the build"
assembly_info:
patch: false # I assume this disables it
file: '**\AssemblyVersion.cs'
assembly_version: "{version}"
assembly_file_version: "{version}"
assembly_informational_version: "{version}"
artifacts:
- path: '*.nupkg'
name: nupkgs
# Push the NuGet packages whenever a git tag is pushed.
deploy:
- provider: NuGet
api_key:
# API key from NuGet.org, encrypted with https://ci.appveyor.com/tools/encrypt
secure: XkkJS4XniJGrB/H/8QgkMUbthNwrYYhhkbgbnjAr93OZzUBc5EtWXiKGuXcvUA5B
skip_symbols: false # Whether to not publish symbol pkgs (src/pdb)
artifact: /.*\.s?nupkg/
on:
branch: master # Release from master branch only.
appveyor_repo_tag: true # Deploy on tag push only.