138 lines
5.6 KiB
YAML
138 lines
5.6 KiB
YAML
version: 2.6.0-branch-{branch}-build-{build}
|
|
|
|
#BUILD!!!
|
|
# Skipping commits affecting specific files (GitHub only).
|
|
# More details here: https://www.appveyor.com/docs/appveyor-yml and https://www.appveyor.com/docs/how-to/filtering-commits
|
|
skip_commits:
|
|
files:
|
|
- .ci/travis-*
|
|
- .github/
|
|
- .tx/
|
|
- webclient/
|
|
- .clang-format
|
|
- .*ignore
|
|
- .codacy.yml
|
|
- .gitlab-ci.yml
|
|
- .travis.yml
|
|
- '**/*.md'
|
|
- Dockerfile
|
|
- LICENSE
|
|
|
|
skip_branch_with_pr: true
|
|
|
|
image: Visual Studio 2017
|
|
|
|
cache:
|
|
- c:\openssl-release
|
|
- c:\protobuf-release
|
|
- c:\zlib-release
|
|
|
|
environment:
|
|
matrix:
|
|
- qt_ver: 5.9\msvc2017_64
|
|
openssl_ver: 1.0.2n-x64_86-win64
|
|
protobuf_ver: 3.5.1
|
|
zlib_ver: 1.2.11
|
|
cmake_generator: Visual Studio 15 2017 Win64
|
|
cmake_toolset: v141,host=x64
|
|
target_arch: win64
|
|
vc_arch: amd64
|
|
- qt_ver: 5.9\msvc2015 # Qt doesn't provide a msvc2017_32
|
|
openssl_ver: 1.0.2n-i386-win32
|
|
protobuf_ver: 3.5.1
|
|
zlib_ver: 1.2.11
|
|
cmake_generator: Visual Studio 15 2017
|
|
cmake_toolset: v141
|
|
target_arch: win32
|
|
vc_arch: amd64_x86
|
|
|
|
install:
|
|
- ps: |
|
|
if (Test-Path c:\openssl-release) {
|
|
echo "using openssl from cache"
|
|
} else {
|
|
Invoke-WebRequest "https://indy.fulgan.com/SSL/openssl-$env:openssl_ver.zip" -OutFile c:\openssl-$env:openssl_ver.zip
|
|
Expand-Archive -Path c:\openssl-$env:openssl_ver.zip -DestinationPath c:\openssl-release
|
|
Set-Location -Path C:\openssl-release
|
|
}
|
|
if (Test-Path c:\protobuf-release) {
|
|
echo "using protobuf from cache"
|
|
} else {
|
|
Invoke-WebRequest "https://github.com/google/protobuf/releases/download/v$env:protobuf_ver/protobuf-cpp-$env:protobuf_ver.zip" -OutFile c:\protobuf-cpp-$env:protobuf_ver.zip
|
|
Expand-Archive -Path c:\protobuf-cpp-$env:protobuf_ver.zip -DestinationPath c:\
|
|
Set-Location -Path C:\protobuf-$env:protobuf_ver\cmake
|
|
cmake . -G "$env:cmake_generator" -T "$env:cmake_toolset" -Dprotobuf_BUILD_TESTS=0 -Dprotobuf_MSVC_STATIC_RUNTIME=0 -DCMAKE_INSTALL_PREFIX=c:/protobuf-release
|
|
msbuild INSTALL.vcxproj /p:Configuration=Release
|
|
}
|
|
if (Test-Path c:\zlib-release) {
|
|
echo "using zlib from cache"
|
|
} else {
|
|
Invoke-WebRequest "https://github.com/madler/zlib/archive/v$env:zlib_ver.zip" -OutFile c:\zlib-$env:zlib_ver.zip
|
|
Expand-Archive -Path c:\zlib-$env:zlib_ver.zip -DestinationPath c:\
|
|
Set-Location -Path C:\zlib-$env:zlib_ver
|
|
cmake . -G "$env:cmake_generator" -T "$env:cmake_toolset" -DCMAKE_INSTALL_PREFIX=c:/zlib-release
|
|
msbuild INSTALL.vcxproj /p:Configuration=Release
|
|
}
|
|
|
|
services:
|
|
- mysql
|
|
|
|
build_script:
|
|
- ps: |
|
|
New-Item -ItemType directory -Path $env:APPVEYOR_BUILD_FOLDER\build
|
|
Set-Location -Path $env:APPVEYOR_BUILD_FOLDER\build
|
|
$zlibdir = "c:\zlib-release"
|
|
$openssldir = "C:\openssl-release"
|
|
$protodir = "c:\protobuf-release"
|
|
$protoc = "c:\protobuf-release\bin\protoc.exe"
|
|
$mysqldll = "c:\Program Files\MySQL\MySQL Server 5.7\lib\libmysql.dll"
|
|
cmake .. -G "$env:cmake_generator" -T "$env:cmake_toolset" "-DCMAKE_PREFIX_PATH=c:/Qt/$env:qt_ver;$protodir;$zlibdir;$openssldir" "-DWITH_SERVER=1" "-DPROTOBUF_PROTOC_EXECUTABLE=$protoc" "-DMYSQLCLIENT_LIBRARIES=$mysqldll"
|
|
- msbuild PACKAGE.vcxproj /p:Configuration=Release
|
|
- ps: |
|
|
$exe = dir -name *.exe
|
|
$new_name = $exe.Replace(".exe", "-${env:target_arch}.exe")
|
|
Push-AppveyorArtifact $exe -FileName $new_name
|
|
$cmake_name = $exe.Replace(".exe", "-${env:target_arch}.cmake.txt")
|
|
Push-AppveyorArtifact CMakeCache.txt -FileName $cmake_name
|
|
$json = New-Object PSObject
|
|
(New-Object PSObject | Add-Member -PassThru NoteProperty bin $new_name | Add-Member -PassThru NoteProperty cmake $cmake_name | Add-Member -PassThru NoteProperty commit $env:APPVEYOR_REPO_COMMIT) | ConvertTo-JSON | Out-File -FilePath "latest-$env:target_arch" -Encoding ASCII
|
|
Push-AppveyorArtifact "latest-$env:target_arch"
|
|
$version = $matches['content']
|
|
|
|
test: off
|
|
|
|
|
|
# Builds for pull requests skip the deployment step altogether
|
|
deploy:
|
|
# Deploy configuration for "beta" releases
|
|
- provider: GitHub
|
|
auth_token:
|
|
secure: p+7wPVry2XEa6TBm9XH8IaQZbBmXQ/J2ldbGmcIxUZD3NkkPrSRRlmE7Of1CBBIO
|
|
tag: "$(APPVEYOR_REPO_TAG_NAME)"
|
|
release: "Cockatrice $(APPVEYOR_REPO_TAG_NAME)"
|
|
description: "Beta release of Cockatrice"
|
|
artifact: /.*\.exe/
|
|
force_update: true
|
|
draft: false
|
|
prerelease: true
|
|
on:
|
|
APPVEYOR_REPO_TAG: true
|
|
APPVEYOR_REPO_TAG_NAME: /([0-9]|[1-9][0-9])(\.([0-9]|[1-9][0-9])){2}-beta(\.([2-9]|[1-9][0-9]))?$/ # regex to match semver naming convention for beta pre-releases
|
|
|
|
# Deploy configuration for "stable" releases
|
|
- provider: GitHub
|
|
auth_token:
|
|
secure: p+7wPVry2XEa6TBm9XH8IaQZbBmXQ/J2ldbGmcIxUZD3NkkPrSRRlmE7Of1CBBIO
|
|
tag: "$(APPVEYOR_REPO_TAG_NAME)"
|
|
release: "Cockatrice $(APPVEYOR_REPO_TAG_NAME)"
|
|
artifact: /.*\.exe/
|
|
force_update: true
|
|
draft: false
|
|
prerelease: false
|
|
on:
|
|
APPVEYOR_REPO_TAG: true
|
|
APPVEYOR_REPO_TAG_NAME: /([0-9]|[1-9][0-9])(\.([0-9]|[1-9][0-9])){2}$/ # regex to match semver naming convention for stable full releases
|
|
|
|
|
|
# official validator for ".appveyor.yml" config file: https://ci.appveyor.com/tools/validate-yaml
|
|
# appveyor config documentation: https://www.appveyor.com/docs/build-configuration/
|