Skip to content

Commit

Permalink
Upgrade CI to Ubuntu 24.04 and macOS 13. (#2544)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirois authored Sep 29, 2024
1 parent da262e7 commit 713fb0b
Show file tree
Hide file tree
Showing 8 changed files with 1,114 additions and 1,945 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ jobs:
org-check:
name: Check GitHub Organization
if: github.repository_owner == 'pex-tool'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Noop
run: "true"
checks:
name: tox -e format-check,lint-check,typecheck,vendor-check,package,docs
needs: org-check
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout Pex
uses: actions/checkout@v4
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
linux-tests:
name: ./dtox.sh -e ${{ matrix.tox-env }} ${{ matrix.pex-test-pos-args }}
needs: org-check
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
include:
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
mac-tests:
name: tox -e ${{ matrix.tox-env }} ${{ matrix.pex-test-pos-args }}
needs: org-check
runs-on: macos-12
runs-on: macos-13
strategy:
matrix:
include:
Expand Down Expand Up @@ -174,16 +174,16 @@ jobs:
uses: actions/cache/restore@v4
with:
path: ${{ env._PEX_TEST_DEV_ROOT }}/pyenv
key: macos-12-${{ runner.arch }}-pex-test-dev-root-pyenv-v1
key: macos-13-${{ runner.arch }}-pex-test-dev-root-pyenv-v1
- name: Restore Cached Devpi Server
id: restore-devpi-server
uses: actions/cache/restore@v4
with:
path: ${{ env._PEX_TEST_DEV_ROOT }}/devpi
# We're using a key suffix / restore-keys prefix trick here to get an updatable cache.
# See: https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
key: macos-12-${{ runner.arch }}-${{ matrix.tox-env }}-pex-test-dev-root-devpi-v1-${{ github.run_id }}
restore-keys: macos-12-${{ runner.arch }}-${{ matrix.tox-env }}-pex-test-dev-root-devpi-v1
key: macos-13-${{ runner.arch }}-${{ matrix.tox-env }}-pex-test-dev-root-devpi-v1-${{ github.run_id }}
restore-keys: macos-13-${{ runner.arch }}-${{ matrix.tox-env }}-pex-test-dev-root-devpi-v1
# Some ITs need this for VCS URLs of the form git+ssh://[email protected]/...
- name: Setup SSH Agent
uses: webfactory/[email protected]
Expand Down Expand Up @@ -217,7 +217,7 @@ jobs:
- checks
- linux-tests
- mac-tests
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Check Non-Success
if: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout Pex (for release-docs event)
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gen-scie-platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
matrix:
include:
- platform: Linux x86_64
os: ubuntu-22.04
os: ubuntu-24.04
docker-arch: amd64
artifact-name: linux-x86_64
- platform: Linux aarch64
os: ubuntu-22.04
os: ubuntu-24.04
docker-arch: arm64
artifact-name: linux-aarch64
- platform: macOS x86_64
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
org-check:
name: Check GitHub Organization
if: ${{ github.repository_owner == 'pex-tool' }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Noop
run: "true"
determine-tag:
name: Determine the release tag to operate against.
needs: org-check
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
outputs:
release-tag: ${{ steps.determine-tag.outputs.release-tag }}
release-version: ${{ steps.determine-tag.outputs.release-version }}
Expand All @@ -42,7 +42,7 @@ jobs:
pypi:
name: Publish sdist and wheel to PyPI
needs: determine-tag
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
environment: Release
permissions:
id-token: write
Expand All @@ -67,7 +67,7 @@ jobs:
github-release:
name: Create Github Release
needs: determine-tag
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
environment: Release
permissions:
id-token: write
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
- determine-tag
- pypi
- github-release
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Dispatch `release-docs` Event
uses: peter-evans/repository-dispatch@v3
Expand Down
2 changes: 1 addition & 1 deletion docker/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# An image with the necessary binaries and libraries to develop pex.
FROM ubuntu:22.04
FROM ubuntu:24.04

# We use pyenv to bootstrap interpreters and pyenv needs most of these packages.
# See: https://github.com/pyenv/pyenv/wiki#suggested-build-environment
Expand Down
7 changes: 6 additions & 1 deletion scripts/build-cache-image.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@ def main() -> None:

with (Path(".github") / "workflows" / "ci.yml").open() as fp:
data = yaml.full_load(fp)
tox_envs = data["jobs"]["linux-tests"]["strategy"]["matrix"]["tox-env"]
tox_envs = sorted(
set(
entry["tox-env"]
for entry in data["jobs"]["linux-tests"]["strategy"]["matrix"]["include"]
)
)

logger.info(f"Building caches for {len(tox_envs)} tox environments.")
for tox_env in tox_envs:
Expand Down
Loading

0 comments on commit 713fb0b

Please sign in to comment.