cutter/.appveyor.yml

91 lines
3.5 KiB
YAML
Raw Normal View History

2018-03-09 15:28:04 +00:00
version: '1.3-git-{build}'
2017-10-03 12:42:31 +00:00
skip_tags: true
image: 'Visual Studio 2015'
clone_depth: 1
# Build configuration
configuration:
- Release
# Branches to build
branches:
only:
- master
- /v\d.*/
2017-10-03 12:42:31 +00:00
# Environment
environment:
NINJA_URL: https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip
2018-03-13 18:14:40 +00:00
QT32PATH: 'C:\Qt\5.9\msvc2015'
QT64PATH: 'C:\Qt\5.9\msvc2015_64'
VSVARSALLPATH: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat'
matrix:
# Build: qmake vs2015 x86 shared
- ARCH: x86
2018-02-25 19:17:03 +00:00
PYTHON: 'C:\Python36'
QMAKE: 1
BITS: 32
# Build: qmake vs2015 x64 shared
- ARCH: x64
2018-02-25 19:17:03 +00:00
PYTHON: 'C:\Python36-x64'
QMAKE: 1
BITS: 64
# Build: meson ninja x64 static
- ARCH: x64
2018-02-25 19:17:03 +00:00
PYTHON: 'C:\Python36-x64'
MESON: 1
BACKEND: ninja
install:
- cmd: set "PATH=%CD%;%PYTHON%;%PATH%"
- cmd: call "%VSVARSALLPATH%" %ARCH%
- cmd: if "%ARCH%" == "x64" ( set "PATH=%QT64PATH%\bin;%PATH%" ) else ( set "PATH=%QT32PATH%\bin;%PATH%" )
- cmd: python -m pip install meson
- cmd: powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; wget %NINJA_URL% -OutFile ninja.zip; Expand-Archive .\ninja.zip -DestinationPath ."
# Artifacts
- cmd: if defined MESON ( set "ARTIFACT_NAME=Cutter_%ARCH%_static" ) else ( set "ARTIFACT_NAME=Cutter_%ARCH%" )
- cmd: if defined MESON ( set "ARTIFACT_PATH=dist%BITS%" ) else ( set "ARTIFACT_PATH=build%BITS%\cutter" )
2017-10-03 12:42:31 +00:00
before_build:
- cmd: git submodule update --init
2017-10-03 12:42:31 +00:00
# Build config
build_script:
- cmd: if defined QMAKE ( call prepare_r2.bat && call build.bat CUTTER_ENABLE_JUPYTER CUTTER_ENABLE_QTWEBENGINE )
- cmd: if defined MESON ( python meson.py --dist=%ARTIFACT_PATH% --backend=%BACKEND% --jupyter --webengine )
after_build:
- ps: $env:py_version = (python --version).Split()[1]
- ps: $env:py_platform = If ($env:ARCH -eq "x64") {"amd64"} Else {"win32"}
- ps: $env:py_url = "https://www.python.org/ftp/python/${env:py_version}/python-${env:py_version}-embed-${env:py_platform}.zip"
- cmd: powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; wget %py_url% -OutFile python_embed.zip; Expand-Archive .\python_embed.zip -DestinationPath .\python_embed; Remove-Item -Path .\python_embed\vcruntime140.dll"
- cmd: powershell -Command "Expand-Archive .\python_embed\python36.zip -DestinationPath .\%ARTIFACT_PATH%\python36"
- cmd: rd /s /q "%ARTIFACT_PATH%\python36\lib2to3"
- cmd: python -m pip install -I --no-compile -t "%ARTIFACT_PATH%\python36\site-packages" jupyter
- cmd: rd /s /q "%ARTIFACT_PATH%\python36\site-packages\test"
- cmd: for /d %%p in ("%ARTIFACT_PATH%\python36\site-packages\*.dist-info" "%ARTIFACT_PATH%\python36\site-packages\*.egg-info") do rd /s /q "%%p"
- cmd: python -O -m compileall -b -q "%ARTIFACT_PATH%\python36\site-packages"
- cmd: del /s "%ARTIFACT_PATH%\python36\site-packages\*.py"
- cmd: copy python_embed\*.pyd "%ARTIFACT_PATH%\python36\" && copy python_embed\*.dll "%ARTIFACT_PATH%\"
- cmd: powershell -Command "[System.IO.File]::WriteAllLines(\"%ARTIFACT_PATH%\python36._pth\", \"python36`r`npython36\site-packages\")"
2017-10-08 06:23:22 +00:00
2017-10-03 12:42:31 +00:00
# Tests
test: off
2017-10-08 06:23:22 +00:00
# Artifacts
artifacts:
- path: "%ARTIFACT_PATH%"
name: "%ARTIFACT_NAME%"
deploy:
2017-10-17 09:56:04 +00:00
release: cutter-$(appveyor_build_version)
description: 'Cutter binaries (Windows)'
provider: GitHub
auth_token:
secure: 2SmsqS2RaX2N5c9UwUcfBwNmMX64FfPAZFShLyxIkZXiC8vLaYCHToWxBYEuWRSk
2017-10-16 08:32:27 +00:00
artifact: Cutter%BITS%
2017-11-20 20:37:00 +00:00
draft: true
prerelease: false
on:
2017-11-20 20:37:00 +00:00
appveyor_repo_tag: true