This commit is contained in:
Simon Sawicki 2024-04-28 20:16:51 +02:00
parent 83ccc8582f
commit 582510fdcb
No known key found for this signature in database
2 changed files with 40 additions and 44 deletions

View File

@ -51,14 +51,14 @@ on:
required: true
default: stable
type: string
linux_static:
description: yt-dlp_linux
default: true
type: boolean
unix:
description: yt-dlp, yt-dlp.tar.gz
default: true
type: boolean
linux_static:
description: yt-dlp_linux
default: true
type: boolean
linux_arm:
description: yt-dlp_linux_aarch64, yt-dlp_linux_armv7l
default: true
@ -79,10 +79,6 @@ on:
description: yt-dlp_x86.exe
default: true
type: boolean
meta_files:
description: SHA2-256SUMS, SHA2-512SUMS, _update_spec
default: true
type: boolean
origin:
description: Origin
required: false
@ -105,39 +101,6 @@ jobs:
run: |
echo "origin=${{ inputs.origin == 'current repo' && github.repository || inputs.origin }}" | tee "$GITHUB_OUTPUT"
linux_static:
needs: process
if: inputs.linux_static
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build static executable
env:
channel: ${{ inputs.channel }}
origin: ${{ needs.process.outputs.origin }}
version: ${{ inputs.version }}
run: |
mkdir /build
cd bundle/docker
docker compose up --build static
- name: Verify --update-to
if: vars.UPDATE_TO_VERIFICATION
run: |
for binary in /build/*; do
chmod +x "${binary}"
cp "${binary}" "${binary}_downgraded"
version="$("${binary}" --version)"
"${binary}_downgraded" -v --update-to yt-dlp/yt-dlp@2023.03.04
downgraded_version="$("${binary}_downgraded" --version)"
[[ "$version" != "$downgraded_version" ]]
done
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: build-bin-${{ github.job }}
path: /build/*
compression-level: 0
unix:
needs: process
if: inputs.unix
@ -178,6 +141,39 @@ jobs:
yt-dlp.tar.gz
compression-level: 0
linux_static:
needs: process
if: inputs.linux_static
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build static executable
env:
channel: ${{ inputs.channel }}
origin: ${{ needs.process.outputs.origin }}
version: ${{ inputs.version }}
run: |
mkdir /build
cd bundle/docker
docker compose up --build static
- name: Verify --update-to
if: vars.UPDATE_TO_VERIFICATION
run: |
for binary in /build/*; do
chmod +x "${binary}"
cp "${binary}" "${binary}_downgraded"
version="$("${binary}" --version)"
"${binary}_downgraded" -v --update-to yt-dlp/yt-dlp@2023.03.04
downgraded_version="$("${binary}_downgraded" --version)"
[[ "$version" != "$downgraded_version" ]]
done
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: build-bin-${{ github.job }}
path: /build/*
compression-level: 0
linux_arm:
needs: process
if: inputs.linux_arm

View File

@ -5,10 +5,10 @@ source ~/.local/share/pipx/venvs/pyinstaller/bin/activate
python -m devscripts.install_deps --include secretstorage
python -m devscripts.make_lazy_extractors
python devscripts/update-version.py -c "${channel}" -r "${origin}" "${version}"
python -m bundle.pyinstaller --name yt-dlp_static
python -m bundle.pyinstaller --name yt-dlp_linux
deactivate
source ~/.local/share/pipx/venvs/staticx/bin/activate
staticx /yt-dlp/dist/yt-dlp_static /build/yt-dlp_static
staticx /yt-dlp/dist/yt-dlp_linux /build/yt-dlp_linux
deactivate
chmod +rx /build/yt-dlp_static
chmod +rx /build/yt-dlp_linux