Merge pull request #38 from procxx/ci_appveyor

Enable CI Appveyor
This commit is contained in:
Stanislav Ershov 2017-12-21 09:31:44 +03:00 committed by GitHub
commit f6eb504ab7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 61 additions and 110 deletions

View File

@ -1,92 +0,0 @@
@echo off
IF "%BUILD_DIR%"=="" SET BUILD_DIR=C:\TBuild
SET LIB_DIR=%BUILD_DIR%\Libraries
SET SRC_DIR=%BUILD_DIR%\tdesktop
SET QT_VERSION=5_6_2
call:configureBuild
call:getDependencies
call:setupGYP
cd %SRC_DIR%
echo Finished!
GOTO:EOF
:: FUNCTIONS
:logInfo
echo [INFO] %~1
GOTO:EOF
:logError
echo [ERROR] %~1
GOTO:EOF
:getDependencies
call:logInfo "Clone dependencies repository"
git clone -q --depth 1 --branch=master https://github.com/telegramdesktop/dependencies_windows.git %LIB_DIR%
cd %LIB_DIR%
if exist prepare.bat (
call prepare.bat
) else (
call:logError "Error cloning dependencies, trying again"
rmdir %LIB_DIR% /S /Q
call:getDependencies
)
GOTO:EOF
:setupGYP
call:logInfo "Setup GYP/Ninja and generate VS solution"
cd %LIB_DIR%
git clone https://chromium.googlesource.com/external/gyp
cd gyp
git checkout a478c1ab51
SET PATH=%PATH%;%BUILD_DIR%\Libraries\gyp;%BUILD_DIR%\Libraries\ninja;
cd %SRC_DIR%
git submodule init
git submodule update
cd %SRC_DIR%\Telegram
call gyp\refresh.bat
GOTO:EOF
:configureBuild
call:logInfo "Configuring build"
call:logInfo "Build version: %BUILD_VERSION%"
set TDESKTOP_BUILD_DEFINES=
echo %BUILD_VERSION% | findstr /C:"disable_autoupdate">nul && (
set TDESKTOP_BUILD_DEFINES=%TDESKTOP_BUILD_DEFINES%,TDESKTOP_DISABLE_AUTOUPDATE
)
echo %BUILD_VERSION% | findstr /C:"disable_register_custom_scheme">nul && (
set TDESKTOP_BUILD_DEFINES=%TDESKTOP_BUILD_DEFINES%,TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME
)
echo %BUILD_VERSION% | findstr /C:"disable_crash_reports">nul && (
set TDESKTOP_BUILD_DEFINES=%TDESKTOP_BUILD_DEFINES%,TDESKTOP_DISABLE_CRASH_REPORTS
)
echo %BUILD_VERSION% | findstr /C:"disable_network_proxy">nul && (
set TDESKTOP_BUILD_DEFINES=%TDESKTOP_BUILD_DEFINES%,TDESKTOP_DISABLE_NETWORK_PROXY
)
echo %BUILD_VERSION% | findstr /C:"disable_desktop_file_generation">nul && (
set TDESKTOP_BUILD_DEFINES=%TDESKTOP_BUILD_DEFINES%,TDESKTOP_DISABLE_DESKTOP_FILE_GENERATION
)
echo %BUILD_VERSION% | findstr /C:"disable_unity_integration">nul && (
set TDESKTOP_BUILD_DEFINES=%TDESKTOP_BUILD_DEFINES%,TDESKTOP_DISABLE_UNITY_INTEGRATION
)
echo %BUILD_VERSION% | findstr /C:"disable_gtk_integration">nul && (
set TDESKTOP_BUILD_DEFINES=%TDESKTOP_BUILD_DEFINES%,TDESKTOP_DISABLE_GTK_INTEGRATION
)
if not "%TDESKTOP_BUILD_DEFINES%" == "" (
set "TDESKTOP_BUILD_DEFINES=%TDESKTOP_BUILD_DEFINES:~1%"
)
call:logInfo "Build Defines: %TDESKTOP_BUILD_DEFINES%"
GOTO:EOF

View File

@ -24,7 +24,7 @@ Provide paths to OpenAL-soft and Qt5 in CMAKE_PREFIX_PATH variable when configur
[![Version](https://badge.fury.io/gh/telegramdesktop%2Ftdesktop.svg)](https://github.com/telegramdesktop/tdesktop/releases)
[![Build Status](https://travis-ci.org/telegramdesktop/tdesktop.svg?branch=dev)](https://travis-ci.org/telegramdesktop/tdesktop)
[![Build status](https://ci.appveyor.com/api/projects/status/uiw2y768iy4i5bu8/branch/dev?svg=true)](https://ci.appveyor.com/project/telegramdesktop/tdesktop)
[![Build status](https://ci.appveyor.com/api/projects/status/2kodvgwvlua3o6hp/branch/dev?svg=true)](https://ci.appveyor.com/project/procxx/tdesktop)
[![Preview of Telegram Desktop][preview_image]][preview_image_url]

View File

@ -1,27 +1,70 @@
pull_requests:
do_not_increment_build_number: true
branches:
except:
- upstream-dev
- upstream-master
skip_branch_with_pr: true
image: Visual Studio 2017
clone_folder: C:\TBuild\tdesktop
shallow_clone: true
clone_folder: C:\projects\tdesktop
test: off
deploy: off
environment:
matrix:
- BUILD_VERSION:
- BUILD_VERSION: disable_autoupdate
- BUILD_VERSION: disable_register_custom_scheme
- BUILD_VERSION: disable_crash_reports
- BUILD_VERSION: disable_network_proxy
matrix:
fast_finish: true
before_build:
- .\.appveyor\install.bat
cache:
- c:\tools\vcpkg\installed\
build:
project: Telegram\Telegram.sln
environment:
qt_dir: C:\Qt\5.9\msvc2017_64
install:
- cmd: >-
vcpkg install --triplet x64-windows openal-soft openssl opus zlib ffmpeg
appveyor DownloadFile https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip
mkdir %APPVEYOR_BUILD_FOLDER%\build
7z x ninja-win.zip -o%APPVEYOR_BUILD_FOLDER%\build > nul
before_build:
- cmd: >-
set PATH=C:\Python35;%QT_DIR%\bin;%PATH%
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
cd %APPVEYOR_BUILD_FOLDER%\build
build_script:
- cmd: >-
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
cmake --build . --config RelWithDebInfo
after_build:
- cmd: >-
for %%f in (Qt5Core,Qt5Gui,Qt5Network,Qt5Widgets) do xcopy %QT_DIR%\bin\%%f.dll Telegram /Q /Y /I
xcopy %QT_DIR%\plugins\imageformats\qwebp.dll Telegram\imageformats\ /Q /Y /I
xcopy %QT_DIR%\plugins\imageformats\qjpeg.dll Telegram\imageformats\ /Q /Y /I
xcopy %QT_DIR%\plugins\platforms\qwindows.dll Telegram\platforms\ /Q /Y /I
7z a -mmt kepka.zip Telegram\Telegram.exe Telegram\Telegram.pdb Telegram\*.dll Telegram\platforms\* Telegram\imageformats\*
artifacts:
- path: out\Debug\Telegram.exe
name: Telegram_debug.exe
- path: out\Debug\Telegram.exe.pdb
name: Telegram_debug.exe.pdb
- path: build\kepka.zip
notifications:
- provider: GitHubPullRequest
auth_token:
secure: RTsEg5GuO6yWL2ha/fURkT9p6pzW/DS/yT0dR8Re7HsHxtQRkzaKU15n7pQdtEPN