summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authortbkizle <tbkizle@gmail.com>2022-01-04 06:56:11 +0100
committerCalum Lind <calumlind+deluge@gmail.com>2022-01-13 23:23:08 +0100
commitb9a208f18f3743e2e52b019170bf2a4810d38751 (patch)
treef8a03d30b4707ffd9b382a03b5bc38beb906cf6a /.github
parentRestore PY2 for 3rd-party plugins (diff)
downloaddeluge-b9a208f18f3743e2e52b019170bf2a4810d38751.tar.xz
deluge-b9a208f18f3743e2e52b019170bf2a4810d38751.zip
Update Windows Packaging
* Rename instances of win32 to generic win or the appropriate bit where applicable * Remove files used in GTK2 * Add spec file for use with PyInstaller * Remove Python bbfreeze Script * Add Github Action To Build Releases * Add Modified script to make files used by NSIS * Update Readme Closes: https://github.com/deluge-torrent/deluge/pull/331
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/cd.yml79
1 files changed, 79 insertions, 0 deletions
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
new file mode 100644
index 000000000..d65b3d262
--- /dev/null
+++ b/.github/workflows/cd.yml
@@ -0,0 +1,79 @@
+name: CD
+
+on:
+ push:
+ tags-ignore:
+ - "*.dev0"
+ pull_request:
+ branches:
+ - develop
+
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+jobs:
+ Build:
+ runs-on: windows-latest
+ strategy:
+ matrix:
+ arch: [x64, x86]
+ python: [3.9]
+ libtorrent: [1.2.15]
+
+ steps:
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python}}
+ architecture: ${{ matrix.arch }}
+
+ - name: Cache pip
+ uses: actions/cache@v2
+ with:
+ path: '%LOCALAPPDATA%\pip\Cache'
+ # Look to see if there is a cache hit for the corresponding requirements file
+ key: ${{ runner.os }}-pip-${{ hashFiles('tox.ini', 'setup.py', 'requirements*.txt') }}
+ restore-keys: |
+ ${{ runner.os }}-pip-
+ ${{ runner.os }}-
+
+ - name: Install dependencies
+ run: |
+ $WebClient = New-Object System.Net.WebClient
+ $WebClient.DownloadFile("https://github.com/deluge-torrent/gvsbuild-release/releases/download/latest/gvsbuild-py${{ matrix.python }}-vs16-${{ matrix.arch }}.zip","C:\GTK.zip")
+ 7z x C:\GTK.zip -oc:\GTK
+ $env:Path = "C:\GTK\release;C:\GTK\release\bin;C:\GTK\release\lib;$env:Path"
+ python -m pip install --upgrade pip wheel
+ $pycairopath = Get-Childitem –Path "C:\GTK\release\python\" -Include pycairo*.whl -File -Recurse -ErrorAction SilentlyContinue | select -expand FullName
+ $PyGObjectpath = Get-Childitem –Path "C:\GTK\release\python\" -Include PyGObject*.whl -File -Recurse -ErrorAction SilentlyContinue | select -expand FullName
+ pip install $pycairopath
+ pip install $PyGObjectpath
+ python -m pip install libtorrent==${{ matrix.libtorrent }}
+ pip install -r requirements.txt
+ pip install pyinstaller
+
+ - name: Install Deluge
+ run: |
+ pip install .
+ python setup.py install_scripts
+
+ - name: Freeze Deluge
+ run: |
+ $env:Path = "C:\GTK\release;C:\GTK\release\bin;C:\GTK\release\lib;$env:Path"
+ pyinstaller --clean $env:GITHUB_WORKSPACE\packaging\win\delugewin.spec --distpath $env:GITHUB_WORKSPACE\packaging\win\freeze
+
+ - name: Make Deluge Installer
+ working-directory: ./packaging/win
+ run: |
+ python setup_nsis.py
+ makensis /Darch=${{ matrix.arch }} deluge-win-installer.nsi
+
+ - uses: actions/upload-artifact@v2
+ with:
+ name: deluge-py${{matrix.python}}-lt${{matrix.libtorrent}}
+ path: packaging/win/*.exe