mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-20 14:23:08 +01:00
Fix AppVeyor for testing
This commit is contained in:
@@ -19,16 +19,11 @@ install:
|
|||||||
platform:
|
platform:
|
||||||
- Win32
|
- Win32
|
||||||
- x64
|
- x64
|
||||||
configuration:
|
configuration: Release
|
||||||
- Release
|
|
||||||
- ReleaseTests
|
|
||||||
build:
|
build:
|
||||||
project: openrct2.proj
|
project: openrct2.proj
|
||||||
test_script:
|
test_script:
|
||||||
- ps: >-
|
- ps: msbuild openrct2.proj /t:test /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||||
if ($env:configuration -eq "ReleaseTests") {
|
|
||||||
msbuild openrct2.proj /t:test /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
|
||||||
}
|
|
||||||
artifacts:
|
artifacts:
|
||||||
- path: .\artifacts\openrct2-portable*.zip
|
- path: .\artifacts\openrct2-portable*.zip
|
||||||
name: OpenRCT2-portable
|
name: OpenRCT2-portable
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition="'$(Configuration)'==''">Debug</Configuration>
|
<Configuration Condition="'$(Configuration)'==''">Debug</Configuration>
|
||||||
<Platform Condition="'$(PLATFORM)'==''">x64</Platform>
|
<Platform Condition="'$(PLATFORM)'==''">x64</Platform>
|
||||||
|
<TestConfig Condition="'$(Configuration)'=='DebugTests' OR '$(Configuration)'=='ReleaseTests'">true</TestConfig>
|
||||||
<GIT_COMMIT_SHA1_SHORT Condition="'$(GIT_COMMIT_SHA1)'!=''">$(GIT_COMMIT_SHA1.Substring(0, 7))</GIT_COMMIT_SHA1_SHORT>
|
<GIT_COMMIT_SHA1_SHORT Condition="'$(GIT_COMMIT_SHA1)'!=''">$(GIT_COMMIT_SHA1.Substring(0, 7))</GIT_COMMIT_SHA1_SHORT>
|
||||||
|
|
||||||
<Version>0.0.5.0</Version>
|
<Version>0.0.5.0</Version>
|
||||||
@@ -213,7 +214,8 @@
|
|||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<!-- Target to build g2.dat containing OpenRCT2 sprites -->
|
<!-- Target to build g2.dat containing OpenRCT2 sprites -->
|
||||||
<Target Name="g2" DependsOnTargets="Build" AfterTargets="Build" Inputs="@(g2Inputs)" Outputs="$(g2Output)">
|
<Target Name="g2" DependsOnTargets="Build" AfterTargets="Build" Inputs="@(g2Inputs)" Outputs="$(g2Output)"
|
||||||
|
Condition="'$(TestConfig)'!='true'">
|
||||||
<Message Text="Building g2.dat..." />
|
<Message Text="Building g2.dat..." />
|
||||||
<Exec Command="$(OutputExe) sprite build $(g2Output) $(RootDir)resources\g2"
|
<Exec Command="$(OutputExe) sprite build $(g2Output) $(RootDir)resources\g2"
|
||||||
StandardOutputImportance="low" />
|
StandardOutputImportance="low" />
|
||||||
@@ -221,7 +223,8 @@
|
|||||||
|
|
||||||
<!-- Target to sign OpenRCT2
|
<!-- Target to sign OpenRCT2
|
||||||
This requires the project parameter SIGN_PASSWORD to be set -->
|
This requires the project parameter SIGN_PASSWORD to be set -->
|
||||||
<Target Name="Sign" AfterTargets="Build" Inputs="@(SignItems)" Outputs="%(SignItems.Identity).signed">
|
<Target Name="Sign" AfterTargets="Build" Inputs="@(SignItems)" Outputs="%(SignItems.Identity).signed"
|
||||||
|
Condition="'$(TestConfig)'!='true'">
|
||||||
<Warning Condition="'$(SIGN_PASSWORD)'==''" Text="SIGN_PASSWORD was not set, skipping signing of %(SignItems.Filename)%(SignItems.Extension)." />
|
<Warning Condition="'$(SIGN_PASSWORD)'==''" Text="SIGN_PASSWORD was not set, skipping signing of %(SignItems.Filename)%(SignItems.Extension)." />
|
||||||
<Message Condition="'$(SIGN_PASSWORD)'!=''" Text="Signing %(SignItems.Filename)%(SignItems.Extension)"
|
<Message Condition="'$(SIGN_PASSWORD)'!=''" Text="Signing %(SignItems.Filename)%(SignItems.Extension)"
|
||||||
Importance="high" />
|
Importance="high" />
|
||||||
@@ -234,14 +237,16 @@
|
|||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<!-- Target to publish OpenRCT2 as a portable zip -->
|
<!-- Target to publish OpenRCT2 as a portable zip -->
|
||||||
<Target Name="PublishPortable" DependsOnTargets="Build;g2" Inputs="@(PublishItems)" Outputs="$(PublishZip)">
|
<Target Name="PublishPortable" DependsOnTargets="Build;g2" Inputs="@(PublishItems)" Outputs="$(PublishZip)"
|
||||||
|
Condition="'$(TestConfig)'!='true'">
|
||||||
<MakeDir Directories="$(ArtifactsDir)" />
|
<MakeDir Directories="$(ArtifactsDir)" />
|
||||||
<Message Importance="high" Text="Creating $([System.IO.Path]::GetFileName($(PublishZip)))..." />
|
<Message Importance="high" Text="Creating $([System.IO.Path]::GetFileName($(PublishZip)))..." />
|
||||||
<_7z Output="$(PublishZip)" Inputs="@(PublishItems)" />
|
<_7z Output="$(PublishZip)" Inputs="@(PublishItems)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<!-- Target to publish the OpenRCT2 debug symbols -->
|
<!-- Target to publish the OpenRCT2 debug symbols -->
|
||||||
<Target Name="PublishSymbols" DependsOnTargets="Build" Inputs="@(SymbolItems)" Outputs="$(PublishSymbolsZip)">
|
<Target Name="PublishSymbols" DependsOnTargets="Build" Inputs="@(SymbolItems)" Outputs="$(PublishSymbolsZip)"
|
||||||
|
Condition="'$(TestConfig)'!='true'">
|
||||||
<MakeDir Directories="$(ArtifactsDir)" />
|
<MakeDir Directories="$(ArtifactsDir)" />
|
||||||
<Message Importance="high" Text="Creating $([System.IO.Path]::GetFileName($(PublishSymbolsZip)))..." />
|
<Message Importance="high" Text="Creating $([System.IO.Path]::GetFileName($(PublishSymbolsZip)))..." />
|
||||||
<_7z Output="$(PublishSymbolsZip)" Inputs="@(SymbolItems)" />
|
<_7z Output="$(PublishSymbolsZip)" Inputs="@(SymbolItems)" />
|
||||||
@@ -252,7 +257,7 @@
|
|||||||
DependsOnTargets="Build;g2"
|
DependsOnTargets="Build;g2"
|
||||||
Inputs="@(PublishItems);$(NsisScript)"
|
Inputs="@(PublishItems);$(NsisScript)"
|
||||||
Outputs="$(PublishInstallerExe)"
|
Outputs="$(PublishInstallerExe)"
|
||||||
Condition="'$(NO_NSIS)'!='true'">
|
Condition="'$(NO_NSIS)'!='true' AND '$(TestConfig)'!='true'">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PublishInstallerExeName>$([System.IO.Path]::GetFilename($(PublishInstallerExe)))</PublishInstallerExeName>
|
<PublishInstallerExeName>$([System.IO.Path]::GetFilename($(PublishInstallerExe)))</PublishInstallerExeName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -280,7 +285,8 @@
|
|||||||
DependsOnTargets="PublishSymbols;PublishPortable;PublishInstaller" />
|
DependsOnTargets="PublishSymbols;PublishPortable;PublishInstaller" />
|
||||||
|
|
||||||
<!-- Target to upload the artifacts to OpenRCT2.org -->
|
<!-- Target to upload the artifacts to OpenRCT2.org -->
|
||||||
<Target Name="UploadArtifacts" DependsOnTargets="PublishAll">
|
<Target Name="UploadArtifacts" DependsOnTargets="PublishAll"
|
||||||
|
Condition="'$(TestConfig)'!='true'">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<UploadLink>https://openrct2.org/altapi/?command=push-build</UploadLink>
|
<UploadLink>https://openrct2.org/altapi/?command=push-build</UploadLink>
|
||||||
<UploadFileNameShort>%(UploadArtifacts.Filename)%(UploadArtifacts.Extension)</UploadFileNameShort>
|
<UploadFileNameShort>%(UploadArtifacts.Filename)%(UploadArtifacts.Extension)</UploadFileNameShort>
|
||||||
|
|||||||
@@ -2,20 +2,24 @@
|
|||||||
# Script to deploy OpenRCT2 from AppVeyor #
|
# Script to deploy OpenRCT2 from AppVeyor #
|
||||||
###########################################
|
###########################################
|
||||||
|
|
||||||
# Check if OpenRCT2.org API security token is available
|
$testing = (${env:Configuration} -like "*tests")
|
||||||
if (${env:OPENRCT2_ORG_TOKEN})
|
if (-not $testing)
|
||||||
{
|
{
|
||||||
# Only upload tagged builds, develop branch or push/ branches
|
# Check if OpenRCT2.org API security token is available
|
||||||
if (${env:APPVEYOR_REPO_TAG} -eq "true" -or ${env:APPVEYOR_REPO_BRANCH} -match "^develop$|^push/")
|
if (${env:OPENRCT2_ORG_TOKEN})
|
||||||
{
|
{
|
||||||
msbuild openrct2.proj /t:UploadArtifacts /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
# Only upload tagged builds, develop branch or push/ branches
|
||||||
|
if (${env:APPVEYOR_REPO_TAG} -eq "true" -or ${env:APPVEYOR_REPO_BRANCH} -match "^develop$|^push/")
|
||||||
|
{
|
||||||
|
msbuild openrct2.proj /t:UploadArtifacts /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Write-Host "No deployment: Non-tagged or push branch." -ForegroundColor Yellow
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Write-Host "No deployment: Non-tagged or push branch." -ForegroundColor Yellow
|
Write-Host "No deployment: %OPENRCT2_ORG_TOKEN% not available." -ForegroundColor Yellow
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
Write-Host "No deployment: %OPENRCT2_ORG_TOKEN% not available." -ForegroundColor Yellow
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
# Script to setup OpenRCT2 for building on AppVeyor
|
# Script to setup OpenRCT2 for building on AppVeyor
|
||||||
#########################################################
|
#########################################################
|
||||||
|
|
||||||
|
$testing = (${env:Configuration} -like "*tests")
|
||||||
|
|
||||||
function Check-ExitCode
|
function Check-ExitCode
|
||||||
{
|
{
|
||||||
if ($LASTEXITCODE -ne 0)
|
if ($LASTEXITCODE -ne 0)
|
||||||
@@ -10,7 +12,7 @@ function Check-ExitCode
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($env:ENCKEY)
|
if ($env:ENCKEY -and -not $testing)
|
||||||
{
|
{
|
||||||
if (-not (Test-Path "secure-file"))
|
if (-not (Test-Path "secure-file"))
|
||||||
{
|
{
|
||||||
@@ -24,7 +26,7 @@ if ($env:ENCKEY)
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Check if OpenRCT2.org API security token is available
|
# Check if OpenRCT2.org API security token is available
|
||||||
if (${env:OPENRCT2_ORG_TOKEN})
|
if (${env:OPENRCT2_ORG_TOKEN} -and -not $testing)
|
||||||
{
|
{
|
||||||
if (-not (Test-Path "C:\ProgramData\chocolatey\lib\nsis.portable"))
|
if (-not (Test-Path "C:\ProgramData\chocolatey\lib\nsis.portable"))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user