yubioath-flutter/appveyor.yml

90 lines
3.6 KiB
YAML
Raw Normal View History

2017-03-01 17:59:05 +03:00
# appveyor.yml
# Building, testing and deployment for Windows
# Syntax for this file:
# https://www.appveyor.com/docs/appveyor-yml
image: Visual Studio 2015
init:
# Needed for jom to work.
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
2017-03-23 12:03:24 +03:00
# Add python and Qtto PATH
2017-03-23 15:16:18 +03:00
- set PATH=%PATH%;C:\Python36\Scripts;C:\Qt\5.8\msvc2015\bin;C:\Qt\Tools\QtCreator\bin;
2017-03-01 17:59:05 +03:00
install:
# Submodules are not cloned by default
- git submodule update --init --recursive
# Swig needed for pyscard
- ps: wget https://s3.eu-central-1.amazonaws.com/yubico-deps/yubikey-manager-qt/swigwin-3.0.10.zip -OutFile swigwin-3.0.10.zip
- 7z x swigwin-3.0.10.zip
- set PATH=%PATH%;%APPVEYOR_BUILD_FOLDER%\swigwin-3.0.10
# Build and install PyOtherSide
# Reference: https://pyotherside.readthedocs.io/en/latest/#building-for-windows
- cd .\vendor\pyotherside
- ps: (Get-Content .\src\qmldir).replace('pyothersideplugin', 'pyothersideplugin1') | Set-Content .\src\qmldir
- ps: Clear-Content python.pri
2017-03-23 15:16:18 +03:00
- ps: Add-Content python.pri "PYTHON_CONFIG = python3-config`nQMAKE_LIBS += -LC:\Python36\libs -lpython36`nQMAKE_CXXFLAGS += -IC:\Python36\include`n"
2017-03-01 17:59:05 +03:00
- qmake
- jom
- jom install
- cd %APPVEYOR_BUILD_FOLDER%
before_build:
# Fix problem with symbolic link
- rm .\vendor\yubikey-manager\ykman\yubicommon
- xcopy /i /e .\vendor\yubikey-manager\vendor\yubicommon\yubicommon .\vendor\yubikey-manager\ykman\yubicommon
build_script:
- qmake yubioath-desktop.pro
- jom
after_build:
# Add libu2f-host
- mkdir libu2f-host
- ps: wget https://developers.yubico.com/libu2f-host/Releases/libu2f-host-1.1.3-win32.zip -OutFile libu2f-host-1.1.3-win32.zip
- 7z x libu2f-host-1.1.3-win32.zip -o".\libu2f-host"
2017-03-02 11:26:17 +03:00
- ps: Copy-Item .\libu2f-host\bin\*.dll .\release -Force
2017-03-01 17:59:05 +03:00
# Add ykpers
- mkdir ykpers
- ps: wget https://developers.yubico.com/yubikey-personalization/Releases/ykpers-1.17.3-win32.zip -OutFile ykpers-1.17.3-win32.zip
- 7z x ykpers-1.17.3-win32.zip -o".\ykpers"
2017-03-02 11:26:17 +03:00
- ps: Copy-Item .\ykpers\bin\*.dll .\release -Force
2017-03-01 17:59:05 +03:00
# Add libusb
- mkdir libusb
- ps: wget https://s3.eu-central-1.amazonaws.com/yubico-deps/yubikey-manager-qt/libusb-1.0.20.7z -OutFile libusb-1.0.20.7z
- 7z x libusb-1.0.20.7z -o".\libusb"
2017-03-02 11:26:17 +03:00
- ps: Copy-Item .\libusb\MS32\dll\*.dll .\release -Force
2017-03-01 17:59:05 +03:00
# Add embedded python
2017-03-23 14:56:49 +03:00
- ps: wget https://www.python.org/ftp/python/3.6.1/python-3.6.1-embed-win32.zip -OutFile python-3.6.1-embed-win32.zip
- 7z x python-3.6.1-embed-win32.zip -o".\release"
2017-03-01 17:59:05 +03:00
# Use Qt deployment tool on executable
2017-03-23 14:02:57 +03:00
- windeployqt .\release\yubioath-desktop.exe --qmldir=qml --no-system-d3d-compiler --release
# Workaround:
# Manually add pyotherside plugin to release folder.
# Should be handled by windeployqt, but doesn't seem to be when QML Settings are used (?).
2017-03-15 10:56:04 +03:00
- ps: Copy-Item C:\Qt\5.8\msvc2015\qml\io .\release -recurse
2017-03-01 17:59:05 +03:00
# Add python dependencies to release folder
2017-03-02 11:26:17 +03:00
- ps: Copy-Item .\pymodules .\release -recurse
2017-03-01 17:59:05 +03:00
# Remove .pyc files from release folder
- ps: Get-ChildItem -File -Include *.pyc -Recurse | Remove-Item -Force
- ps: Get-ChildItem -Include __pycache__ -Recurse | Remove-Item -Force
2017-03-13 14:38:53 +03:00
# Remove object files
- ps: Get-ChildItem -Include *.obj -Recurse | Remove-Item -Force
2017-03-01 17:59:05 +03:00
# Create zip for deployment
2017-03-02 11:26:17 +03:00
- 7z a yubioath-desktop-%APPVEYOR_REPO_BRANCH%-HEAD-win.zip .\release\*
2017-03-01 17:59:05 +03:00
- cd %APPVEYOR_BUILD_FOLDER%
artifacts:
- path: yubioath-desktop-%APPVEYOR_REPO_BRANCH%-HEAD-win.zip
deploy:
- provider: S3
access_key_id: $(AWS_KEY_ID)
secret_access_key: $(AWS_SECRET_KEY)
bucket: $(AWS_BUCKET)
folder: "yubioath-desktop"
region: eu-west-1
set_public: true