Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: update python version, actions versions, and move to latest opera… #423

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
org-check:
name: Check GitHub Organization
if: github.repository_owner == 'pantsbuild'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Noop
run: "true"
Expand All @@ -28,12 +28,12 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macOS-10.15-X64, macOS-11-ARM64, windows-2022]
os: [ubuntu-latest, macos-latest, windows-latest]
env:
PY: python3.9
PY: python3.13
SCIE_PANTS_DEV_CACHE: .scie_pants_dev_cache
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Check Formatting
run: |
rustup toolchain add nightly -c rustfmt
Expand All @@ -42,13 +42,14 @@ jobs:
run: cargo clippy --locked --all
- name: Unit Tests
run: cargo test --all
- name: Setup Python 3.9 (Ubuntu only)
if: ${{ matrix.os == 'ubuntu-22.04' }}
- name: Setup Python 3.13 (Ubuntu only)
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/setup-python@v4
with:
# N.B.: We need Python 3.9 for running Pants goals against our tools.pex Python tools
# codebase as well as running Pants from sources in ITs.
python-version: "3.9"
python-version: "3.13"
cache: "pip"
- name: Compute cache key
id: build_it_cache_key
run: |
Expand All @@ -64,13 +65,13 @@ jobs:
# required for the PANTS_SOURCE tests, which build a version of Pants that requires an external protoc
- name: Install Protoc
uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9
if: ${{ matrix.os == 'macOS-10.15-X64' || matrix.os == 'macOS-11-ARM64' || matrix.os == 'ubuntu-22.04' }}
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'}}
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 23.x

- name: Build, Package & Integration Tests (MacOS)
if: ${{ matrix.os == 'macOS-10.15-X64' || matrix.os == 'macOS-11-ARM64'}}
if: ${{ matrix.os == 'macos-latest'}}
run: |
# TODO(John Sirois): Kill --tools-pex-mismatch-warn:
# https://github.com/pantsbuild/scie-pants/issues/2
Expand All @@ -85,13 +86,13 @@ jobs:
PANTS_BOOTSTRAP_GITHUB_API_BEARER_TOKEN=${{ secrets.GITHUB_TOKEN }} \
cargo run -p package -- test --check --tools-pex-mismatch-warn
- name: Build, Package & Integration Tests (Ubuntu)
if: ${{ matrix.os == 'ubuntu-22.04' }}
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
cargo run -p package -- --dest-dir dist/ tools
docker run --rm \
-v $PWD:/code \
-w /code \
rust:1.76.0-alpine3.19 \
rust:1.82.0-alpine3.20 \
sh -c '
apk add cmake make musl-dev perl && \
cargo run -p package -- --dest-dir dist/ scie-pants
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ jobs:
org-check:
name: Check GitHub Organization
if: ${{ github.repository_owner == 'pantsbuild' }}
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
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-latest
outputs:
release-tag: ${{ steps.determine-tag.outputs.release-tag }}
release-version: ${{ steps.determine-tag.outputs.release-version }}
Expand Down Expand Up @@ -59,24 +59,24 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-22.04, macOS-10.15-X64, macOS-11-ARM64 ]
os: [ ubuntu-latest, macos-latest ]
environment: Release
steps:
- name: Checkout scie-pants ${{ needs.determine-tag.outputs.release-tag }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ needs.determine-tag.outputs.release-tag }}
- name: Package scie-pants ${{ needs.determine-tag.outputs.release-tag }} binary
if: ${{ matrix.os != 'ubuntu-22.04' }}
if: ${{ matrix.os != 'ubuntu-latest' }}
run: cargo run -p package -- --dest-dir dist/ scie
- name: Package scie-pants ${{ needs.determine-tag.outputs.release-tag }} binary
if: ${{ matrix.os == 'ubuntu-22.04' }}
if: ${{ matrix.os != 'ubuntu-latest' }}
run: |
cargo run -p package -- --dest-dir dist/ tools
docker run --rm \
-v $PWD:/code \
-w /code \
rust:1.76.0-alpine3.19 \
rust:1.82.0-alpine3.20 \
sh -c '
apk add cmake make musl-dev perl && \
cargo run -p package -- --dest-dir dist/ scie-pants
Expand All @@ -89,7 +89,7 @@ jobs:
with:
changelog-file: ${{ github.workspace }}/CHANGES.md
version: ${{ needs.determine-tag.outputs.release-version }}
setup-python: ${{ matrix.os == 'ubuntu-22.04' }}
setup-python: ${{ matrix.os == 'ubuntu-latest' }}
- name: Create ${{ needs.determine-tag.outputs.release-tag }} Release
uses: softprops/action-gh-release@v1
env:
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
needs:
- determine-tag
- github-release
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Bump `scie-pants` version in Casks/pants.rb to ${{ needs.determine-tag.outputs.release-tag }}
if: ${{ needs.determine-tag.outputs.prerelease != 'true' }}
Expand Down
Loading