Skip to content

Commit

Permalink
Fix references to gvsbuild-release
Browse files Browse the repository at this point in the history
All files now consolidated under a single release. Optional input to build with a different version of the gvsbuild-release.
  • Loading branch information
Lord-Kamina committed Aug 24, 2024
1 parent 0fc144a commit 9aabb58
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 12 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ on:
ref:
description: "Enter a tag or commit to package"
default: ""
gvsbuild-tag:
description: "Use an alternative gvsbuild release for the windows build. Defaults to latest."
default: "latest"

jobs:
windows_package:
runs-on: windows-2022
if: (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'package'))
strategy:
matrix:
arch: [x64, x86]
python: ["3.10"]
gvsbuild-stack: ["latest"]
python: ["3.7", "3.10"]
libtorrent: [2.0.8, 1.2.19]
include:
- python: 3.7
gvsbuild-stack: older

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand All @@ -54,10 +54,18 @@ jobs:
- name: Prepare pip
run: python -m pip install wheel setuptools==70.*

- name: Determine gvsbuild release URL
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/latest/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("https://github.com/${{ github.repository_owner }}/gvsbuild-release/releases/download/${{ matrix.gvsbuild-stack }}/gvsbuild-py${{ matrix.python }}-vs17-${{ matrix.arch }}.zip","C:\GTK.zip")
$WebClient.DownloadFile("${{ steps.gvsbuild-url.outputs.gvsbuild-release-url }}/$tag/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
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ 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:
strategy:
Expand Down Expand Up @@ -78,11 +81,8 @@ jobs:
runs-on: windows-2022
strategy:
matrix:
python-version: ["3.9", "3.10"]
gvsbuild-stack: ["latest"]
include:
- python-version: 3.7
gvsbuild-stack: older
python-version: ["3.7", "3.9", "3.10"]
arch: ["x64"]

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand All @@ -97,10 +97,18 @@ jobs:
cache: "pip"
cache-dependency-path: "requirements*.txt"

- name: Determine gvsbuild release URL
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/latest/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("https://github.com/${{ github.repository_owner }}/gvsbuild-release/releases/download/${{ matrix.gvsbuild-stack }}/gvsbuild-py${{ matrix.python-version }}-vs17-x64.zip","C:\GTK.zip")
$WebClient.DownloadFile("${{ steps.gvsbuild-url.outputs.gvsbuild-release-url }}/$tag/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
Expand Down

0 comments on commit 9aabb58

Please sign in to comment.