-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update GTK stack for use in CI/CD #466
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,13 +10,19 @@ on: | |
core-dump: | ||
description: "Set to 1 to enable retrieving core dump from crashes" | ||
default: "0" | ||
gvsbuild-tag: | ||
description: "Use an alternative gvsbuild release for the windows build. Defaults to latest." | ||
default: "latest" | ||
jobs: | ||
test-linux: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
python-version: ["3.7", "3.10"] | ||
|
||
python-version: ["3.9", "3.10"] | ||
os: ["ubuntu-24.04"] | ||
include: | ||
- os: ubuntu-22.04 | ||
python-version: 3.7 | ||
runs-on: ${{ matrix.os }} | ||
Comment on lines
-15
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's keep these Linux CI changes separate from the Windows GTK changes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That'll just prolong this whole thing. The linux changes are just: keep 22.04 (which needs an older python) and add a build on a newer version of ubuntu. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we keep the scope of this PR to Win GTK only please |
||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v4 | ||
|
@@ -74,7 +80,8 @@ jobs: | |
runs-on: windows-2022 | ||
strategy: | ||
matrix: | ||
python-version: ["3.7", "3.10"] | ||
python-version: ["3.7", "3.9", "3.10"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are we including 3.9 here and removing it from package build? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm including it due to some differences in the importlib module. It's not relevant now but I think it will be to test against with some PR I've yet to submit. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's leave that to the other PR then |
||
arch: ["x64"] | ||
|
||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
|
@@ -89,6 +96,24 @@ jobs: | |
cache: "pip" | ||
cache-dependency-path: "requirements*.txt" | ||
|
||
- name: Determine gvsbuild release URL | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we are not running the gtkui tests then we should not be installing gtk here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The idea is to enable the gtk tests though. I think that might have gotten cut onto another PR though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we are not using it let's leave it out of this PR, the code is always going to be in CD.yml. Also it doesn't address the Linux GTK tests |
||
id: gvsbuild-url | ||
shell: bash | ||
run: | | ||
test -z "${{ github.event.inputs.gvsbuild-tag }}" && tag=latest || tag="${{ github.event.inputs.gvsbuild-tag }}" | ||
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 | ||
echo "gvsbuild-release-url=$URL" >> $GITHUB_OUTPUT | ||
|
||
- name: Install GTK | ||
run: | | ||
$WebClient = New-Object System.Net.WebClient | ||
$WebClient.DownloadFile("${{ steps.gvsbuild-url.outputs.gvsbuild-release-url }}/gvsbuild-py${{ matrix.python-version }}-vs17-${{matrix.arch}}.zip","C:\GTK.zip") | ||
7z x C:\GTK.zip -oc:\GTK | ||
echo "C:\GTK\release\lib" | Out-File -FilePath $env:GITHUB_PATH -Append | ||
echo "C:\GTK\release\bin" | Out-File -FilePath $env:GITHUB_PATH -Append | ||
echo "C:\GTK\release" | Out-File -FilePath $env:GITHUB_PATH -Append | ||
python -m pip install --no-index --find-links="C:\GTK\release\python" pycairo PyGObject | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install --upgrade pip wheel setuptools | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
libtorrent | ||
libtorrent==2.0.7 | ||
pytest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This shouldn't need pinned? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes because things in newer libtorrent made tests fail, so until tests are updated, it has to be. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So for CI we already have this pinned so this only affects local testing, perhaps there shouldn't be a difference but that is also a question about pinning the entire test/dev stack to known working dependencies. I really do want to fix the tests for libtorrent > 2.0.7 so keeping it unpinned serves as a reminder |
||
pytest-twisted | ||
pytest-cov | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
libtorrent | ||
twisted[tls]>=17.1 | ||
twisted[tls]>=17.1,<=24.7 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have resolved the problem with Twisted 24.10 so this can be removed |
||
twisted[tls]<23,>=17.1; sys_platform == 'win32' | ||
rencode | ||
pyopenssl | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be able to split over multiple lines to make it more readable?