[build] Use new PyInstaller builds for Windows (#14273)

Authored by: bashonly
master
bashonly 15 hours ago committed by GitHub
parent a183837ec8
commit c8ede5f34d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -417,6 +417,7 @@ jobs:
compression-level: 0 compression-level: 0
windows: windows:
name: windows (${{ matrix.arch }})
needs: process needs: process
if: inputs.windows if: inputs.windows
permissions: permissions:
@ -429,24 +430,33 @@ jobs:
- arch: 'x64' - arch: 'x64'
runner: windows-2025 runner: windows-2025
python_version: '3.10' python_version: '3.10'
suffix: '' platform_tag: win_amd64
pyi_version: '6.15.0'
pyi_tag: '2025.09.08.215938'
pyi_hash: f70e327d849b29562caf01c30db60e6e8b2facb68124612bb53b04f96ffe6852
- arch: 'x86' - arch: 'x86'
runner: windows-2025 runner: windows-2025
python_version: '3.10' python_version: '3.10'
suffix: '_x86' platform_tag: win32
pyi_version: '6.15.0'
pyi_tag: '2025.09.08.215938'
pyi_hash: b9af6b49a3556d478935de2632cb7dbef41a0c226f7a8ce36efc3ca2aeab3d51
- arch: 'arm64' - arch: 'arm64'
runner: windows-11-arm runner: windows-11-arm
python_version: '3.13' # arm64 only has Python >= 3.11 available python_version: '3.13' # arm64 only has Python >= 3.11 available
suffix: '_arm64' platform_tag: win_arm64
pyi_version: '6.15.0'
pyi_tag: '2025.09.08.215938'
pyi_hash: 5dac9f802085432dd3135708e835ef4c08570c308d07c3ef8154495b76bf2a83
env: env:
CHANNEL: ${{ inputs.channel }} CHANNEL: ${{ inputs.channel }}
ORIGIN: ${{ needs.process.outputs.origin }} ORIGIN: ${{ needs.process.outputs.origin }}
VERSION: ${{ needs.process.outputs.version }} VERSION: ${{ needs.process.outputs.version }}
SUFFIX: ${{ matrix.suffix }} SUFFIX: ${{ (matrix.arch != 'x64' && format('_{0}', matrix.arch)) || '' }}
UPDATE_TO: yt-dlp/yt-dlp@2025.09.05 UPDATE_TO: yt-dlp/yt-dlp@2025.09.05
BASE_CACHE_KEY: cache-reqs-${{ github.job }}_${{ matrix.arch }}-${{ matrix.python_version }} BASE_CACHE_KEY: cache-reqs-${{ github.job }}_${{ matrix.arch }}-${{ matrix.python_version }}
# Use custom PyInstaller built with https://github.com/yt-dlp/Pyinstaller-builds PYI_REPO: https://github.com/yt-dlp/Pyinstaller-Builds
PYINSTALLER_URL: https://yt-dlp.github.io/Pyinstaller-Builds/${{ matrix.arch }}/pyinstaller-6.15.0-py3-none-any.whl PYI_WHEEL: pyinstaller-${{ matrix.pyi_version }}-py3-none-${{ matrix.platform_tag }}.whl
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@ -472,17 +482,23 @@ jobs:
- name: Install Requirements - name: Install Requirements
env: env:
ARCH: ${{ matrix.arch }} ARCH: ${{ matrix.arch }}
PYI_URL: ${{ env.PYI_REPO }}/releases/download/${{ matrix.pyi_tag }}/${{ env.PYI_WHEEL }}
PYI_HASH: ${{ matrix.pyi_hash }}
shell: pwsh shell: pwsh
run: | run: |
python -m venv /yt-dlp-build-venv python -m venv /yt-dlp-build-venv
/yt-dlp-build-venv/Scripts/Activate.ps1 /yt-dlp-build-venv/Scripts/Activate.ps1
python -m pip install -U pip
# Install custom PyInstaller build and verify hash
mkdir /pyi-wheels
python -m pip download -d /pyi-wheels --no-deps --require-hashes "pyinstaller@${Env:PYI_URL}#sha256=${Env:PYI_HASH}"
python -m pip install --force-reinstall -U "/pyi-wheels/${Env:PYI_WHEEL}"
python devscripts/install_deps.py -o --include build python devscripts/install_deps.py -o --include build
if ("${Env:ARCH}" -eq "x86") { if ("${Env:ARCH}" -eq "x86") {
python devscripts/install_deps.py python devscripts/install_deps.py
} else { } else {
python devscripts/install_deps.py --include curl-cffi python devscripts/install_deps.py --include curl-cffi
} }
python -m pip install -U "${Env:PYINSTALLER_URL}"
- name: Prepare - name: Prepare
shell: pwsh shell: pwsh
@ -516,8 +532,8 @@ jobs:
with: with:
name: build-bin-${{ github.job }}-${{ matrix.arch }} name: build-bin-${{ github.job }}-${{ matrix.arch }}
path: | path: |
dist/yt-dlp${{ matrix.suffix }}.exe dist/yt-dlp${{ env.SUFFIX }}.exe
dist/yt-dlp_win${{ matrix.suffix }}.zip dist/yt-dlp_win${{ env.SUFFIX }}.zip
compression-level: 0 compression-level: 0
meta_files: meta_files:

Loading…
Cancel
Save