2020-08-21 02:46:48 +00:00
|
|
|
version: 'openfusion-{branch}-{build}'
|
|
|
|
|
2020-12-21 14:26:35 +00:00
|
|
|
build_cloud: GCE us-east1-b n2-standard-8
|
|
|
|
|
2020-08-21 02:46:48 +00:00
|
|
|
image:
|
2020-12-21 14:26:35 +00:00
|
|
|
- GCP-Windows-VS2019
|
|
|
|
- GCP-Linux-Ubuntu1804
|
2020-08-21 02:46:48 +00:00
|
|
|
|
|
|
|
platform:
|
|
|
|
- x64
|
|
|
|
|
|
|
|
configuration:
|
|
|
|
- Release
|
|
|
|
|
|
|
|
for:
|
|
|
|
-
|
|
|
|
matrix:
|
|
|
|
only:
|
2020-12-21 14:26:35 +00:00
|
|
|
- image: GCP-Linux-Ubuntu1804
|
2020-08-21 02:46:48 +00:00
|
|
|
build_script:
|
2020-08-21 20:39:30 +00:00
|
|
|
- ps: |
|
2020-12-21 01:11:30 +00:00
|
|
|
$versions = "104", "728", "1013"
|
2020-08-21 20:39:30 +00:00
|
|
|
|
|
|
|
foreach ($version in $versions) {
|
|
|
|
Write-Output "Cleaning old output"
|
|
|
|
Invoke-Expression "make clean"
|
|
|
|
if ($LASTEXITCODE -ne "0") {
|
|
|
|
Write-Error "make clean failed for version $version" -ErrorAction Stop
|
|
|
|
}
|
|
|
|
Write-Output "Building version $version"
|
2020-12-21 14:26:35 +00:00
|
|
|
Invoke-Expression "make -j8 PROTOCOL_VERSION=$version"
|
2020-08-21 20:39:30 +00:00
|
|
|
if ($LASTEXITCODE -ne "0") {
|
|
|
|
Write-Error "make failed for version $version" -ErrorAction Stop
|
|
|
|
}
|
|
|
|
Rename-Item -Path "bin/fusion" -newName "$version-fusion"
|
|
|
|
Write-Output "Built version $version"
|
|
|
|
}
|
2020-12-21 20:53:17 +00:00
|
|
|
Copy-Item -Path "sql" -Destination "bin/sql" -Recurse
|
|
|
|
Copy-Item -Path "config.ini" -Destination "bin"
|
2020-08-21 02:46:48 +00:00
|
|
|
artifacts:
|
|
|
|
- path: bin
|
2020-12-28 14:12:36 +00:00
|
|
|
name: ubuntu18_04-bin-x64
|
2020-08-21 02:46:48 +00:00
|
|
|
type: zip
|
|
|
|
-
|
|
|
|
matrix:
|
2020-08-21 05:18:19 +00:00
|
|
|
only:
|
2020-12-21 14:26:35 +00:00
|
|
|
- image: GCP-Windows-VS2019
|
2020-12-14 04:52:17 +00:00
|
|
|
install:
|
|
|
|
- cmd: vcpkg install sqlite3:x64-windows
|
|
|
|
- cmd: vcpkg integrate install
|
2020-08-21 02:46:48 +00:00
|
|
|
build_script:
|
2020-08-21 05:18:19 +00:00
|
|
|
- ps: |
|
2020-12-21 01:11:30 +00:00
|
|
|
$versions = "104", "728", "1013"
|
2020-12-14 02:49:52 +00:00
|
|
|
$configurations = "Release"
|
|
|
|
# "Debug" builds are disabled, since we don't really need them
|
2020-08-21 05:18:19 +00:00
|
|
|
|
|
|
|
# AppVeyor uses VS2019 Community
|
|
|
|
$vsPath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
|
|
|
|
|
|
|
|
Import-Module "$vsPath\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
|
|
|
|
Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation
|
|
|
|
|
|
|
|
foreach ($version in $versions) {
|
|
|
|
if (Test-Path -LiteralPath "build") {
|
|
|
|
Remove-Item "build" -Recurse
|
|
|
|
Write-Output "Deleted existing build folder"
|
|
|
|
}
|
2020-08-21 17:38:45 +00:00
|
|
|
Invoke-Expression "cmake -B build -DPROTOCOL_VERSION=$version"
|
2020-08-21 05:18:19 +00:00
|
|
|
if ($LASTEXITCODE -ne "0") {
|
|
|
|
Write-Error "cmake generation failed for version $version" -ErrorAction Stop
|
|
|
|
}
|
|
|
|
Write-Output "Generated build files for version $version"
|
|
|
|
|
|
|
|
foreach ($configuration in $configurations) {
|
|
|
|
Write-Output "Building version $version $configuration"
|
2020-12-28 13:10:23 +00:00
|
|
|
Invoke-Expression "msbuild build\OpenFusion.sln /maxcpucount:8 /p:BuildInParallel=true /p:CL_MPCount=8 /p:UseMultiToolTask=true /p:Configuration=$configuration"
|
2020-08-21 05:18:19 +00:00
|
|
|
if ($LASTEXITCODE -ne "0") {
|
|
|
|
Write-Error "msbuild build failed for version $version" -ErrorAction Stop
|
|
|
|
}
|
|
|
|
Rename-Item -Path "bin/$configuration" -newName "$version-$configuration"
|
|
|
|
Write-Output "Built version $version $configuration"
|
2020-12-21 20:53:17 +00:00
|
|
|
Copy-Item -Path "sql" -Destination "bin/$version-$configuration/sql" -Recurse
|
|
|
|
Copy-Item -Path "config.ini" -Destination "bin/$version-$configuration"
|
2020-08-21 05:18:19 +00:00
|
|
|
}
|
|
|
|
}
|
2020-08-21 02:46:48 +00:00
|
|
|
artifacts:
|
|
|
|
- path: bin
|
2020-12-28 14:12:36 +00:00
|
|
|
name: windows-vs2019-bin-x64
|
2020-08-21 02:46:48 +00:00
|
|
|
type: zip
|