Migrate from AppVeyor to GitHub Actions (#399)
* Disable AppVeyor * Actions: disable other jobs * Actions: implement windows job * Use requirements * Typo in version parser * Replace type nul for PowerShell * Change Python version to 3.7 * buildPy2exe: exclude tcl and tkinter * buildPy2exe: rename zip archive to include extension * Actions for Windows: build on Python 3.8 * Re-enable build flow for other platforms * Remove AppVeyor configuration file
This commit is contained in:
parent
573e09a270
commit
73da46a9f3
@ -1,63 +0,0 @@
|
|||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
|
||||||
environment:
|
|
||||||
MINICONDA: "C:\\Miniconda"
|
|
||||||
PYTHON: "C:\\Python36"
|
|
||||||
PYTHON_VERSION: 3.6
|
|
||||||
PYTHON_ARCH: 32
|
|
||||||
|
|
||||||
platform: x86
|
|
||||||
|
|
||||||
configuration: Release
|
|
||||||
|
|
||||||
init:
|
|
||||||
- set PYTHONPATH=%PYTHON%
|
|
||||||
- set PYTHONHOME=%PYTHON%
|
|
||||||
- set PATH=%PYTHON%\Scripts;%PYTHON%;C:\Program Files (x86)\NSIS;%PATH%
|
|
||||||
- python --version
|
|
||||||
- python -m pip install -U pip setuptools wheel
|
|
||||||
- pip install -U pypiwin32==223
|
|
||||||
- pip install twisted[tls] certifi
|
|
||||||
- pip install zope.interface
|
|
||||||
- type nul > %PYTHON%\lib\site-packages\zope\__init__.py
|
|
||||||
- pip install py2exe
|
|
||||||
- pip install shiboken2==5.12.3 PySide2==5.12.3
|
|
||||||
- pip freeze
|
|
||||||
|
|
||||||
install:
|
|
||||||
- cd %APPVEYOR_BUILD_FOLDER%
|
|
||||||
- for /F "tokens=2 delims='" %%a in ('findstr version syncplay\__init__.py') do @set ver=%%a
|
|
||||||
- python buildPy2exe.py
|
|
||||||
- type nul > syncplay_v%ver%\syncplay.ini
|
|
||||||
|
|
||||||
# Not a project with an msbuild file, build done at install.
|
|
||||||
build: off
|
|
||||||
|
|
||||||
artifacts:
|
|
||||||
- path: 'syncplay_v$(ver)'
|
|
||||||
type: zip
|
|
||||||
name: Syncplay_$(ver)_Portable
|
|
||||||
|
|
||||||
- path: Syncplay-$(ver)-Setup.exe
|
|
||||||
name: Syncplay-$(ver)-Setup
|
|
||||||
|
|
||||||
# Push artefact to S3 bucket and list all
|
|
||||||
before_deploy:
|
|
||||||
- dir
|
|
||||||
#- python -c "from PySide2 import QtCore; print QtCore.QLibraryInfo.location(QtCore.QLibraryInfo.PluginsPath)"
|
|
||||||
|
|
||||||
|
|
||||||
# Deploy build to BinTray
|
|
||||||
deploy:
|
|
||||||
provider: BinTray
|
|
||||||
username: etoh
|
|
||||||
api_key:
|
|
||||||
secure: TfwB161OlDOcAz5nnmjtNjDmJw2KyCz/uB1KzN4r5/9AL3uczWNuY+k6qVGaRvOP
|
|
||||||
repo: Syncplay
|
|
||||||
package: Syncplay
|
|
||||||
subject: syncplay
|
|
||||||
version: v$(ver)
|
|
||||||
publish: true
|
|
||||||
override: true
|
|
||||||
58
.github/workflows/build.yml
vendored
58
.github/workflows/build.yml
vendored
@ -2,6 +2,64 @@ name: Build
|
|||||||
on: push
|
on: push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
windows:
|
||||||
|
name: Build for Windows
|
||||||
|
runs-on: windows-2019
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '3.8'
|
||||||
|
|
||||||
|
- name: Check Python install
|
||||||
|
run: |
|
||||||
|
which python
|
||||||
|
python --version
|
||||||
|
python -c "import struct; print(struct.calcsize('P') * 8)"
|
||||||
|
which pip
|
||||||
|
pip --version
|
||||||
|
|
||||||
|
- name: Install Python dependencies
|
||||||
|
run: |
|
||||||
|
pip3 install -U setuptools wheel pip
|
||||||
|
pip3 install -r requirements.txt
|
||||||
|
pip3 install -r requirements_gui.txt
|
||||||
|
pip3 install py2exe
|
||||||
|
|
||||||
|
- name: Check Python dependencies
|
||||||
|
run: |
|
||||||
|
python3 -c "from PySide2 import __version__; print(__version__)"
|
||||||
|
python3 -c "from PySide2.QtCore import __version__; print(__version__)"
|
||||||
|
python3 -c "from PySide2.QtCore import QLibraryInfo; print(QLibraryInfo.location(QLibraryInfo.LibrariesPath))"
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
$ver = (findstr version .\syncplay\__init__.py).split("'")[1]
|
||||||
|
echo $ver
|
||||||
|
echo "VER=$ver" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
|
python buildPy2exe.py
|
||||||
|
New-Item -Path syncplay_v$ver -Name "syncplay.ini" -Value $null
|
||||||
|
|
||||||
|
- name: Prepare for deployment
|
||||||
|
run: dir
|
||||||
|
|
||||||
|
- name: Deploy portable
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Syncplay_${{ env.VER }}_Portable
|
||||||
|
path: |
|
||||||
|
syncplay_v${{ env.VER }}
|
||||||
|
|
||||||
|
- name: Deploy installer
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Syncplay-${{ env.VER }}-Setup.exe
|
||||||
|
path: |
|
||||||
|
Syncplay-${{ env.VER }}-Setup.exe
|
||||||
|
|
||||||
macos:
|
macos:
|
||||||
name: Build for macOS
|
name: Build for macOS
|
||||||
runs-on: macos-10.15
|
runs-on: macos-10.15
|
||||||
|
|||||||
@ -118,7 +118,7 @@ NSIS_SCRIPT_TEMPLATE = r"""
|
|||||||
VIAddVersionKey /LANG=$${LANG_TURKISH} "FileVersion" "$version.0"
|
VIAddVersionKey /LANG=$${LANG_TURKISH} "FileVersion" "$version.0"
|
||||||
VIAddVersionKey /LANG=$${LANG_TURKISH} "LegalCopyright" "Syncplay"
|
VIAddVersionKey /LANG=$${LANG_TURKISH} "LegalCopyright" "Syncplay"
|
||||||
VIAddVersionKey /LANG=$${LANG_TURKISH} "FileDescription" "Syncplay"
|
VIAddVersionKey /LANG=$${LANG_TURKISH} "FileDescription" "Syncplay"
|
||||||
|
|
||||||
LangString ^SyncplayLanguage $${LANG_ENGLISH} "en"
|
LangString ^SyncplayLanguage $${LANG_ENGLISH} "en"
|
||||||
LangString ^Associate $${LANG_ENGLISH} "Associate Syncplay with multimedia files."
|
LangString ^Associate $${LANG_ENGLISH} "Associate Syncplay with multimedia files."
|
||||||
LangString ^Shortcut $${LANG_ENGLISH} "Create Shortcuts in following locations:"
|
LangString ^Shortcut $${LANG_ENGLISH} "Create Shortcuts in following locations:"
|
||||||
@ -757,14 +757,14 @@ info = dict(
|
|||||||
'dist_dir': OUT_DIR,
|
'dist_dir': OUT_DIR,
|
||||||
'packages': 'PySide2, cffi, OpenSSL, certifi',
|
'packages': 'PySide2, cffi, OpenSSL, certifi',
|
||||||
'includes': 'twisted, sys, encodings, datetime, os, time, math, urllib, ast, unicodedata, _ssl, win32pipe, win32file',
|
'includes': 'twisted, sys, encodings, datetime, os, time, math, urllib, ast, unicodedata, _ssl, win32pipe, win32file',
|
||||||
'excludes': 'venv, doctest, pdb, unittest, win32clipboard, win32pdh, win32security, win32trace, win32ui, winxpgui, win32process, Tkinter',
|
'excludes': 'venv, doctest, pdb, unittest, win32clipboard, win32pdh, win32security, win32trace, win32ui, winxpgui, win32process, tcl, tkinter',
|
||||||
'dll_excludes': 'msvcr71.dll, MSVCP90.dll, POWRPROF.dll',
|
'dll_excludes': 'msvcr71.dll, MSVCP90.dll, POWRPROF.dll',
|
||||||
'optimize': 2,
|
'optimize': 2,
|
||||||
'compressed': 1
|
'compressed': 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data_files=[("resources", resources), ("resources/lua/intf", intf_resources)],
|
data_files=[("resources", resources), ("resources/lua/intf", intf_resources)],
|
||||||
zipfile="lib/libsync",
|
zipfile="lib/libsync.zip",
|
||||||
cmdclass={"py2exe": build_installer},
|
cmdclass={"py2exe": build_installer},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user