forked from KmolYuan/Pyslvs-UI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
89 lines (84 loc) · 2.43 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
# AppVeyor for Pyslvs-UI
version: '{build}'
image: Visual Studio 2019
platform: x64
environment:
MSYS_DIR: C:\msys64
APPVEYOR_CONSOLE_DISABLE_PTY: true
matrix:
- COMPILER: mingw32
PY: 38
- COMPILER: mingw32
PY: 39
DEPLOY: "true"
- COMPILER: msvc
PY: 38
- COMPILER: msvc
PY: 39
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
PY: 3.8
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
PY: 3.9
DEPLOY: "true"
- APPVEYOR_BUILD_WORKER_IMAGE: macos-mojave
PY: 3.8
- APPVEYOR_BUILD_WORKER_IMAGE: macos-mojave
PY: 3.9
DEPLOY: "true"
install:
# Clone submodules
- git submodule update --init --recursive
# Install Python-dev
- cmd: IF DEFINED PYTHON_DEV choco install -y python --version %PYTHON_DEV%
# Environment variables
- cmd: set PYTHON_DIR=C:\Python%PY%-x64
- cmd: set Path=%PYTHON_DIR%;%PYTHON_DIR%\Scripts;%MSYS_DIR%\mingw64\bin;%MSYS_DIR%\usr\bin;%Path%
- sh: if [[ "$APPVEYOR_BUILD_WORKER_IMAGE" == "macos-mojave" ]]; then
brew install llvm libomp;
export PATH="/usr/local/opt/llvm/bin:${PATH}";
export LDFLAGS="-L/usr/local/opt/llvm/lib";
export CPPFLAGS="-I/usr/local/opt/llvm/include";
export CC=clang;
export CXX=clang++;
fi
- sh: source ~/venv${PY}/bin/activate
# Show Python
- python --version
- python -m pip --version
# Set Python compiler to MinGW
- cmd: platform\set_pycompiler %PYTHON_DIR% %COMPILER%
- sh: '[[ "$(uname)" == "Darwin" ]] && ln -s /usr/local/bin/greadlink /usr/local/bin/readlink || true'
# Install modules
- python -m pip install pip setuptools wheel -U
- python -m pip install -e . -U
build_script:
- cmd: bash ./scripts/pyinstaller.sh
- sh: |
if [[ "$(uname)" == "Darwin" ]]; then
bash ./scripts/pyinstaller.sh
else
bash ./scripts/appimage.sh
fi
after_build:
# PyPI (Universal)
- cmd: IF "%APPVEYOR_REPO_TAG%"=="true"
IF "%APPVEYOR_REPO_NAME%"=="KmolYuan/Pyslvs-UI" (
pip install twine &&
python -m pip wheel . --no-deps -w dist &&
twine upload dist\*.whl --skip-existing
)
artifacts:
- name: exe
path: dist/*.zip
- name: appimage
path: out/*.AppImage
deploy:
- provider: GitHub
release: Pyslvs $(APPVEYOR_REPO_TAG_NAME)
tag: $(APPVEYOR_REPO_TAG_NAME)
description: ""
auth_token: $(APPVEYOR_TOKEN)
force_update: true
on:
APPVEYOR_REPO_TAG: true
DEPLOY: "true"