-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build] Migrate
linux_exe
to static musl builds (#9811)
Authored by: Grub4K, bashonly Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
- Loading branch information
Showing
5 changed files
with
97 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
services: | ||
static: | ||
build: static | ||
environment: | ||
channel: ${channel} | ||
origin: ${origin} | ||
version: ${version} | ||
volumes: | ||
- ~/build:/build | ||
- ../..:/yt-dlp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/ash | ||
set -e | ||
|
||
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 | ||
deactivate | ||
|
||
source ~/.local/share/pipx/venvs/staticx/bin/activate | ||
staticx /yt-dlp/dist/yt-dlp_linux /build/yt-dlp_linux | ||
deactivate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters