forked from rizinorg/cutter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
97 lines (86 loc) · 3.81 KB
/
.appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
version: '1.7.2-git-{build}'
image: 'Visual Studio 2015'
clone_depth: 1
# Build configuration
configuration:
- Release
# Environment
environment:
NINJA_URL: https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip
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
PYTHON: 'C:\Python36'
QMAKE: 1
DEPLOY: true
# Build: qmake vs2015 x64 shared
- ARCH: x64
PYTHON: 'C:\Python36-x64'
QMAKE: 1
DEPLOY: true
# Build: meson ninja x64 static
- ARCH: x64
PYTHON: 'C:\Python36-x64'
MESON: 1
BACKEND: ninja
DEPLOY: false
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: set "ARTIFACT_NAME=Cutter_%ARCH%"
- cmd: if defined MESON ( set "ARTIFACT_PATH=dist_%ARCH%" ) else ( set "ARTIFACT_PATH=build_%ARCH%\cutter" )
before_build:
- cmd: git submodule update --init
- cmd: python scripts\compile_python_resources.py
# Build config
build_script:
- cmd: if defined QMAKE ( call prepare_r2.bat && call build.bat CUTTER_APPVEYOR_R2DEC=true )
- cmd: if defined MESON ( python meson.py --release --dist=%ARTIFACT_PATH% --backend=%BACKEND% --jupyter --webengine )
after_build:
- cmd: if defined QMAKE ( set "PATH=%CD%\r2_dist_%ARCH%;%PATH%" && powershell scripts\bundle_r2dec.ps1 "%CD%\%ARTIFACT_PATH%" )
- 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"
- cmd: python -m pip install -I --no-compile -t "%ARTIFACT_PATH%\python36\site-packages" jupyter ipykernel==4.8.2
- cmd: if exist "%ARTIFACT_PATH%\python36\site-packages\test" ( 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: powershell -c "Get-ChildItem -Path \"%ARTIFACT_PATH%\python36\site-packages\" -Include '__pycache__' -Recurse -Force | Remove-Item -Force -Recurse"
- cmd: copy python_embed\python36.zip "%ARTIFACT_PATH%\python36\"
- cmd: copy python_embed\*.pyd "%ARTIFACT_PATH%\python36\"
- cmd: copy python_embed\sqlite3.dll "%ARTIFACT_PATH%\python36\"
- cmd: copy python_embed\python*.dll "%ARTIFACT_PATH%\"
- cmd: powershell -Command "[System.IO.File]::WriteAllLines(\"%ARTIFACT_PATH%\python36._pth\", \"python36`r`npython36\python36.zip`r`npython36\site-packages\")"
# Tests
test: off
# Artifacts
artifacts:
- path: "%ARTIFACT_PATH%"
name: "%ARTIFACT_NAME%"
deploy:
description: 'Cutter binaries'
provider: GitHub
auth_token:
secure: 2SmsqS2RaX2N5c9UwUcfBwNmMX64FfPAZFShLyxIkZXiC8vLaYCHToWxBYEuWRSk
artifact: "%ARTIFACT_NAME%"
draft: true
prerelease: false
on:
appveyor_repo_tag: true
DEPLOY: true
for:
-
branches:
only:
- master
-
skip_non_tags: true