mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-07-17 15:21:14 +09:00
[cleanup] Misc (#16630)
* Fix PyPy dependency issue with cffi * Export requirements files from dependency groups * Simplify bundle targets & rework build flow * Code cleanup & type annotation fixes * Update FFmpeg-Builds status in README Authored by: bashonly
This commit is contained in:
@@ -460,7 +460,11 @@ jobs:
|
||||
/yt-dlp-build-venv/Scripts/Activate.ps1
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-pip.txt"
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-win-${Env:ARCH}-pyinstaller.txt"
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-win-${Env:ARCH}.txt"
|
||||
if (${Env:ARCH} -eq "x86") {
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-default.txt"
|
||||
} else {
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-curl-cffi.txt"
|
||||
}
|
||||
|
||||
- name: Prepare
|
||||
shell: pwsh
|
||||
|
||||
@@ -79,9 +79,9 @@ jobs:
|
||||
- name: Install test requirements
|
||||
shell: bash
|
||||
run: |
|
||||
python ./devscripts/install_deps.py --print --omit-default --include-group test > requirements.txt
|
||||
python ./devscripts/install_deps.py --print -c certifi -c requests -c urllib3 -c yt-dlp-ejs >> requirements.txt
|
||||
python -m pip install -U -r requirements.txt
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-pip.txt"
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-test.txt"
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-default.txt"
|
||||
- name: Run tests
|
||||
timeout-minutes: 15
|
||||
shell: bash
|
||||
|
||||
@@ -60,17 +60,32 @@ jobs:
|
||||
python-version: '3.14'
|
||||
- os: windows-latest
|
||||
python-version: pypy-3.11
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install test requirements
|
||||
run: python ./devscripts/install_deps.py --include-group test --include-extra curl-cffi
|
||||
|
||||
- name: Install test requirements (cpython)
|
||||
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
|
||||
run: |
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-pip.txt"
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-test.txt"
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-curl-cffi.txt"
|
||||
|
||||
- name: Install test requirements (PyPy)
|
||||
if: ${{ startsWith(matrix.python-version, 'pypy') }}
|
||||
run: |
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-pip.txt"
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-test.txt"
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-default.txt"
|
||||
|
||||
- name: Run tests
|
||||
timeout-minutes: 15
|
||||
continue-on-error: False
|
||||
|
||||
@@ -30,7 +30,9 @@ jobs:
|
||||
python-version: '3.10'
|
||||
- name: Install test requirements
|
||||
shell: bash
|
||||
run: python ./devscripts/install_deps.py --omit-default --include-group test
|
||||
run: |
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-pip.txt"
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-test.txt"
|
||||
- name: Run tests
|
||||
timeout-minutes: 15
|
||||
shell: bash
|
||||
@@ -53,7 +55,9 @@ jobs:
|
||||
with:
|
||||
python-version: '3.14'
|
||||
- name: Install dev dependencies
|
||||
run: python ./devscripts/install_deps.py --omit-default --include-group static-analysis
|
||||
run: |
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-pip.txt"
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-static-analysis.txt"
|
||||
- name: Make lazy extractors
|
||||
run: python ./devscripts/make_lazy_extractors.py
|
||||
- name: Run ruff
|
||||
|
||||
@@ -29,18 +29,24 @@ jobs:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||
with:
|
||||
python-version: "3.13" # Keep this in sync with release.yml's prepare job
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-pip.txt"
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-pyflakes.txt"
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-test.txt"
|
||||
|
||||
- name: Install requirements
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
ACTIONLINT_TARBALL: ${{ format('actionlint_{0}_linux_amd64.tar.gz', env.ACTIONLINT_VERSION) }}
|
||||
shell: bash
|
||||
run: |
|
||||
python -m devscripts.install_deps --omit-default --include-group test
|
||||
sudo apt -y install shellcheck
|
||||
python -m pip install -U pyflakes
|
||||
gh release download \
|
||||
--repo "${ACTIONLINT_REPO}" \
|
||||
--pattern "${ACTIONLINT_TARBALL}" \
|
||||
@@ -51,12 +57,15 @@ jobs:
|
||||
printf '%s %s' "${ACTIONLINT_SHA256SUM}" "${ACTIONLINT_TARBALL}" | sha256sum -c -
|
||||
tar xvzf "${ACTIONLINT_TARBALL}" actionlint
|
||||
sudo install -D --mode=755 actionlint /usr/bin/
|
||||
|
||||
- name: Run actionlint
|
||||
run: |
|
||||
actionlint -color
|
||||
|
||||
- name: Check Docker shell scripts
|
||||
run: |
|
||||
shellcheck bundle/docker/linux/*.sh
|
||||
|
||||
- name: Test GHA devscripts
|
||||
run: |
|
||||
pytest -Werror --tb=short --color=yes devscripts/setup_variables_tests.py
|
||||
@@ -72,6 +81,7 @@ jobs:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Run zizmor
|
||||
uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user