From c11f69188f59a8340c1c62718d3d5f687fd369d3 Mon Sep 17 00:00:00 2001 From: CJ Steiner Date: Fri, 22 Nov 2024 00:08:49 -0600 Subject: [PATCH] CI: update python version, actions versions, and move to latest operating systems --- .github/workflows/ci.yml | 23 ++++++++++++----------- .github/workflows/release.yml | 18 +++++++++--------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc12d90..fb50b32 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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" @@ -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 @@ -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: | @@ -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 @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f48c6b3..e4deea1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }} @@ -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 @@ -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: @@ -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' }}