From 0e5b929926c5de3da45f6f4cb545f7f4dd1f0fd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quentin=20Gallou=C3=A9dec?= Date: Fri, 14 Aug 2026 20:03:41 +0000 Subject: [PATCH 1/3] CI: test only Python 3.12 on PRs, move the full version matrix to a nightly job --- .github/workflows/tests.yml | 10 +-- .github/workflows/tests_python_versions.yml | 69 +++++++++++++++++++++ 2 files changed, 72 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/tests_python_versions.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 621b81153f8..df50b9845bf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -42,10 +42,6 @@ jobs: tests: name: Tests - strategy: - matrix: - python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] - fail-fast: false runs-on: group: aws-g4dn-2xlarge container: @@ -59,10 +55,10 @@ jobs: - name: Git checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python 3.12 uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: - python-version: ${{ matrix.python-version }} + python-version: '3.12' - name: Install Make and Git run: | @@ -91,7 +87,7 @@ jobs: uses: huggingface/hf-workflows/.github/actions/post-slack@main with: slack_channel: ${{ env.CI_SLACK_CHANNEL }} - title: Results with Python ${{ matrix.python-version }} and latest dependencies + title: Results with Python 3.12 and latest dependencies status: ${{ job.status }} slack_token: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }} diff --git a/.github/workflows/tests_python_versions.yml b/.github/workflows/tests_python_versions.yml new file mode 100644 index 00000000000..330f7622772 --- /dev/null +++ b/.github/workflows/tests_python_versions.yml @@ -0,0 +1,69 @@ +name: Tests with all supported Python versions + +on: + schedule: + - cron: '0 1 * * *' # Runs daily at 1am UTC + + workflow_dispatch: + +env: + TQDM_DISABLE: 1 + CI_SLACK_CHANNEL: ${{ secrets.CI_PUSH_MAIN_CHANNEL }} + HF_TOKEN: ${{ secrets.HF_TOKEN }} + PYTORCH_CUDA_ALLOC_CONF: "expandable_segments:True" + PYTORCH_ALLOC_CONF: "expandable_segments:True" + +jobs: + tests: + name: Tests + strategy: + matrix: + python-version: ['3.10', '3.11', '3.13', '3.14'] # 3.12 is already covered by the Tests workflow + fail-fast: false + runs-on: + group: aws-g4dn-2xlarge + container: + image: pytorch/pytorch:2.8.0-cuda12.8-cudnn9-devel + options: --gpus all + defaults: + run: + shell: bash + steps: + - name: Git checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Make and Git + run: | + apt-get update && apt-get install -y make git curl + + - name: Install uv + uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 + + - name: Create Python virtual environment + run: | + uv venv + uv pip install --upgrade setuptools wheel + + - name: Install dependencies + run: | + source .venv/bin/activate + uv pip install ".[dev]" + + - name: Test with pytest + run: | + source .venv/bin/activate + make test + + - name: Post to Slack + if: always() + uses: huggingface/hf-workflows/.github/actions/post-slack@main + with: + slack_channel: ${{ env.CI_SLACK_CHANNEL }} + title: Results with Python ${{ matrix.python-version }} and latest dependencies + status: ${{ job.status }} + slack_token: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }} From 7613d79c4263ad5be1cc528ef688f4364d6c98b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quentin=20Gallou=C3=A9dec?= Date: Fri, 14 Aug 2026 20:08:04 +0000 Subject: [PATCH 2/3] better names --- .github/workflows/tests.yml | 8 ++++---- .github/workflows/tests_python_versions.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index df50b9845bf..065ccc1b2be 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -87,7 +87,7 @@ jobs: uses: huggingface/hf-workflows/.github/actions/post-slack@main with: slack_channel: ${{ env.CI_SLACK_CHANNEL }} - title: Results with Python 3.12 and latest dependencies + title: Results with latest dependencies status: ${{ job.status }} slack_token: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }} @@ -143,7 +143,7 @@ jobs: uses: huggingface/hf-workflows/.github/actions/post-slack@main with: slack_channel: ${{ env.CI_SLACK_CHANNEL }} - title: Results with Python 3.12 and dev dependencies + title: Results with dev dependencies status: ${{ job.status }} slack_token: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }} @@ -194,7 +194,7 @@ jobs: uses: huggingface/hf-workflows/.github/actions/post-slack@main with: slack_channel: ${{ env.CI_SLACK_CHANNEL }} - title: Results with Python 3.12 without optional dependencies + title: Results without optional dependencies status: ${{ job.status }} slack_token: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }} @@ -249,7 +249,7 @@ jobs: uses: huggingface/hf-workflows/.github/actions/post-slack@main with: slack_channel: ${{ env.CI_SLACK_CHANNEL }} - title: Results with Python 3.12 and minimum dependencies versions + title: Results with minimum dependencies versions status: ${{ job.status }} slack_token: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }} diff --git a/.github/workflows/tests_python_versions.yml b/.github/workflows/tests_python_versions.yml index 330f7622772..a561f24c1f9 100644 --- a/.github/workflows/tests_python_versions.yml +++ b/.github/workflows/tests_python_versions.yml @@ -64,6 +64,6 @@ jobs: uses: huggingface/hf-workflows/.github/actions/post-slack@main with: slack_channel: ${{ env.CI_SLACK_CHANNEL }} - title: Results with Python ${{ matrix.python-version }} and latest dependencies + title: Results with Python ${{ matrix.python-version }} status: ${{ job.status }} slack_token: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }} From 950e8a3699c3c5f6c3f3d9248461457f8a682067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quentin=20Gallou=C3=A9dec?= Date: Fri, 14 Aug 2026 20:57:06 +0000 Subject: [PATCH 3/3] CI: align job names with their Slack report titles --- .github/workflows/tests.yml | 4 ++-- .github/workflows/tests_python_versions.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 065ccc1b2be..2405a5647fd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -41,7 +41,7 @@ jobs: extra_args: --all-files tests: - name: Tests + name: Tests with latest dependencies runs-on: group: aws-g4dn-2xlarge container: @@ -249,7 +249,7 @@ jobs: uses: huggingface/hf-workflows/.github/actions/post-slack@main with: slack_channel: ${{ env.CI_SLACK_CHANNEL }} - title: Results with minimum dependencies versions + title: Results with minimum versions status: ${{ job.status }} slack_token: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }} diff --git a/.github/workflows/tests_python_versions.yml b/.github/workflows/tests_python_versions.yml index a561f24c1f9..c821135fae2 100644 --- a/.github/workflows/tests_python_versions.yml +++ b/.github/workflows/tests_python_versions.yml @@ -15,7 +15,7 @@ env: jobs: tests: - name: Tests + name: Tests with Python ${{ matrix.python-version }} strategy: matrix: python-version: ['3.10', '3.11', '3.13', '3.14'] # 3.12 is already covered by the Tests workflow