mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-08-15 08:58:28 +00:00
[build] Discontinue yt-dlp_linux_armv7l
, use manylinux build strategy
Authored by: bashonly
This commit is contained in:
parent
376c1a279f
commit
5503e2eecb
116
.github/workflows/build.yml
vendored
116
.github/workflows/build.yml
vendored
@ -12,10 +12,7 @@ on:
|
|||||||
unix:
|
unix:
|
||||||
default: true
|
default: true
|
||||||
type: boolean
|
type: boolean
|
||||||
linux_static:
|
linux:
|
||||||
default: true
|
|
||||||
type: boolean
|
|
||||||
linux_arm:
|
|
||||||
default: true
|
default: true
|
||||||
type: boolean
|
type: boolean
|
||||||
macos:
|
macos:
|
||||||
@ -52,12 +49,8 @@ on:
|
|||||||
description: yt-dlp, yt-dlp.tar.gz
|
description: yt-dlp, yt-dlp.tar.gz
|
||||||
default: true
|
default: true
|
||||||
type: boolean
|
type: boolean
|
||||||
linux_static:
|
linux:
|
||||||
description: yt-dlp_linux
|
description: yt-dlp_linux, yt-dlp_linux_aarch64
|
||||||
default: true
|
|
||||||
type: boolean
|
|
||||||
linux_arm:
|
|
||||||
description: yt-dlp_linux_aarch64, yt-dlp_linux_armv7l
|
|
||||||
default: true
|
default: true
|
||||||
type: boolean
|
type: boolean
|
||||||
macos:
|
macos:
|
||||||
@ -134,13 +127,23 @@ jobs:
|
|||||||
yt-dlp.tar.gz
|
yt-dlp.tar.gz
|
||||||
compression-level: 0
|
compression-level: 0
|
||||||
|
|
||||||
linux_static:
|
linux:
|
||||||
needs: process
|
needs: process
|
||||||
if: inputs.linux_static
|
if: inputs.linux
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ matrix.runner }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- exe: yt-dlp_linux
|
||||||
|
platform: x86_64
|
||||||
|
runner: ubuntu-24.04
|
||||||
|
- exe: yt-dlp_linux_aarch64
|
||||||
|
platform: aarch64
|
||||||
|
runner: ubuntu-24.04-arm
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Build static executable
|
- name: Build executable
|
||||||
env:
|
env:
|
||||||
channel: ${{ inputs.channel }}
|
channel: ${{ inputs.channel }}
|
||||||
origin: ${{ needs.process.outputs.origin }}
|
origin: ${{ needs.process.outputs.origin }}
|
||||||
@ -148,85 +151,25 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir ~/build
|
mkdir ~/build
|
||||||
cd bundle/docker
|
cd bundle/docker
|
||||||
docker compose up --build static
|
docker compose up --build linux_${{ matrix.platform }}
|
||||||
sudo chown "${USER}:docker" ~/build/yt-dlp_linux
|
sudo chown "${USER}:docker" ~/build/${{ matrix.exe }}
|
||||||
|
chmod +x ~/build/${{ matrix.exe }}
|
||||||
|
# docker compose can fail with exit code 0, so we need to check the exe here
|
||||||
|
~/build/${{ matrix.exe }} --version
|
||||||
- name: Verify --update-to
|
- name: Verify --update-to
|
||||||
if: vars.UPDATE_TO_VERIFICATION
|
if: vars.UPDATE_TO_VERIFICATION
|
||||||
run: |
|
run: |
|
||||||
chmod +x ~/build/yt-dlp_linux
|
cp ~/build/${{ matrix.exe }} ~/build/${{ matrix.exe }}_downgraded
|
||||||
cp ~/build/yt-dlp_linux ~/build/yt-dlp_linux_downgraded
|
version="$(~/build/${{ matrix.exe }} --version)"
|
||||||
version="$(~/build/yt-dlp_linux --version)"
|
~/build/${{ matrix.exe }}_downgraded -v --update-to yt-dlp/yt-dlp@2023.03.04
|
||||||
~/build/yt-dlp_linux_downgraded -v --update-to yt-dlp/yt-dlp@2023.03.04
|
downgraded_version="$(~/build/${{ matrix.exe }}_downgraded --version)"
|
||||||
downgraded_version="$(~/build/yt-dlp_linux_downgraded --version)"
|
|
||||||
[[ "$version" != "$downgraded_version" ]]
|
[[ "$version" != "$downgraded_version" ]]
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: build-bin-${{ github.job }}
|
name: build-bin-${{ github.job }}_${{ matrix.platform }}
|
||||||
path: |
|
path: |
|
||||||
~/build/yt-dlp_linux
|
~/build/${{ matrix.exe }}
|
||||||
compression-level: 0
|
|
||||||
|
|
||||||
linux_arm:
|
|
||||||
needs: process
|
|
||||||
if: inputs.linux_arm
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write # for creating cache
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
architecture:
|
|
||||||
- armv7
|
|
||||||
- aarch64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
path: ./repo
|
|
||||||
- name: Virtualized Install, Prepare & Build
|
|
||||||
uses: yt-dlp/run-on-arch-action@v3
|
|
||||||
with:
|
|
||||||
# Ref: https://github.com/uraimo/run-on-arch-action/issues/55
|
|
||||||
env: |
|
|
||||||
GITHUB_WORKFLOW: build
|
|
||||||
githubToken: ${{ github.token }} # To cache image
|
|
||||||
arch: ${{ matrix.architecture }}
|
|
||||||
distro: ubuntu20.04 # Standalone executable should be built on minimum supported OS
|
|
||||||
dockerRunArgs: --volume "${PWD}/repo:/repo"
|
|
||||||
install: | # Installing Python 3.10 from the Deadsnakes repo raises errors
|
|
||||||
apt update
|
|
||||||
apt -y install zlib1g-dev libffi-dev python3.9 python3.9-dev python3.9-distutils python3-pip \
|
|
||||||
python3-secretstorage # Cannot build cryptography wheel in virtual armv7 environment
|
|
||||||
python3.9 -m pip install -U pip wheel 'setuptools>=71.0.2'
|
|
||||||
# XXX: Keep this in sync with pyproject.toml (it can't be accessed at this stage) and exclude secretstorage
|
|
||||||
python3.9 -m pip install -U Pyinstaller mutagen pycryptodomex brotli certifi cffi \
|
|
||||||
'requests>=2.32.2,<3' 'urllib3>=2.0.2,<3' 'websockets>=13.0'
|
|
||||||
|
|
||||||
run: |
|
|
||||||
cd repo
|
|
||||||
python3.9 devscripts/install_deps.py -o --include build
|
|
||||||
python3.9 devscripts/install_deps.py --include pyinstaller # Cached versions may be out of date
|
|
||||||
python3.9 devscripts/update-version.py -c "${{ inputs.channel }}" -r "${{ needs.process.outputs.origin }}" "${{ inputs.version }}"
|
|
||||||
python3.9 devscripts/make_lazy_extractors.py
|
|
||||||
python3.9 -m bundle.pyinstaller
|
|
||||||
|
|
||||||
if ${{ vars.UPDATE_TO_VERIFICATION && 'true' || 'false' }}; then
|
|
||||||
arch="${{ (matrix.architecture == 'armv7' && 'armv7l') || matrix.architecture }}"
|
|
||||||
chmod +x ./dist/yt-dlp_linux_${arch}
|
|
||||||
cp ./dist/yt-dlp_linux_${arch} ./dist/yt-dlp_linux_${arch}_downgraded
|
|
||||||
version="$(./dist/yt-dlp_linux_${arch} --version)"
|
|
||||||
./dist/yt-dlp_linux_${arch}_downgraded -v --update-to yt-dlp/yt-dlp@2023.03.04
|
|
||||||
downgraded_version="$(./dist/yt-dlp_linux_${arch}_downgraded --version)"
|
|
||||||
[[ "$version" != "$downgraded_version" ]]
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Upload artifacts
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: build-bin-linux_${{ matrix.architecture }}
|
|
||||||
path: | # run-on-arch-action designates armv7l as armv7
|
|
||||||
repo/dist/yt-dlp_linux_${{ (matrix.architecture == 'armv7' && 'armv7l') || matrix.architecture }}
|
|
||||||
compression-level: 0
|
compression-level: 0
|
||||||
|
|
||||||
macos:
|
macos:
|
||||||
@ -436,8 +379,7 @@ jobs:
|
|||||||
needs:
|
needs:
|
||||||
- process
|
- process
|
||||||
- unix
|
- unix
|
||||||
- linux_static
|
- linux
|
||||||
- linux_arm
|
|
||||||
- macos
|
- macos
|
||||||
- windows
|
- windows
|
||||||
- windows32
|
- windows32
|
||||||
|
@ -1,6 +1,25 @@
|
|||||||
services:
|
services:
|
||||||
static:
|
linux_x86_64:
|
||||||
build: static
|
build:
|
||||||
|
context: linux
|
||||||
|
platforms:
|
||||||
|
- "linux/amd64"
|
||||||
|
args:
|
||||||
|
BASEIMAGE: ghcr.io/bashonly/manylinux2014_x86_64_builds:latest
|
||||||
|
environment:
|
||||||
|
channel: ${channel}
|
||||||
|
origin: ${origin}
|
||||||
|
version: ${version}
|
||||||
|
volumes:
|
||||||
|
- ~/build:/build
|
||||||
|
- ../..:/yt-dlp
|
||||||
|
linux_aarch64:
|
||||||
|
build:
|
||||||
|
context: linux
|
||||||
|
platforms:
|
||||||
|
- "linux/arm64"
|
||||||
|
args:
|
||||||
|
BASEIMAGE: ghcr.io/bashonly/manylinux2014_aarch64_builds:latest
|
||||||
environment:
|
environment:
|
||||||
channel: ${channel}
|
channel: ${channel}
|
||||||
origin: ${origin}
|
origin: ${origin}
|
||||||
|
7
bundle/docker/linux/Dockerfile
Normal file
7
bundle/docker/linux/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
ARG BASEIMAGE=ghcr.io/bashonly/manylinux2014_x86_64_builds:latest
|
||||||
|
|
||||||
|
FROM $BASEIMAGE AS base
|
||||||
|
|
||||||
|
WORKDIR /yt-dlp
|
||||||
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
ENTRYPOINT /entrypoint.sh
|
11
bundle/docker/linux/entrypoint.sh
Executable file
11
bundle/docker/linux/entrypoint.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
python3.13 -m venv ~/yt-dlp-build-venv
|
||||||
|
source ~/yt-dlp-build-venv/bin/activate
|
||||||
|
python3.13 -m devscripts.install_deps -o --include build
|
||||||
|
python3.13 -m devscripts.install_deps --include secretstorage --include curl-cffi --include pyinstaller
|
||||||
|
python3.13 -m devscripts.make_lazy_extractors
|
||||||
|
python3.13 devscripts/update-version.py -c "${channel}" -r "${origin}" "${version}"
|
||||||
|
python3.13 -m bundle.pyinstaller
|
||||||
|
mv dist/* /build/
|
@ -1,21 +0,0 @@
|
|||||||
FROM alpine:3.19 as base
|
|
||||||
|
|
||||||
RUN apk --update add --no-cache \
|
|
||||||
build-base \
|
|
||||||
python3 \
|
|
||||||
pipx \
|
|
||||||
;
|
|
||||||
|
|
||||||
RUN pipx install pyinstaller
|
|
||||||
# Requires above step to prepare the shared venv
|
|
||||||
RUN ~/.local/share/pipx/shared/bin/python -m pip install -U wheel
|
|
||||||
RUN apk --update add --no-cache \
|
|
||||||
scons \
|
|
||||||
patchelf \
|
|
||||||
binutils \
|
|
||||||
;
|
|
||||||
RUN pipx install staticx
|
|
||||||
|
|
||||||
WORKDIR /yt-dlp
|
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
|
||||||
ENTRYPOINT /entrypoint.sh
|
|
@ -1,14 +0,0 @@
|
|||||||
#!/bin/ash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
source ~/.local/share/pipx/venvs/pyinstaller/bin/activate
|
|
||||||
python -m devscripts.install_deps -o --include build
|
|
||||||
python -m devscripts.install_deps --include secretstorage --include curl-cffi
|
|
||||||
python -m devscripts.make_lazy_extractors
|
|
||||||
python devscripts/update-version.py -c "${channel}" -r "${origin}" "${version}"
|
|
||||||
python -m bundle.pyinstaller
|
|
||||||
deactivate
|
|
||||||
|
|
||||||
source ~/.local/share/pipx/venvs/staticx/bin/activate
|
|
||||||
staticx /yt-dlp/dist/yt-dlp_linux /build/yt-dlp_linux
|
|
||||||
deactivate
|
|
Loading…
Reference in New Issue
Block a user