Remove AppVeyor config (#4200)
* readability * update ci badge for windows * Delete .appveyor.yml
This commit is contained in:
parent
34e951298f
commit
37053cc909
3 changed files with 35 additions and 121 deletions
116
.appveyor.yml
116
.appveyor.yml
|
@ -1,116 +0,0 @@
|
|||
version: 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:
|
||||
- .github/
|
||||
- .tx/
|
||||
- webclient/
|
||||
- .clang-format
|
||||
- .*ignore
|
||||
- .codacy.yml
|
||||
- '**/*.md'
|
||||
- Dockerfile
|
||||
- LICENSE
|
||||
|
||||
skip_branch_with_pr: true
|
||||
|
||||
clone_depth: 15
|
||||
|
||||
image: Visual Studio 2017
|
||||
|
||||
cache:
|
||||
- c:\Tools\vcpkg\installed
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- target_arch: win64
|
||||
qt_ver: 5.12\msvc2017_64
|
||||
cmake_generator: Visual Studio 15 2017 Win64
|
||||
cmake_toolset: v141,host=x64
|
||||
vcpkg_arch: x64
|
||||
|
||||
- target_arch: win32
|
||||
qt_ver: 5.12\msvc2017
|
||||
cmake_generator: Visual Studio 15 2017
|
||||
cmake_toolset: v141
|
||||
vcpkg_arch: x86
|
||||
|
||||
install:
|
||||
- cd C:\Tools\vcpkg
|
||||
- git pull -q
|
||||
- .\bootstrap-vcpkg.bat
|
||||
- cd %APPVEYOR_BUILD_FOLDER%
|
||||
- vcpkg remove --outdated --recurse
|
||||
- vcpkg install openssl protobuf liblzma zlib gtest --triplet %vcpkg_arch%-windows
|
||||
|
||||
services:
|
||||
- mysql
|
||||
|
||||
build_script:
|
||||
- ps: |
|
||||
New-Item -ItemType directory -Path $env:APPVEYOR_BUILD_FOLDER\build
|
||||
Set-Location -Path $env:APPVEYOR_BUILD_FOLDER\build
|
||||
$vcpkgbindir = "C:\Tools\vcpkg\installed\$env:vcpkg_arch-windows\bin"
|
||||
$mysqldll = "c:\Program Files\MySQL\MySQL Server 5.7\lib\libmysql.dll"
|
||||
cmake --version
|
||||
cmake .. -G "$env:cmake_generator" -T "$env:cmake_toolset" "-DCMAKE_C_FLAGS=/MP" "-DCMAKE_CXX_FLAGS=/MP" "-DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_PREFIX_PATH=c:/Qt/$env:qt_ver;$vcpkgbindir" "-DWITH_SERVER=1" "-DMYSQLCLIENT_LIBRARIES=$mysqldll" "-DTEST=1"
|
||||
- msbuild PACKAGE.vcxproj /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /m
|
||||
- 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_script:
|
||||
- ps: |
|
||||
$env:Path += ";c:/Qt/$env:qt_ver/bin"
|
||||
ctest -T Test -C Release
|
||||
$ctest_success = $?
|
||||
$XSLInputElement = New-Object System.Xml.Xsl.XslCompiledTransform
|
||||
$XSLInputElement.Load("https://raw.githubusercontent.com/rpavlik/jenkins-ctest-plugin/master/ctest-to-junit.xsl")
|
||||
$XSLInputElement.Transform((Resolve-Path .\Testing\*\Test.xml), (Join-Path (Resolve-Path .) "ctest-to-junit-results.xml"))
|
||||
$wc = New-Object 'System.Net.WebClient'
|
||||
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\ctest-to-junit-results.xml))
|
||||
if (-not $ctest_success) { throw "Tests failed" }
|
||||
|
||||
|
||||
# Builds for pull requests skip the deployment step altogether
|
||||
deploy:
|
||||
# Deploy configuration for "beta" releases
|
||||
- provider: GitHub
|
||||
auth_token:
|
||||
secure: z8Xh1lSCYtvs0SUfhOK6AijCFk0Rgf5jAxu7QvBByR42NG1SxFHPOmyrOllkfy1u
|
||||
tag: "$(APPVEYOR_REPO_TAG_NAME)"
|
||||
release: "Cockatrice $(APPVEYOR_REPO_TAG_NAME)"
|
||||
description: "Beta release of Cockatrice"
|
||||
artifact: /.*\.exe/
|
||||
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: z8Xh1lSCYtvs0SUfhOK6AijCFk0Rgf5jAxu7QvBByR42NG1SxFHPOmyrOllkfy1u
|
||||
tag: "$(APPVEYOR_REPO_TAG_NAME)"
|
||||
release: "Cockatrice $(APPVEYOR_REPO_TAG_NAME)"
|
||||
artifact: /.*\.exe/
|
||||
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
|
||||
|
||||
|
||||
# Announcements of build image updates: https://www.appveyor.com/updates/
|
||||
# Official validator for ".appveyor.yml" config file: https://ci.appveyor.com/tools/validate-yaml
|
||||
# AppVeyor config documentation: https://www.appveyor.com/docs/build-configuration/
|
36
.github/workflows/windows-builds.yml
vendored
36
.github/workflows/windows-builds.yml
vendored
|
@ -21,13 +21,16 @@ jobs:
|
|||
env:
|
||||
QT_VERSION: '5.12.9'
|
||||
CMAKE_GENERATOR: "Visual Studio 16 2019"
|
||||
|
||||
steps:
|
||||
- name: 'Add msbuild to PATH'
|
||||
uses: microsoft/setup-msbuild@v1.0.2
|
||||
|
||||
- name: 'Checkout'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: 'Get Cockatrice git info'
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}
|
||||
|
@ -36,6 +39,7 @@ jobs:
|
|||
echo "GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
|
||||
echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||
|
||||
- name: 'Restore Qt 64-bit from cache'
|
||||
id: cache-qt32
|
||||
uses: actions/cache@v2
|
||||
|
@ -43,6 +47,7 @@ jobs:
|
|||
path: |
|
||||
${{ runner.workspace }}/Qt64
|
||||
key: ${{ runner.os }}-QtCache-64bit
|
||||
|
||||
- name: 'Install 64-bit Qt'
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
|
@ -50,6 +55,7 @@ jobs:
|
|||
version: '${{ env.QT_VERSION }}'
|
||||
arch: 'win64_msvc2017_64'
|
||||
dir: ${{ runner.workspace }}/Qt64
|
||||
|
||||
- name: 'Restore or setup vcpkg'
|
||||
uses: lukka/run-vcpkg@v6
|
||||
with:
|
||||
|
@ -57,43 +63,52 @@ jobs:
|
|||
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
|
||||
appendedCacheKey: ${{ hashFiles('**/vcpkg.txt') }}
|
||||
vcpkgTriplet: x64-windows
|
||||
|
||||
- name: 'Configure Cockatrice 64-bit'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
New-Item build64 -type directory -force
|
||||
cd build64
|
||||
cmake .. -G "${{ env.CMAKE_GENERATOR }}" -A "x64" -DQTDIR="${{ runner.workspace }}\Qt64\Qt\5.12.9\msvc2017_64" -DCMAKE_BUILD_TYPE="Release" -DWITH_SERVER=1 -DTEST=t
|
||||
|
||||
- name: 'Build Cockatrice 64-bit'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: msbuild /m /p:Configuration=Release .\build64\Cockatrice.sln
|
||||
|
||||
- name: 'Build Cockatrice Installer Package 64-bit'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
cd build64
|
||||
msbuild /m /p:Configuration=Release PACKAGE.vcxproj
|
||||
cp *.exe ../Cockatrice-${{ env.GIT_TAG }}-${{ env.GIT_HASH }}-64bit-installer.exe
|
||||
|
||||
- name: 'Run Tests'
|
||||
working-directory: ${{ github.workspace }}/build64
|
||||
run: ctest -T Test -C Release
|
||||
|
||||
- name: 'Publish'
|
||||
if: success()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: 'Cockatrice-${{ env.GIT_TAG }}-64bit'
|
||||
path: './*.exe'
|
||||
|
||||
win32:
|
||||
name: 'Windows 32-bit'
|
||||
runs-on: [windows-latest]
|
||||
env:
|
||||
QT_VERSION: '5.12.9'
|
||||
CMAKE_GENERATOR: "Visual Studio 16 2019"
|
||||
|
||||
steps:
|
||||
- name: 'Add msbuild to PATH'
|
||||
uses: microsoft/setup-msbuild@v1.0.2
|
||||
|
||||
- name: 'Checkout'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: 'Get Cockatrice git info'
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}
|
||||
|
@ -102,6 +117,7 @@ jobs:
|
|||
echo "GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
|
||||
echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||
|
||||
- name: 'Restore Qt from cache'
|
||||
id: cache-qt32
|
||||
uses: actions/cache@v2
|
||||
|
@ -109,6 +125,7 @@ jobs:
|
|||
path: |
|
||||
${{ runner.workspace }}/Qt32
|
||||
key: ${{ runner.os }}-QtCache-32bit
|
||||
|
||||
- name: 'Install 32-bit Qt'
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
|
@ -116,6 +133,7 @@ jobs:
|
|||
version: '${{ env.QT_VERSION }}'
|
||||
arch: 'win32_msvc2017'
|
||||
dir: ${{ runner.workspace }}/Qt32
|
||||
|
||||
- name: 'Restore or setup vcpkg'
|
||||
uses: lukka/run-vcpkg@v6
|
||||
with:
|
||||
|
@ -123,57 +141,68 @@ jobs:
|
|||
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
|
||||
appendedCacheKey: ${{ hashFiles('**/vcpkg.txt') }}
|
||||
vcpkgTriplet: x86-windows
|
||||
|
||||
- name: 'Configure Cockatrice 32-bit'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
New-Item build32 -type directory -force
|
||||
cd build32
|
||||
cmake .. -G "${{ env.CMAKE_GENERATOR }}" -A "Win32" -DQTDIR="${{ runner.workspace }}\Qt32\Qt\5.12.9\msvc2017" -DCMAKE_BUILD_TYPE="Release" -DWITH_SERVER=1 -DTEST=1
|
||||
|
||||
- name: 'Build Cockatrice 32-bit'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: msbuild /m /p:Configuration=Release .\build32\Cockatrice.sln
|
||||
|
||||
- name: 'Build Cockatrice Installer Package 32-bit'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
cd build32
|
||||
msbuild /m /p:Configuration=Release PACKAGE.vcxproj
|
||||
cp *.exe ../Cockatrice-${{ env.GIT_TAG }}-${{ env.GIT_HASH }}-32bit-installer.exe
|
||||
|
||||
- name: 'Run Tests'
|
||||
working-directory: ${{ github.workspace }}/build32
|
||||
run: ctest -T Test -C Release
|
||||
|
||||
- name: 'Publish'
|
||||
if: success()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: 'Cockatrice-${{ env.GIT_TAG }}-32bit'
|
||||
path: './*.exe'
|
||||
|
||||
make-release:
|
||||
name: 'Create and upload release'
|
||||
runs-on: [ubuntu-latest]
|
||||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
|
||||
needs: [win32,win64]
|
||||
|
||||
steps:
|
||||
- name: 'Checkout'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: 'Fetch git tags and generate file name'
|
||||
|
||||
- name: 'Fetch git tags'
|
||||
shell: bash
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
echo "GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
|
||||
echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||
|
||||
- name: 'Checking if beta'
|
||||
if: contains(env.GIT_TAG, 'beta')
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'IS_BETA=true' >> $GITHUB_ENV
|
||||
|
||||
- name: 'Checking if beta'
|
||||
if: "!contains(env.GIT_TAG, 'beta')"
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'IS_BETA=false' >> $GITHUB_ENV
|
||||
|
||||
- name: 'Create Release'
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
|
@ -184,15 +213,18 @@ jobs:
|
|||
release_name: Cockatrice ${{ env.GIT_TAG }}
|
||||
draft: true
|
||||
prerelease: ${{ env.IS_BETA }}
|
||||
|
||||
- name: 'Generate filenames'
|
||||
shell: bash
|
||||
run: |
|
||||
FILE_NAME=Cockatrice-${{ env.GIT_TAG }}-${{ env.GIT_HASH }}
|
||||
echo "FILE_NAME=${FILE_NAME}" >> $GITHUB_ENV
|
||||
|
||||
- name: 'Download artifacts'
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: ./
|
||||
|
||||
- name: 'Upload 32bit to release'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
|
@ -202,6 +234,7 @@ jobs:
|
|||
asset_path: ./Cockatrice-${{ env.GIT_TAG }}-32bit/${{ env.FILE_NAME }}-32bit-installer.exe
|
||||
asset_name: Cockatrice-${{ env.GIT_TAG }}-32bit-installer.exe
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- name: 'Upload 64bit to release'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
|
@ -211,4 +244,3 @@ jobs:
|
|||
asset_path: ./Cockatrice-${{ env.GIT_TAG }}-64bit/${{ env.FILE_NAME }}-64bit-installer.exe
|
||||
asset_name: Cockatrice-${{ env.GIT_TAG }}-64bit-installer.exe
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
|
|
|
@ -79,9 +79,7 @@ Cockatrice uses Transifex for translations. You can help us bring Cockatrice and
|
|||
Check out our [Translator FAQ](https://github.com/Cockatrice/Cockatrice/wiki/Translation-FAQ) for more information about contributing!<br>
|
||||
|
||||
|
||||
# Build [/badge.svg?branch=master)](https://github.com/Cockatrice/Cockatrice/actions?query=workflow%3A%22Build+on+Linux+%28Docker%29%22+branch%3Amaster) [](https://github.com/Cockatrice/Cockatrice/actions?query=workflow%3A%22Build+on+macOS%22+branch%3Amaster) [](https://ci.appveyor.com/project/ZeldaZach/cockatrice-k884w)
|
||||
|
||||
<!-- link to zachs appveyor not correct yet -->
|
||||
# Build [/badge.svg?branch=master)](https://github.com/Cockatrice/Cockatrice/actions?query=workflow%3A%22Build+on+Linux+%28Docker%29%22+branch%3Amaster) [](https://github.com/Cockatrice/Cockatrice/actions?query=workflow%3A%22Build+on+macOS%22+branch%3Amaster) [](https://github.com/Cockatrice/Cockatrice/actions?query=workflow%3A%22Build+on+Windows%22+branch%3Amaster)
|
||||
|
||||
**Detailed compiling instructions can be found on the Cockatrice wiki under [Compiling Cockatrice](https://github.com/Cockatrice/Cockatrice/wiki/Compiling-Cockatrice)**
|
||||
|
||||
|
|
Loading…
Reference in a new issue