Skip to content

Commit

Permalink
Fixup devpi and trim CI to 20 shards.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirois committed Feb 9, 2025
1 parent cfe1610 commit 3971bf0
Show file tree
Hide file tree
Showing 4 changed files with 422 additions and 342 deletions.
46 changes: 12 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,20 @@ concurrency:
# Queue on all branches and tags, but only cancel overlapping PR burns.
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/') }}
jobs:
org-check:
setup:
name: Check GitHub Organization
if: github.repository_owner == 'pex-tool'
runs-on: ubuntu-24.04
steps:
- name: Noop
run: "true"
matrix-variables:
name: Propagate variables to matrices
needs: org-check
outputs:
pex_test_posargs: ${{ env._PEX_TEST_POS_ARGS }}
runs-on: ubuntu-24.04
steps:
- name: Set output variables
- name: Noop
if: false
run: |
echo "This is a dummy step that will never run."
checks:
name: tox -e format-check,lint-check,typecheck,enum-check,vendor-check,package,docs
needs: org-check
needs: setup
runs-on: ubuntu-24.04
steps:
- name: Checkout Pex
Expand Down Expand Up @@ -77,18 +70,15 @@ jobs:
# particular, the tox-env matrix list is used to ensure the cache covers all Linux CI jobs.
linux-tests:
name: "Linux: ./dtox.sh -e ${{ matrix.tox-env }} ${{ matrix.pex-test-pos-args }}"
needs: org-check
needs: setup
runs-on: ubuntu-24.04
strategy:
matrix:
include:
# Unit tests:
# -----------
- tox-env: py27-pip20
- tox-env: py38-pip22_3_1
- tox-env: py311-pip23_3_2
- tox-env: py313-pip25_0
- tox-env: py314-pip25_0
- tox-env: pypy310-pip24_3_1

# Integration tests, split most into two shards:
Expand All @@ -102,11 +92,6 @@ jobs:
- tox-env: py38-pip22_3_1-integration
pex-test-pos-args: --shard 2/2

- tox-env: py311-pip23_3_2-integration
pex-test-pos-args: --shard 1/2
- tox-env: py311-pip23_3_2-integration
pex-test-pos-args: --shard 2/2

- tox-env: py313-pip25_0-integration
pex-test-pos-args: --shard 1/2
- tox-env: py313-pip25_0-integration
Expand Down Expand Up @@ -156,30 +141,25 @@ jobs:
${{ env._PEX_TEST_POS_ARGS }} ${{ matrix.pex-test-pos-args }}
mac-tests:
name: "Mac: tox -e ${{ matrix.tox-env }} ${{ matrix.pex-test-pos-args }}"
needs:
- org-check
- matrix-variables
needs: setup
runs-on: macos-13
strategy:
matrix:
include:
- python-version: [ 3, 11 ]
tox-env: typecheck,package,docs
- python-version: [ 3, 13 ]
tox-env: py313-pip25_0
cache: true
tox-env-python: python3.11
pex-test-pos-args: ${{ needs.matrix-variables.outputs.pex_test_posargs }}
- python-version: [ 3, 13 ]
tox-env: py313-pip25_0-integration
cache: true
tox-env-python: python3.11
pex-test-pos-args: --shard 1/2 ${{ needs.matrix-variables.outputs.pex_test_posargs }}
pex-test-pos-args: --shard 1/2
- python-version: [ 3, 13 ]
tox-env: py313-pip25_0-integration
cache: true
tox-env-python: python3.11
pex-test-pos-args: --shard 2/2 ${{ needs.matrix-variables.outputs.pex_test_posargs }}
pex-test-pos-args: --shard 2/2
steps:
- name: Checkout Pex
uses: actions/checkout@v4
Expand Down Expand Up @@ -224,7 +204,7 @@ jobs:
path: repo/tox.ini
python: ${{ matrix.tox-env-python }}
tox-env: >-
${{ matrix.tox-env }} -- ${{ matrix.pex-test-pos-args }}
${{ matrix.tox-env }} -- ${{ env._PEX_TEST_POS_ARGS }} ${{ matrix.pex-test-pos-args }}
- name: Cache Pyenv Interpreters
uses: actions/cache/save@v4
if: matrix.cache && github.ref == 'refs/heads/main'
Expand All @@ -239,9 +219,7 @@ jobs:
key: ${{ steps.restore-devpi-server.outputs.cache-primary-key }}
windows-tests:
name: "Windows: tox -e ${{ matrix.tox-env }} ${{ matrix.pex-test-pos-args }}"
needs:
- org-check
- matrix-variables
needs: setup
runs-on: windows-2022
continue-on-error: true
strategy:
Expand All @@ -254,15 +232,15 @@ jobs:
- python-version: [ 3, 13 ]
tox-env: py313-pip25_0
cache: true
pex-test-pos-args: ${{ needs.matrix-variables.outputs.pex_test_posargs }}
pex-test-pos-args: ${{ needs.setup.outputs.pex_test_posargs }}
- python-version: [ 3, 13 ]
tox-env: py313-pip25_0-integration
cache: true
pex-test-pos-args: --shard 1/2 ${{ needs.matrix-variables.outputs.pex_test_posargs }}
pex-test-pos-args: --shard 1/2 ${{ needs.setup.outputs.pex_test_posargs }}
- python-version: [ 3, 13 ]
tox-env: py313-pip25_0-integration
cache: true
pex-test-pos-args: --shard 2/2 ${{ needs.matrix-variables.outputs.pex_test_posargs }}
pex-test-pos-args: --shard 2/2 ${{ needs.setup.outputs.pex_test_posargs }}
steps:
- name: Checkout Pex
uses: actions/checkout@v4
Expand Down
Loading

0 comments on commit 3971bf0

Please sign in to comment.