Skip to content

Commit

Permalink
Simplify interpreter-related CI config. (pantsbuild#19096)
Browse files Browse the repository at this point in the history
Now that we only publish wheels for Python 3.9 we can trim away the 
affordances for multiple Python versions in CI.

We also pin the IC for Pants itself, in pants.toml and the relevant
dists.

We also regenerate our custom tool lockfiles for just the IC we care
about. Note that are not the built-in lockfiles we ship to users, but the
internal custom ones.

This dragged in a flake8 upgrade that complained about a few unnecessary
dict comprehensions, so this fixes those.

Note that this gets rid of the cron-based extended Python testing
workflow, since all that did was run the same tests on other interpreters,
which is now moot. Plus, no one ever looked at failures in those jobs anyway.
  • Loading branch information
benjyw authored May 23, 2023
1 parent 2b09e54 commit 618d627
Show file tree
Hide file tree
Showing 22 changed files with 357 additions and 2,207 deletions.
15 changes: 2 additions & 13 deletions .github/workflows/cache_comparison.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,10 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 10
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Tell Pants to use Python ${{ matrix.python-version }}
run: 'echo "PY=python${{ matrix.python-version }}" >> $GITHUB_ENV
echo "PANTS_PYTHON_INTERPRETER_CONSTRAINTS=[''==${{ matrix.python-version
}}.*'']" >> $GITHUB_ENV
'
python-version: '3.9'
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe
- env:
Expand All @@ -46,10 +39,6 @@ jobs:
run: "dist/build-support.bin/cache_comparison_py.pex \\\n --args=\"$PANTS_ARGS\"\
\ \\\n --build-commit=\"$BUILD_COMMIT\" \\\n --source-diffspec=\"$SOURCE_DIFFSPEC\"\
\ \\\n --source-diffspec-step=$SOURCE_DIFFSPEC_STEP\n"
strategy:
matrix:
python-version:
- '3.7'
timeout-minutes: 90
name: Cache Comparison
'on':
Expand Down
29 changes: 13 additions & 16 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ jobs:
- env:
PANTS_CONFIG_FILES: +['pants.ci.toml','pants.ci.aarch64.toml']
name: Build wheels
run: 'USE_PY39=true ./build-support/bin/release.sh build-local-pex
run: './pants run build-support/bin/release.py -- build-local-pex
./pants run build-support/bin/release.py -- build-wheels
USE_PY39=true ./build-support/bin/release.sh build-wheels'
'
- continue-on-error: true
if: always()
name: Upload pants.log
Expand Down Expand Up @@ -102,10 +103,11 @@ jobs:
go-version: 1.19.5
- env: {}
name: Build wheels
run: 'USE_PY39=true ./build-support/bin/release.sh build-local-pex
run: './pants run build-support/bin/release.py -- build-local-pex
./pants run build-support/bin/release.py -- build-wheels
USE_PY39=true ./build-support/bin/release.sh build-wheels'
'
- continue-on-error: true
if: always()
name: Upload pants.log
Expand Down Expand Up @@ -160,10 +162,11 @@ jobs:
- env:
ARCHFLAGS: -arch x86_64
name: Build wheels
run: 'USE_PY39=true ./build-support/bin/release.sh build-local-pex
run: './pants run build-support/bin/release.py -- build-local-pex
./pants run build-support/bin/release.py -- build-wheels
USE_PY39=true ./build-support/bin/release.sh build-wheels'
'
- continue-on-error: true
if: always()
name: Upload pants.log
Expand Down Expand Up @@ -218,10 +221,11 @@ jobs:
- env:
ARCHFLAGS: -arch arm64
name: Build wheels
run: 'USE_PY39=true ./build-support/bin/release.sh build-local-pex
run: './pants run build-support/bin/release.py -- build-local-pex
./pants run build-support/bin/release.py -- build-wheels
USE_PY39=true ./build-support/bin/release.sh build-wheels'
'
- continue-on-error: true
if: always()
name: Upload pants.log
Expand Down Expand Up @@ -269,19 +273,12 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Tell Pants to use Python 3.9
run: 'echo "PY=python3.9" >> $GITHUB_ENV
echo "PANTS_PYTHON_INTERPRETER_CONSTRAINTS=[''==3.9.*'']" >> $GITHUB_ENV
'
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe
- env:
MODE: debug
USE_PY39: 'true'
name: Fetch and stabilize wheels
run: ./build-support/bin/release.sh fetch-and-stabilize --dest=dest/pypi_release
run: ./pants run build-support/bin/release.py -- fetch-and-stabilize --dest=dest/pypi_release
- name: Create Release -> Commit Mapping
run: 'tag="${{ needs.determine_ref.outputs.build-ref }}"
Expand Down
Loading

0 comments on commit 618d627

Please sign in to comment.