Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit 222b5b9

Browse files
committed
project: Update AppVeyor CI to use gitlink.
1 parent b24378c commit 222b5b9

4 files changed

Lines changed: 131 additions & 90 deletions

File tree

SMP/appveyor.yml

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,51 @@ branches:
44
only:
55
- master
66
skip_non_tags: true
7-
configuration: Release+ReleaseDLLStaticDeps
87
shallow_clone: true
98

9+
configuration: Release+ReleaseDLLStaticDeps
10+
11+
platform: x86+x64
12+
1013
environment:
1114
matrix:
12-
- MSVC_VER: 14
1315
- MSVC_VER: 12
16+
- MSVC_VER: 14
17+
18+
install:
19+
# Install GitLink
20+
- cmd: choco install gitlink
1421

1522
before_build:
23+
# Create build project to compile all configurations and platforms at once
1624
- ps: >-
1725
$script = @'
1826
19-
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build" ToolsVersion="4.0">
27+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="GitLink" ToolsVersion="4.0">
2028
<ItemGroup>
2129
<ConfigurationList Condition="'@(ConfigurationList)' == '' and $(Configuration) != ''" Include="$(Configuration.Split('+'))" />
2230
<ConfigurationList Condition="'@(ConfigurationList)' == ''" Include="Release" />
23-
<PlatformList Condition="'@(PlatformList)' == ''" Include="x64;Win32" />
31+
<PlatformList Condition="'@(PlatformList)' == '' and $(Platform) != ''" Include="$(Platform.Split('+'))" />
32+
<PlatformList Condition="'@(PlatformList)' == ''" Include="x64;x86" />
2433
</ItemGroup>
25-
<Target Name="Build" Outputs="%(PlatformList.Identity)">
34+
<Target Name="List" Outputs="%(PlatformList.Identity)">
35+
<PropertyGroup>
36+
<CurrentPlatform>%(PlatformList.Identity)</CurrentPlatform>
37+
</PropertyGroup>
38+
<ItemGroup>
39+
<ProjectToBuild Include="SMP/APPVEYOR_PROJECT_NAME.sln">
40+
<Properties>Configuration=%(ConfigurationList.Identity);Platform=$(CurrentPlatform);OutDir=$(MSBuildThisFileDirectory)build_out\</Properties>
41+
</ProjectToBuild>
42+
</ItemGroup>
43+
</Target>
44+
<Target Name="Build" DependsOnTargets="List">
45+
<MSBuild Projects="@(ProjectToBuild)" BuildInParallel="true" />
46+
</Target>
47+
<Target Name="GitLink" DependsOnTargets="Build" Outputs="%(PlatformList.Identity)">
2648
<PropertyGroup>
2749
<CurrentPlatform>%(PlatformList.Identity)</CurrentPlatform>
2850
</PropertyGroup>
29-
<MSBuild Projects="SMP/APPVEYOR_PROJECT_NAME.sln" Properties="Configuration=%(ConfigurationList.Identity);Platform=$(CurrentPlatform);OutDir=$(MSBuildThisFileDirectory)build_out\;" />
51+
<Exec Command="GitLink . -f SMP/APPVEYOR_PROJECT_NAME.sln -c %(ConfigurationList.Identity) -p $(CurrentPlatform) -d $(MSBuildThisFileDirectory)build_out\lib\$(CurrentPlatform) -u https://github.com/APPVEYOR_REPO_NAME.git -s APPVEYOR_REPO_COMMIT"/>
3052
</Target>
3153
</Project>
3254
@@ -35,9 +57,23 @@ before_build:
3557
3658
$script = $script -replace "APPVEYOR_PROJECT_NAME", "$env:APPVEYOR_PROJECT_NAME"
3759
60+
$script = $script -replace "APPVEYOR_REPO_NAME", "$env:APPVEYOR_REPO_NAME"
61+
62+
$script = $script -replace "APPVEYOR_REPO_COMMIT", "$env:APPVEYOR_REPO_COMMIT"
63+
3864
$script | Out-File build.vcxproj
65+
66+
# Backup platform so it is not affected by vcvars
67+
- cmd: SET PLATFORMBACK=%PLATFORM%
68+
69+
# Setup msvc environment for required compiler version (specified by MSVC_VER)
3970
- ps: $env:VSCOMNTOOLS=(Get-Content ("env:VS" + "$env:MSVC_VER" + "0COMNTOOLS"))
4071
- cmd: call "%VSCOMNTOOLS%\..\..\VC\vcvarsall.bat" amd64
72+
73+
# Reset platform
74+
- cmd: SET PLATFORM=%PLATFORMBACK%
75+
76+
# Use project supplied script to download all required dependency libraries
4177
- cmd: call "%APPVEYOR_BUILD_FOLDER%\SMP\project_get_dependencies.bat"
4278

4379
build:
@@ -46,6 +82,7 @@ build:
4682
verbosity: minimal
4783

4884
after_build:
85+
# Copy licenses for dependencies
4986
- cmd: copy /y %APPVEYOR_BUILD_FOLDER%\..\prebuilt\licenses\*.* %APPVEYOR_BUILD_FOLDER%\build_out\licenses\
5087

5188
artifacts:

SMP/libssh.sln

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,50 +6,50 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libssh", "libssh.vcxproj",
66
EndProject
77
Global
88
GlobalSection(SolutionConfigurationPlatforms) = preSolution
9-
Debug|Win32 = Debug|Win32
109
Debug|x64 = Debug|x64
11-
DebugDLL|Win32 = DebugDLL|Win32
10+
Debug|x86 = Debug|x86
1211
DebugDLL|x64 = DebugDLL|x64
13-
DebugDLLStaticDeps|Win32 = DebugDLLStaticDeps|Win32
12+
DebugDLL|x86 = DebugDLL|x86
1413
DebugDLLStaticDeps|x64 = DebugDLLStaticDeps|x64
15-
Release|Win32 = Release|Win32
14+
DebugDLLStaticDeps|x86 = DebugDLLStaticDeps|x86
1615
Release|x64 = Release|x64
17-
ReleaseDLL|Win32 = ReleaseDLL|Win32
16+
Release|x86 = Release|x86
1817
ReleaseDLL|x64 = ReleaseDLL|x64
19-
ReleaseDLLStaticDeps|Win32 = ReleaseDLLStaticDeps|Win32
18+
ReleaseDLL|x86 = ReleaseDLL|x86
2019
ReleaseDLLStaticDeps|x64 = ReleaseDLLStaticDeps|x64
21-
ReleaseLTO|Win32 = ReleaseLTO|Win32
20+
ReleaseDLLStaticDeps|x86 = ReleaseDLLStaticDeps|x86
2221
ReleaseLTO|x64 = ReleaseLTO|x64
22+
ReleaseLTO|x86 = ReleaseLTO|x86
2323
EndGlobalSection
2424
GlobalSection(ProjectConfigurationPlatforms) = postSolution
25-
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.Debug|Win32.ActiveCfg = Debug|Win32
26-
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.Debug|Win32.Build.0 = Debug|Win32
2725
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.Debug|x64.ActiveCfg = Debug|x64
2826
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.Debug|x64.Build.0 = Debug|x64
29-
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
30-
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
27+
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.Debug|x86.ActiveCfg = Debug|Win32
28+
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.Debug|x86.Build.0 = Debug|Win32
3129
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
3230
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.DebugDLL|x64.Build.0 = DebugDLL|x64
33-
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.DebugDLLStaticDeps|Win32.ActiveCfg = DebugDLLStaticDeps|Win32
34-
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.DebugDLLStaticDeps|Win32.Build.0 = DebugDLLStaticDeps|Win32
31+
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
32+
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.DebugDLL|x86.Build.0 = DebugDLL|Win32
3533
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.DebugDLLStaticDeps|x64.ActiveCfg = DebugDLLStaticDeps|x64
3634
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.DebugDLLStaticDeps|x64.Build.0 = DebugDLLStaticDeps|x64
37-
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.Release|Win32.ActiveCfg = Release|Win32
38-
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.Release|Win32.Build.0 = Release|Win32
35+
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.DebugDLLStaticDeps|x86.ActiveCfg = DebugDLLStaticDeps|Win32
36+
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.DebugDLLStaticDeps|x86.Build.0 = DebugDLLStaticDeps|Win32
3937
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.Release|x64.ActiveCfg = Release|x64
4038
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.Release|x64.Build.0 = Release|x64
41-
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
42-
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
39+
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.Release|x86.ActiveCfg = Release|Win32
40+
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.Release|x86.Build.0 = Release|Win32
4341
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
4442
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
45-
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.ReleaseDLLStaticDeps|Win32.ActiveCfg = ReleaseDLLStaticDeps|Win32
46-
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.ReleaseDLLStaticDeps|Win32.Build.0 = ReleaseDLLStaticDeps|Win32
43+
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
44+
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
4745
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.ReleaseDLLStaticDeps|x64.ActiveCfg = ReleaseDLLStaticDeps|x64
4846
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.ReleaseDLLStaticDeps|x64.Build.0 = ReleaseDLLStaticDeps|x64
49-
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.ReleaseLTO|Win32.ActiveCfg = ReleaseLTO|Win32
50-
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.ReleaseLTO|Win32.Build.0 = ReleaseLTO|Win32
47+
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.ReleaseDLLStaticDeps|x86.ActiveCfg = ReleaseDLLStaticDeps|Win32
48+
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.ReleaseDLLStaticDeps|x86.Build.0 = ReleaseDLLStaticDeps|Win32
5149
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.ReleaseLTO|x64.ActiveCfg = ReleaseLTO|x64
5250
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.ReleaseLTO|x64.Build.0 = ReleaseLTO|x64
51+
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.ReleaseLTO|x86.ActiveCfg = ReleaseLTO|Win32
52+
{17D28A05-3CF7-4F15-B19C-6495EC7579B8}.ReleaseLTO|x86.Build.0 = ReleaseLTO|Win32
5353
EndGlobalSection
5454
GlobalSection(SolutionProperties) = preSolution
5555
HideSolutionNode = FALSE

SMP/libssh.vcxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,7 @@ del /f /q $(OutDir)\licenses\libssh.txt
10831083
<AdditionalLibraryDirectories>$(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
10841084
<LargeAddressAware>true</LargeAddressAware>
10851085
<AdditionalOptions>/IGNORE:4006,4221 %(AdditionalOptions)</AdditionalOptions>
1086+
<GenerateDebugInformation>true</GenerateDebugInformation>
10861087
</Link>
10871088
<PostBuildEvent>
10881089
<Command>mkdir $(OutDir)\include
@@ -1155,6 +1156,7 @@ del /f /q $(OutDir)\licenses\libssh.txt
11551156
<AdditionalLibraryDirectories>$(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
11561157
<LargeAddressAware>true</LargeAddressAware>
11571158
<AdditionalOptions>/IGNORE:4006,4221 %(AdditionalOptions)</AdditionalOptions>
1159+
<GenerateDebugInformation>true</GenerateDebugInformation>
11581160
</Link>
11591161
<PostBuildEvent>
11601162
<Command>mkdir $(OutDir)\include
@@ -1226,6 +1228,7 @@ del /f /q $(OutDir)\licenses\libssh.txt
12261228
<AdditionalDependencies>zlib.lib;gcrypt.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
12271229
<AdditionalLibraryDirectories>$(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
12281230
<AdditionalOptions>/IGNORE:4006,4221 %(AdditionalOptions)</AdditionalOptions>
1231+
<GenerateDebugInformation>true</GenerateDebugInformation>
12291232
</Link>
12301233
<PostBuildEvent>
12311234
<Command>mkdir $(OutDir)\include
@@ -1297,6 +1300,7 @@ del /f /q $(OutDir)\licenses\libssh.txt
12971300
<AdditionalDependencies>libzlib.lib;libgcrypt.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
12981301
<AdditionalLibraryDirectories>$(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
12991302
<AdditionalOptions>/IGNORE:4006,4221 %(AdditionalOptions)</AdditionalOptions>
1303+
<GenerateDebugInformation>true</GenerateDebugInformation>
13001304
</Link>
13011305
<PostBuildEvent>
13021306
<Command>mkdir $(OutDir)\include

0 commit comments

Comments
 (0)