Skip to content

Commit 404edd9

Browse files
committed
Update GTK stack for use in CI/CD
Clarified a little what this commit actually does.
1 parent 8df36c4 commit 404edd9

File tree

4 files changed

+46
-10
lines changed

4 files changed

+46
-10
lines changed

.github/workflows/cd.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,18 @@ on:
1616
ref:
1717
description: "Enter a tag or commit to package"
1818
default: ""
19+
gvsbuild-tag:
20+
description: "Use an alternative gvsbuild release for the windows build. Defaults to latest."
21+
default: "latest"
1922

2023
jobs:
2124
windows_package:
2225
runs-on: windows-2022
2326
if: (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'package'))
2427
strategy:
2528
matrix:
26-
arch: [x64, x86]
27-
python: ["3.9"]
29+
arch: [x64]
30+
python: ["3.10"]
2831
libtorrent: [2.0.7, 1.2.19]
2932

3033
steps:
@@ -49,12 +52,20 @@ jobs:
4952
cache: pip
5053

5154
- name: Prepare pip
52-
run: python -m pip install wheel setuptools==68.*
55+
run: python -m pip install wheel setuptools==70.*
56+
57+
- name: Determine gvsbuild release URL
58+
id: gvsbuild-url
59+
shell: bash
60+
run: |
61+
test -z "${{ github.event.inputs.gvsbuild-tag }}" && tag=latest || tag="${{ github.event.inputs.gvsbuild-tag }}"
62+
if [[ "$tag" == "latest" ]]; then URL="https://github.com/${{ github.repository_owner }}/gvsbuild-release/releases/$tag/download"; else URL="https://github.com/${{ github.repository_owner }}/gvsbuild-release/releases/download/$tag" ; fi
63+
echo "gvsbuild-release-url=$URL" >> $GITHUB_OUTPUT
5364
5465
- name: Install GTK
5566
run: |
5667
$WebClient = New-Object System.Net.WebClient
57-
$WebClient.DownloadFile("https://github.com/deluge-torrent/gvsbuild-release/releases/download/latest/gvsbuild-py${{ matrix.python }}-vs16-${{ matrix.arch }}.zip","C:\GTK.zip")
68+
$WebClient.DownloadFile("${{ steps.gvsbuild-url.outputs.gvsbuild-release-url }}/gvsbuild-py${{ matrix.python }}-vs17-${{ matrix.arch }}.zip","C:\GTK.zip")
5869
7z x C:\GTK.zip -oc:\GTK
5970
echo "C:\GTK\release\lib" | Out-File -FilePath $env:GITHUB_PATH -Append
6071
echo "C:\GTK\release\bin" | Out-File -FilePath $env:GITHUB_PATH -Append

.github/workflows/ci.yml

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,19 @@ on:
1010
core-dump:
1111
description: "Set to 1 to enable retrieving core dump from crashes"
1212
default: "0"
13+
gvsbuild-tag:
14+
description: "Use an alternative gvsbuild release for the windows build. Defaults to latest."
15+
default: "latest"
1316
jobs:
1417
test-linux:
15-
runs-on: ubuntu-22.04
1618
strategy:
1719
matrix:
18-
python-version: ["3.7", "3.10"]
19-
20+
python-version: ["3.9", "3.10"]
21+
os: ["ubuntu-24.04"]
22+
include:
23+
- os: ubuntu-22.04
24+
python-version: 3.7
25+
runs-on: ${{ matrix.os }}
2026
steps:
2127
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2228
- uses: actions/checkout@v4
@@ -74,7 +80,8 @@ jobs:
7480
runs-on: windows-2022
7581
strategy:
7682
matrix:
77-
python-version: ["3.7", "3.10"]
83+
python-version: ["3.7", "3.9", "3.10"]
84+
arch: ["x64"]
7885

7986
steps:
8087
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
@@ -89,6 +96,24 @@ jobs:
8996
cache: "pip"
9097
cache-dependency-path: "requirements*.txt"
9198

99+
- name: Determine gvsbuild release URL
100+
id: gvsbuild-url
101+
shell: bash
102+
run: |
103+
test -z "${{ github.event.inputs.gvsbuild-tag }}" && tag=latest || tag="${{ github.event.inputs.gvsbuild-tag }}"
104+
if [[ "$tag" == "latest" ]]; then URL="https://github.com/${{ github.repository_owner }}/gvsbuild-release/releases/$tag/download"; else URL="https://github.com/${{ github.repository_owner }}/gvsbuild-release/releases/download/$tag" ; fi
105+
echo "gvsbuild-release-url=$URL" >> $GITHUB_OUTPUT
106+
107+
- name: Install GTK
108+
run: |
109+
$WebClient = New-Object System.Net.WebClient
110+
$WebClient.DownloadFile("${{ steps.gvsbuild-url.outputs.gvsbuild-release-url }}/gvsbuild-py${{ matrix.python-version }}-vs17-${{matrix.arch}}.zip","C:\GTK.zip")
111+
7z x C:\GTK.zip -oc:\GTK
112+
echo "C:\GTK\release\lib" | Out-File -FilePath $env:GITHUB_PATH -Append
113+
echo "C:\GTK\release\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
114+
echo "C:\GTK\release" | Out-File -FilePath $env:GITHUB_PATH -Append
115+
python -m pip install --no-index --find-links="C:\GTK\release\python" pycairo PyGObject
116+
92117
- name: Install dependencies
93118
run: |
94119
pip install --upgrade pip wheel setuptools

requirements-tests.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
libtorrent
1+
libtorrent==2.0.7
22
pytest
33
pytest-twisted
44
pytest-cov

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
libtorrent
2-
twisted[tls]>=17.1
2+
twisted[tls]>=17.1,<=24.7
33
twisted[tls]<23,>=17.1; sys_platform == 'win32'
44
rencode
55
pyopenssl

0 commit comments

Comments
 (0)