matrixion/appveyor.yml

161 lines
6.8 KiB
YAML
Raw Normal View History

---
2019-05-23 05:29:31 +03:00
version: 0.6.4-{build}
2017-04-09 17:09:22 +03:00
2018-04-22 15:37:23 +03:00
configuration: Release
image: Visual Studio 2017
2017-04-09 17:09:22 +03:00
platform: x64
2018-06-22 23:54:35 +03:00
environment:
BINTRAY_APIKEY:
secure: "iGl5mzE9/ta9kFELUxDw9XtlYMSCMai9xowXIkYzU8WKHz7NfW0mLwMJZvblZFXJ"
2018-06-22 23:54:35 +03:00
2019-12-12 01:53:23 +03:00
cache:
- c:\tools\vcpkg\installed\ -> appveyor.yml
2019-12-15 19:30:34 +03:00
- .deps -> deps\CMakeLists.txt, appveyor.yml
2018-04-25 17:52:47 +03:00
2017-04-09 17:09:22 +03:00
build:
verbosity: minimal
2017-04-09 17:09:22 +03:00
install:
2018-04-22 15:37:23 +03:00
- set QT_DIR=C:\Qt\5.10.1\msvc2017_64
2017-04-09 17:09:22 +03:00
- set PATH=%PATH%;%QT_DIR%\bin;C:\MinGW\bin
- set PATH=%PATH%;C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin
2018-04-22 15:37:23 +03:00
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
- cd "C:\Tools\vcpkg"&& git pull && .\bootstrap-vcpkg.bat && cd %APPVEYOR_BUILD_FOLDER%
2018-06-04 13:54:51 +03:00
- vcpkg install
nlohmann-json:%PLATFORM%-windows
2018-06-04 13:54:51 +03:00
boost-asio:%PLATFORM%-windows
boost-beast:%PLATFORM%-windows
boost-iostreams:%PLATFORM%-windows
boost-random:%PLATFORM%-windows
boost-signals2:%PLATFORM%-windows
boost-system:%PLATFORM%-windows
boost-thread:%PLATFORM%-windows
libsodium:%PLATFORM%-windows
lmdb:%PLATFORM%-windows
openssl:%PLATFORM%-windows
zlib:%PLATFORM%-windows
- vcpkg upgrade --no-dry-run
2017-04-09 17:09:22 +03:00
build_script:
# VERSION format: branch-master/branch-1.2
# INSTVERSION format: x.y.z
# WINVERSION format: 9999.0.0.123/1.2.0.234
2019-05-23 05:29:31 +03:00
- if "%APPVEYOR_REPO_TAG%"=="false" set INSTVERSION=0.6.4
- if "%APPVEYOR_REPO_TAG%"=="false" set VERSION=0.6.4
- if "%APPVEYOR_REPO_TAG%"=="false" if "%APPVEYOR_REPO_BRANCH%"=="master" set INSTVERSION=9999.0
- if "%APPVEYOR_REPO_TAG%"=="false" set WINVERSION=%INSTVERSION%.0.%APPVEYOR_BUILD_NUMBER%
# VERSION format: v1.2.3/v1.3.4
# INSTVERSION format: 1.2.3/1.3.4
# WINVERSION format: 1.2.3.123/1.3.4.234
- if "%APPVEYOR_REPO_TAG%"=="true" set VERSION=%APPVEYOR_REPO_TAG_NAME%
- if "%APPVEYOR_REPO_TAG%"=="true" set INSTVERSION=%VERSION:~1%
- if "%APPVEYOR_REPO_TAG%"=="true" set WINVERSION=%VERSION:~1%.%APPVEYOR_BUILD_NUMBER%
- set DATE=%date:~10,4%-%date:~4,2%-%date:~7,2%
- echo %VERSION%
- echo %INSTVERSION%
- echo %DATE%
2018-06-04 13:54:51 +03:00
# Build & install the dependencies
- cmake -G "Visual Studio 15 2017 Win64" -Hdeps -B.deps
-DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
-DUSE_BUNDLED_BOOST=OFF
-DUSE_BUNDLED_JSON=OFF
2019-05-23 05:06:45 +03:00
-DMTX_STATIC=ON
2018-06-04 13:54:51 +03:00
- cmake --build .deps --config Release
# Build nheko
- rm -f cmake/FindOlm.cmake
2018-04-22 15:37:23 +03:00
- cmake -G "Visual Studio 15 2017 Win64" -H. -Bbuild
-DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
-DLMDBXX_INCLUDE_DIR=.deps/usr/include
-DTWEENY_INCLUDE_DIR=.deps/usr/include
2018-09-11 19:25:06 +03:00
-DCMARK_INCLUDE_DIR=C:/projects/nheko/.deps/usr/include
2018-09-12 09:16:13 +03:00
-DCMARK_LIBRARY=C:/projects/nheko/.deps/usr/lib/cmark.lib
-DJSON_INCLUDE_DIR=.deps/usr/include
2017-04-24 23:28:19 +03:00
- cmake --build build --config Release
2017-04-09 17:09:22 +03:00
after_build:
# Variables
- set BUILD=%APPVEYOR_BUILD_FOLDER%
- echo %BUILD%
2017-04-09 17:09:22 +03:00
- mkdir NhekoRelease
2017-04-24 23:28:19 +03:00
- copy build\Release\nheko.exe NhekoRelease\nheko.exe
2018-04-22 15:37:23 +03:00
- windeployqt --qmldir %QT_DIR%\qml\ --release NhekoRelease\nheko.exe
2018-04-25 17:52:47 +03:00
2018-06-17 16:53:14 +03:00
- copy C:\Tools\vcpkg\installed\x64-windows\lib\*.lib .\NhekoRelease\
- copy C:\Tools\vcpkg\installed\x64-windows\bin\*.dll .\NhekoRelease\
2018-04-25 17:52:47 +03:00
- copy C:\projects\nheko\.deps\usr\lib\cmark.lib .\NhekoRelease\
- copy C:\projects\nheko\.deps\usr\bin\cmark.dll .\NhekoRelease\
2017-04-09 17:09:22 +03:00
- 7z a nheko_win_64.zip .\NhekoRelease\*
- ls -lh build\Release\
- ls -lh NhekoRelease\
2017-11-06 18:42:44 +03:00
- mkdir NhekoData
- xcopy .\NhekoRelease\*.* NhekoData\*.* /s /e /c /y
#
# Create the Qt Installer Framework version
#
- mkdir installer
- mkdir installer\config
- mkdir installer\packages
- mkdir installer\packages\com.mujx.nheko
- mkdir installer\packages\com.mujx.nheko\data
- mkdir installer\packages\com.mujx.nheko\meta
- mkdir installer\packages\com.mujx.nheko.cleanup\meta
# Copy installer data
- copy %BUILD%\resources\nheko.ico installer\config
- copy %BUILD%\resources\nheko.png installer\config
2019-05-23 05:06:45 +03:00
- copy %BUILD%\COPYING installer\packages\com.mujx.nheko\meta\license.txt
- copy %BUILD%\COPYING installer\packages\com.mujx.nheko.cleanup\meta\license.txt
- copy %BUILD%\deploy\installer\config.xml installer\config
- copy %BUILD%\deploy\installer\controlscript.qs installer\config
- copy %BUILD%\deploy\installer\uninstall.qs installer\packages\com.mujx.nheko\data
- copy %BUILD%\deploy\installer\gui\package.xml installer\packages\com.mujx.nheko\meta
- copy %BUILD%\deploy\installer\gui\installscript.qs installer\packages\com.mujx.nheko\meta
- copy %BUILD%\deploy\installer\cleanup\package.xml installer\packages\com.mujx.nheko.cleanup\meta
- copy %BUILD%\deploy\installer\cleanup\installscript.qs installer\packages\com.mujx.nheko.cleanup\meta
# Amend version and date
2019-05-23 05:29:31 +03:00
- sed -i "s/__VERSION__/0.6.4/" installer\config\config.xml
- sed -i "s/__VERSION__/0.6.4/" installer\packages\com.mujx.nheko\meta\package.xml
- sed -i "s/__VERSION__/0.6.4/" installer\packages\com.mujx.nheko.cleanup\meta\package.xml
- sed -i "s/__DATE__/%DATE%/" installer\packages\com.mujx.nheko\meta\package.xml
- sed -i "s/__DATE__/%DATE%/" installer\packages\com.mujx.nheko.cleanup\meta\package.xml
# Copy nheko data
2017-11-06 18:42:44 +03:00
- xcopy NhekoData\*.* installer\packages\com.mujx.nheko\data\*.* /s /e /c /y
- move NhekoRelease\nheko.exe installer\packages\com.mujx.nheko\data
- mkdir tools
2018-09-25 14:45:50 +03:00
- curl -L -O https://download.qt.io/official_releases/qt-installer-framework/3.0.4/QtInstallerFramework-win-x86.exe
- 7z x QtInstallerFramework-win-x86.exe -otools -aoa
- set PATH=%BUILD%\tools\bin;%PATH%
2017-11-06 18:42:44 +03:00
- binarycreator.exe -f -c installer\config\config.xml -p installer\packages nheko-installer.exe
2017-04-09 17:09:22 +03:00
2018-06-17 16:53:14 +03:00
- mv nheko-installer.exe nheko-%APPVEYOR_REPO_TAG_NAME%-installer.exe
2018-06-22 23:54:35 +03:00
on_success:
- if "%APPVEYOR_REPO_TAG%" == "true" (curl -T nheko-%APPVEYOR_REPO_TAG_NAME%-installer.exe -uredsky17:%BINTRAY_APIKEY% https://api.bintray.com/content/nheko-reborn/nheko/%APPVEYOR_REPO_TAG_NAME%/nheko/%APPVEYOR_REPO_TAG_NAME%/)
2017-11-06 00:43:49 +03:00
2018-09-21 15:04:50 +03:00
deploy:
2020-01-04 22:27:50 +03:00
- description: "Development builds"
provider: GitHub
auth_token:
secure: "ShStWeqp+TkYqJPQr7uFZb+B8ZTgC7Iwth+IkhjfRDCTLhy8gtWvlPzlQilder3E"
artifact: nheko-${APPVEYOR_REPO_TAG_NAME}-installer.exe
force_update: true
prerelease: true
on:
appveyor_repo_tag: true
- provider: S3
access_key_id: ${AWS_ACCESS_KEY}
secret_access_key: ${AWS_SECRET_KEY}
bucket: ${AWS_BUCKET_NAME}
region: ${AWS_DEFAULT_REGION}
set_public: true
artifact: nheko-$(APPVEYOR_REPO_TAG_NAME)-installer.exe, nheko_win_64.zip
2018-09-21 15:04:50 +03:00
2017-04-09 17:09:22 +03:00
artifacts:
- path: nheko_win_64.zip
2018-06-17 16:53:14 +03:00
- path: nheko-$(APPVEYOR_REPO_TAG_NAME)-installer.exe