Files
pyannote-audio/.github/workflows/ci.yml
T
ea18bc70d8 Align audio CI and releases; require Python 3.11 (#2081)
* feat(cli): add --subfolder option to benchmark command (#2063)
* fix(utils): fix `SpeakerDiarizationMixin.optimal_mapping` when `reference` is a mapping
* fix(task): fix `balance` option crashing training with `KeyError: 'metadata'` (#2067)
* fix(io): fix `Audio.crop` raising when an in-memory waveform is cropped up to its very end (#2068)
* fix(model): make Model.default_activation return identity for unsupported tasks
* fix: compute sample duration from preloaded waveform
* fix(pipeline): omit unset runtime options from model references (#2080)

Co-authored-by: abeeranajam31 <128603901+abeeranajam31@users.noreply.github.com>
Co-authored-by: antoinelaurent <antoinelaurent@me.com>
Co-authored-by: Kayvan Zahiri <123409429+Kayvan-Zahiri@users.noreply.github.com>
Co-authored-by: Mohammad Hijjawi <51020382+MohammadHijjawi97@users.noreply.github.com>
2026-10-22 15:07:01 +02:00

88 lines
2.4 KiB
YAML

name: CI
on:
pull_request:
release:
types: [published]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# lint (PR only)
# build ──┬──► test ──────────┬──► publish (release only)
# └──► version-guard ─┘
# ci-complete collects all required results.
jobs:
lint:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/lint.yml
build:
uses: ./.github/workflows/build-wheels.yml
with:
release-tag: ${{ github.event.release.tag_name || '' }}
test:
needs: build
uses: ./.github/workflows/test.yml
version-guard:
name: versions
if: github.event_name == 'release'
needs: build
uses: ./.github/workflows/version-guard.yml
with:
release-tag: ${{ github.event.release.tag_name }}
# PyPI trusted publishing must run in a top-level workflow.
publish:
if: github.event_name == 'release'
needs: [build, test, version-guard]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/pyannote-audio/
permissions:
contents: write
id-token: write
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: python-package-distributions
path: dist/
- name: Upload distributions to GitHub Release
uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
with:
tag_name: ${{ github.event.release.tag_name }}
files: |
dist/*.whl
dist/*.tar.gz
fail_on_unmatched_files: true
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
- name: Upload to PyPI
run: >-
uv publish --trusted-publishing always
--publish-url https://upload.pypi.org/legacy/
--check-url https://pypi.org/simple/
ci-complete:
if: always()
needs: [lint, build, test, version-guard, publish]
runs-on: ubuntu-latest
env:
RESULTS: ${{ join(needs.*.result, ' ') }}
steps:
- name: Check results
run: |
for result in $RESULTS; do
if [[ "$result" == failure || "$result" == cancelled ]]; then
echo "::error::Required job finished with result: $result"
exit 1
fi
done