Upgrade Pants's PEX to 2.1.137. #519
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches-ignore: | |
- dependabot/** | |
pull_request: | |
defaults: | |
run: | |
shell: bash | |
concurrency: | |
group: CI-${{ github.ref }} | |
# 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/') }} | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
org-check: | |
name: Check GitHub Organization | |
if: github.repository_owner == 'pantsbuild' | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Noop | |
run: "true" | |
ci: | |
name: (${{ matrix.os }}) CI | |
needs: org-check | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, macOS-10.15-X64, macOS-11-ARM64, windows-2022] | |
env: | |
PY: python3.9 | |
SCIE_PANTS_DEV_CACHE: .scie_pants_dev_cache | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check Formatting | |
run: | | |
rustup toolchain add nightly -c rustfmt | |
cargo +nightly fmt --check --all | |
- name: Lint | |
run: cargo clippy --all | |
- name: Unit Tests | |
run: cargo test --all | |
- name: Setup Python 3.9 | |
if: ${{ matrix.os == 'ubuntu-22.04' }} | |
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" | |
- name: Cache Build and IT Artifacts | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.SCIE_PANTS_DEV_CACHE }} | |
key: ${{ matrix.os }}-scie-pants-v6 | |
- name: Build, Package & Integration Tests | |
if: ${{ matrix.os == 'macOS-10.15-X64' || matrix.os == 'macOS-11-ARM64'}} | |
run: | | |
# TODO(John Sirois): Kill --tools-pex-mismatch-warn: | |
# https://github.com/pantsbuild/scie-pants/issues/2 | |
# | |
# N.B.: Our self-hosted runners do not clean the work directory between runs like the | |
# GitHub hosted runners do; as such, the ~/.cache/pants, etc sticks around. This exposes | |
# a bug in Pants / Pex reproducibility when building PEXes where the | |
# PEX_ROOT/installed_wheels that get packaged up into a PEX may (or may not) contain | |
# bytecode if the particular wheel was ever run against in the past. This leads to varying | |
# final PEX content. | |
# | |
PANTS_BOOTSTRAP_GITHUB_API_BEARER_TOKEN=${{ secrets.GITHUB_TOKEN }} \ | |
cargo run -p package -- test --check --tools-pex-mismatch-warn | |
- name: Build, Package & Integration Tests | |
if: ${{ matrix.os == 'ubuntu-22.04' }} | |
run: | | |
cargo run -p package -- --dest-dir dist/ tools | |
docker run --rm \ | |
-v $PWD:/code \ | |
-w /code \ | |
rust:1.70.0-alpine3.18 \ | |
sh -c ' | |
apk add cmake make musl-dev perl && \ | |
cargo run -p package -- --dest-dir dist/ scie-pants | |
' | |
echo | |
echo "Running under: $(uname -a)" | |
echo | |
PANTS_BOOTSTRAP_GITHUB_API_BEARER_TOKEN=${{ secrets.GITHUB_TOKEN }} \ | |
cargo run -p package -- test \ | |
--tools-pex dist/tools.pex --scie-pants dist/scie-pants \ | |
--check \ | |
--tools-pex-mismatch-warn |