From 33a63fa92493115c561491cbd9ec0b6f26eac61e Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 31 Jan 2026 07:21:48 +0100 Subject: [PATCH 1/3] CI: parallelize better, avoid unnecessary steps --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07d330243d..e532ccb431 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,7 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 25 - needs: [lint, security] + needs: [lint] steps: - uses: actions/checkout@v4 @@ -122,7 +122,7 @@ jobs: native_tests: - needs: [lint, security] + needs: [lint] permissions: contents: read id-token: write @@ -203,7 +203,7 @@ jobs: brew bundle install - name: Configure OpenSSH SFTP server (test only) - if: ${{ runner.os == 'Linux' }} + if: ${{ runner.os == 'Linux' && !contains(matrix.toxenv, 'mypy') && !contains(matrix.toxenv, 'docs') }} run: | sudo mkdir -p /run/sshd sudo useradd -m -s /bin/bash sftpuser || true @@ -233,7 +233,7 @@ jobs: echo "BORG_TEST_SFTP_REPO=sftp://sftpuser@localhost:22/borg/sftp-repo" >> $GITHUB_ENV - name: Install and configure MinIO S3 server (test only) - if: ${{ runner.os == 'Linux' }} + if: ${{ runner.os == 'Linux' && !contains(matrix.toxenv, 'mypy') && !contains(matrix.toxenv, 'docs') }} run: | set -e arch=$(uname -m) @@ -349,7 +349,7 @@ jobs: attestations: write runs-on: ubuntu-24.04 timeout-minutes: 90 - needs: [lint, security] + needs: [lint] continue-on-error: true strategy: @@ -547,7 +547,7 @@ jobs: if: true # can be used to temporarily disable the build runs-on: windows-latest timeout-minutes: 90 - needs: [lint, security] + needs: [lint] env: PY_COLORS: 1 From e78c299e713e58bc088cb58e61cc3012981bcd6b Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 31 Jan 2026 07:31:09 +0100 Subject: [PATCH 2/3] CI: remove redundant tox runs Some tox envs are run when opening a PR, so we do not need to run them again at merge time. --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e532ccb431..d211267e8b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -141,9 +141,6 @@ jobs: ] }' || '{ "include": [ - {"os": "ubuntu-22.04", "python-version": "3.10", "toxenv": "mypy"}, - {"os": "ubuntu-22.04", "python-version": "3.11", "toxenv": "docs"}, - {"os": "ubuntu-22.04", "python-version": "3.10", "toxenv": "py310-llfuse"}, {"os": "ubuntu-22.04", "python-version": "3.11", "toxenv": "py311-llfuse", "binary": "borg-linux-glibc235-x86_64-gh"}, {"os": "ubuntu-22.04-arm", "python-version": "3.11", "toxenv": "py311-llfuse", "binary": "borg-linux-glibc235-arm64-gh"}, {"os": "ubuntu-24.04", "python-version": "3.12", "toxenv": "py312-pyfuse3"}, From a2b47c7439864d3a057b234c2287b5dcab5b6192 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 31 Jan 2026 08:06:11 +0100 Subject: [PATCH 3/3] CI: cache tox environments --- .github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d211267e8b..b3abdcd02d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -179,6 +179,15 @@ jobs: ${{ runner.os }}-pip- ${{ runner.os }}- + - name: Cache tox environments + uses: actions/cache@v4 + with: + path: .tox + key: ${{ runner.os }}-tox-${{ matrix.toxenv }}-${{ hashFiles('requirements.d/development.txt', 'pyproject.toml') }} + restore-keys: | + ${{ runner.os }}-tox-${{ matrix.toxenv }}- + ${{ runner.os }}-tox- + - name: Install Linux packages if: ${{ runner.os == 'Linux' }} run: |