2021-01-11 18:55:59 +00:00
|
|
|
name: Build
|
2021-07-21 16:01:46 +00:00
|
|
|
on: [push, pull_request]
|
2021-01-11 18:55:59 +00:00
|
|
|
|
|
|
|
jobs:
|
2021-03-07 19:25:23 +00:00
|
|
|
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'
|
2021-08-06 18:23:56 +00:00
|
|
|
architecture: x86
|
2021-03-07 19:25:23 +00:00
|
|
|
|
|
|
|
- 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
|
2021-12-12 12:34:00 +00:00
|
|
|
New-Item -Path syncplay_v$ver -Name "syncplay.ini" -Value " "
|
2021-03-07 19:25:23 +00:00
|
|
|
|
|
|
|
- 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
|
|
|
|
|
2021-01-11 18:55:59 +00:00
|
|
|
macos:
|
|
|
|
name: Build for macOS
|
2022-11-05 22:40:30 +00:00
|
|
|
runs-on: macos-12
|
2021-01-11 18:55:59 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup Python
|
2022-11-05 22:40:30 +00:00
|
|
|
run: |
|
|
|
|
wget https://www.python.org/ftp/python/3.10.6/python-3.10.6-macos11.pkg
|
|
|
|
sudo installer -verbose -pkg ./python-3.10.6-macos11.pkg -target /
|
|
|
|
echo "/Library/Frameworks/Python.framework/Versions/3.10/bin" >> $GITHUB_PATH
|
2021-01-11 18:55:59 +00:00
|
|
|
|
|
|
|
- name: Check Python install
|
|
|
|
run: |
|
|
|
|
which python3
|
|
|
|
python3 --version
|
|
|
|
which pip3
|
|
|
|
pip3 --version
|
2022-11-05 23:01:29 +00:00
|
|
|
file $(which python3)
|
2021-01-11 18:55:59 +00:00
|
|
|
|
|
|
|
- name: Install Python dependencies
|
|
|
|
run: |
|
2022-11-05 22:40:30 +00:00
|
|
|
pip3 install -U pip setuptools wheel
|
|
|
|
pip3 install -r requirements.txt
|
|
|
|
pip3 install -r requirements_gui.txt
|
|
|
|
pip3 install py2app
|
2021-09-19 15:19:16 +00:00
|
|
|
|
2022-11-05 22:40:30 +00:00
|
|
|
- name: Install universal2 dependencies
|
|
|
|
env:
|
|
|
|
CFLAGS: -arch x86_64 -arch arm64
|
|
|
|
ARCHFLAGS: -arch x86_64 -arch arm64
|
2021-09-19 15:19:16 +00:00
|
|
|
run: |
|
2022-11-05 22:40:30 +00:00
|
|
|
pip3 uninstall zope.interface -y
|
|
|
|
pip3 install --no-binary :all: zope.interface
|
|
|
|
|
|
|
|
pip3 uninstall cffi -y
|
|
|
|
pip3 install --no-binary :all: cffi
|
|
|
|
|
|
|
|
pip3 uninstall cryptography -y
|
2022-11-05 23:01:29 +00:00
|
|
|
pip3 download --platform macosx_10_10_universal2 --only-binary :all: --no-deps --dest . cryptography==38.0.1
|
2022-11-05 22:40:30 +00:00
|
|
|
pip3 install --no-cache-dir --no-index --find-links . cryptography
|
2021-01-11 18:55:59 +00:00
|
|
|
|
|
|
|
- name: Check Python dependencies
|
|
|
|
run: |
|
2022-11-05 22:40:30 +00:00
|
|
|
python3 -c "from PySide6 import __version__; print(__version__)"
|
|
|
|
python3 -c "from PySide6.QtCore import __version__; print(__version__)"
|
|
|
|
python3 -c "from PySide6.QtCore import QLibraryInfo; print(QLibraryInfo.location(QLibraryInfo.LibrariesPath))"
|
2021-01-11 18:55:59 +00:00
|
|
|
python3 -c "import ssl; print(ssl)"
|
2022-11-05 22:40:30 +00:00
|
|
|
python3 -c "from py2app.recipes import pyside6"
|
|
|
|
python3 -c 'from distutils.sysconfig import get_config_var; print(get_config_var("LDLIBRARY"))'
|
2021-01-11 18:55:59 +00:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
python3 buildPy2app.py py2app
|
|
|
|
|
|
|
|
- name: Prepare for deployment
|
|
|
|
run: |
|
|
|
|
ls -al
|
|
|
|
export VER="$(cat syncplay/__init__.py | awk '/version/ {gsub("\047", "", $3); print $NF}')"
|
|
|
|
echo "VER=$VER" >> $GITHUB_ENV
|
|
|
|
mkdir dist_actions
|
|
|
|
ci/macos-deploy.sh
|
|
|
|
ls -al dist_actions
|
|
|
|
|
|
|
|
- name: Deploy
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: Syncplay_${{ env.VER }}.dmg
|
|
|
|
path: |
|
|
|
|
dist_actions/Syncplay_${{ env.VER }}.dmg
|
|
|
|
|
|
|
|
appimage:
|
|
|
|
name: Build AppImage
|
2021-03-09 18:03:31 +00:00
|
|
|
runs-on: ubuntu-18.04
|
2021-01-11 18:55:59 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2021-06-19 21:15:30 +00:00
|
|
|
sudo apt-get install --no-install-recommends \
|
|
|
|
libglib2.0-0 \
|
|
|
|
libxkbcommon-x11-0 \
|
2021-07-21 16:46:11 +00:00
|
|
|
libxcb1 \
|
2021-06-19 21:15:30 +00:00
|
|
|
;
|
2021-01-11 18:55:59 +00:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: ci/appimage-script.sh
|
|
|
|
|
|
|
|
- name: Prepare for deployment
|
|
|
|
run: |
|
|
|
|
ls -al
|
|
|
|
export VER="$(cat syncplay/__init__.py | awk '/version/ {gsub("\047", "", $3); print $NF}')"
|
|
|
|
echo "VER=$VER" >> $GITHUB_ENV
|
|
|
|
mkdir dist_actions
|
|
|
|
ci/appimage-deploy.sh
|
|
|
|
ls -al dist_actions
|
|
|
|
|
|
|
|
- name: Deploy
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: Syncplay-${{ env.VER }}-x86_64.AppImage
|
|
|
|
path: |
|
|
|
|
dist_actions/Syncplay-${{ env.VER }}-x86_64.AppImage
|
|
|
|
|
|
|
|
deb:
|
|
|
|
name: Build Debian package
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: ci/deb-script.sh
|
|
|
|
|
2021-01-23 19:43:39 +00:00
|
|
|
- name: Build server
|
2021-02-25 18:06:25 +00:00
|
|
|
run: ci/deb-server-script.sh
|
|
|
|
|
2021-01-11 18:55:59 +00:00
|
|
|
- name: Test
|
|
|
|
run: ci/deb-installation-test.sh
|
|
|
|
|
|
|
|
- name: Prepare for deployment
|
|
|
|
run: |
|
|
|
|
ls -al
|
|
|
|
export VER="$(cat syncplay/__init__.py | awk '/version/ {gsub("\047", "", $3); print $NF}')"
|
|
|
|
echo "VER=$VER" >> $GITHUB_ENV
|
|
|
|
mkdir dist_actions
|
|
|
|
mv /tmp/syncplay.deb dist_actions/syncplay_${VER}.deb
|
2021-01-23 19:43:39 +00:00
|
|
|
mv /tmp/syncplay-server.deb dist_actions/syncplay-server_${VER}.deb
|
2021-01-11 18:55:59 +00:00
|
|
|
ls -al dist_actions
|
|
|
|
|
2021-03-08 21:01:34 +00:00
|
|
|
- name: Deploy full deb
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: syncplay.deb
|
|
|
|
path: |
|
2021-03-08 21:04:43 +00:00
|
|
|
dist_actions/syncplay_*.deb
|
2021-03-08 21:01:34 +00:00
|
|
|
|
|
|
|
- name: Deploy server deb
|
2021-01-11 18:55:59 +00:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2021-03-08 21:02:32 +00:00
|
|
|
name: syncplay-server.deb
|
2021-01-11 18:55:59 +00:00
|
|
|
path: |
|
2021-03-08 21:04:43 +00:00
|
|
|
dist_actions/syncplay-server_*.deb
|