Skip to content

Scala: support Enums in dependency inference (#19588) #1348

Scala: support Enums in dependency inference (#19588)

Scala: support Enums in dependency inference (#19588) #1348

Workflow file for this run

# GENERATED, DO NOT EDIT!
# To change, edit `build-support/bin/generate_github_workflows.py` and run:
# ./pants run build-support/bin/generate_github_workflows.py
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
env:
PANTS_CONFIG_FILES: +['pants.ci.toml']
RUST_BACKTRACE: all
jobs:
bootstrap_pants_linux_arm64:
env:
PANTS_REMOTE_CACHE_READ: 'false'
PANTS_REMOTE_CACHE_WRITE: 'false'
if: (github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.docs_only != 'true')
name: Bootstrap Pants, test Rust (Linux-ARM64)
needs:
- classify_changes
runs-on:
- self-hosted
- Linux
- ARM64
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- 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
'
- name: Cache Rust toolchain
uses: actions/cache@v3
with:
key: Linux-ARM64-rustup-${{ hashFiles('rust-toolchain') }}-v2
path: '~/.rustup/toolchains/1.67.1-*
~/.rustup/update-hashes
~/.rustup/settings.toml
'
- name: Cache Cargo
uses: benjyw/rust-cache@461b9f8eee66b575bce78977bf649b8b7a8d53f1
with:
cache-bin: 'false'
shared-key: engine
workspaces: src/rust/engine
- id: get-engine-hash
name: Get native engine hash
run: echo "hash=$(./build-support/bin/rust/print_engine_hash.sh)" >> $GITHUB_OUTPUT
shell: bash
- name: Cache native engine
uses: actions/cache@v3
with:
key: Linux-ARM64-engine-${{ steps.get-engine-hash.outputs.hash }}-v1
path: '.pants
src/python/pants/engine/internals/native_engine.so
src/python/pants/engine/internals/native_engine.so.metadata'
- name: Bootstrap Pants
run: ./pants version > ${{ runner.temp }}/_pants_version.stdout && [[ -s ${{ runner.temp }}/_pants_version.stdout ]]
- name: Run smoke tests
run: './pants list ::
./pants roots
./pants help goals
./pants help targets
./pants help subsystems
'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-bootstrap-Linux-ARM64
path: .pants.d/pants.log
- name: Upload native binaries
uses: actions/upload-artifact@v3
with:
name: native_binaries.${{ matrix.python-version }}.Linux-ARM64
path: '.pants
src/python/pants/engine/internals/native_engine.so
src/python/pants/engine/internals/native_engine.so.metadata'
- env:
TMPDIR: ${{ runner.temp }}
if: needs.classify_changes.outputs.rust == 'true'
name: Test Rust
run: ./cargo test --tests -- --nocapture --test-threads=8
strategy:
matrix:
python-version:
- '3.7'
timeout-minutes: 60
bootstrap_pants_linux_x86_64:
env:
PANTS_REMOTE_CACHE_READ: 'false'
PANTS_REMOTE_CACHE_WRITE: 'false'
if: (github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.docs_only != 'true')
name: Bootstrap Pants, test and lint Rust (Linux-x86_64)
needs:
- classify_changes
runs-on:
- ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- name: Set up Python ${{ matrix.python-version }}
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
'
- name: Cache Rust toolchain
uses: actions/cache@v3
with:
key: Linux-x86_64-rustup-${{ hashFiles('rust-toolchain') }}-v2
path: '~/.rustup/toolchains/1.67.1-*
~/.rustup/update-hashes
~/.rustup/settings.toml
'
- name: Cache Cargo
uses: benjyw/rust-cache@461b9f8eee66b575bce78977bf649b8b7a8d53f1
with:
cache-bin: 'false'
shared-key: engine
workspaces: src/rust/engine
- id: get-engine-hash
name: Get native engine hash
run: echo "hash=$(./build-support/bin/rust/print_engine_hash.sh)" >> $GITHUB_OUTPUT
shell: bash
- name: Cache native engine
uses: actions/cache@v3
with:
key: Linux-x86_64-engine-${{ steps.get-engine-hash.outputs.hash }}-v1
path: '.pants
src/python/pants/engine/internals/native_engine.so
src/python/pants/engine/internals/native_engine.so.metadata'
- name: Bootstrap Pants
run: ./pants version > ${{ runner.temp }}/_pants_version.stdout && [[ -s ${{ runner.temp }}/_pants_version.stdout ]]
- name: Run smoke tests
run: './pants list ::
./pants roots
./pants help goals
./pants help targets
./pants help subsystems
'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-bootstrap-Linux-x86_64
path: .pants.d/pants.log
- name: Upload native binaries
uses: actions/upload-artifact@v3
with:
name: native_binaries.${{ matrix.python-version }}.Linux-x86_64
path: '.pants
src/python/pants/engine/internals/native_engine.so
src/python/pants/engine/internals/native_engine.so.metadata'
- name: Validate CI config
run: './pants run build-support/bin/generate_github_workflows.py -- --check
'
- env:
TMPDIR: ${{ runner.temp }}
if: needs.classify_changes.outputs.rust == 'true'
name: Test and lint Rust
run: 'sudo apt-get install -y pkg-config fuse libfuse-dev
./build-support/bin/check_rust_pre_commit.sh
./cargo test --all --tests -- --nocapture
./cargo check --benches
./cargo doc'
strategy:
matrix:
python-version:
- '3.7'
timeout-minutes: 60
bootstrap_pants_macos11_x86_64:
env:
PANTS_REMOTE_CACHE_READ: 'false'
PANTS_REMOTE_CACHE_WRITE: 'false'
if: (github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.docs_only != 'true')
name: Bootstrap Pants, test Rust (macOS11-x86_64)
needs:
- classify_changes
runs-on:
- macos-11
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- name: Set up Python ${{ matrix.python-version }}
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
'
- name: Cache Rust toolchain
uses: actions/cache@v3
with:
key: macOS11-x86_64-rustup-${{ hashFiles('rust-toolchain') }}-v2
path: '~/.rustup/toolchains/1.67.1-*
~/.rustup/update-hashes
~/.rustup/settings.toml
'
- name: Cache Cargo
uses: benjyw/rust-cache@461b9f8eee66b575bce78977bf649b8b7a8d53f1
with:
cache-bin: 'false'
shared-key: engine
workspaces: src/rust/engine
- id: get-engine-hash
name: Get native engine hash
run: echo "hash=$(./build-support/bin/rust/print_engine_hash.sh)" >> $GITHUB_OUTPUT
shell: bash
- name: Cache native engine
uses: actions/cache@v3
with:
key: macOS11-x86_64-engine-${{ steps.get-engine-hash.outputs.hash }}-v1
path: '.pants
src/python/pants/engine/internals/native_engine.so
src/python/pants/engine/internals/native_engine.so.metadata'
- name: Bootstrap Pants
run: ./pants version > ${{ runner.temp }}/_pants_version.stdout && [[ -s ${{ runner.temp }}/_pants_version.stdout ]]
- name: Run smoke tests
run: './pants list ::
./pants roots
./pants help goals
./pants help targets
./pants help subsystems
'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-bootstrap-macOS11-x86_64
path: .pants.d/pants.log
- name: Upload native binaries
uses: actions/upload-artifact@v3
with:
name: native_binaries.${{ matrix.python-version }}.macOS11-x86_64
path: '.pants
src/python/pants/engine/internals/native_engine.so
src/python/pants/engine/internals/native_engine.so.metadata'
- env:
TMPDIR: ${{ runner.temp }}
if: needs.classify_changes.outputs.rust == 'true'
name: Test Rust
run: ./cargo test --tests -- --nocapture
strategy:
matrix:
python-version:
- '3.7'
timeout-minutes: 60
build_wheels_linux_arm64:
container:
image: ghcr.io/pantsbuild/wheel_build_aarch64:v3-8384c5cf
env:
PANTS_REMOTE_CACHE_READ: 'false'
PANTS_REMOTE_CACHE_WRITE: 'false'
if: ((github.repository_owner == 'pantsbuild') && (github.event_name == 'push' || needs.classify_changes.outputs.release
== 'true')) && (needs.classify_changes.outputs.docs_only != 'true')
name: Build wheels (Linux-ARM64)
needs:
- classify_changes
runs-on:
- self-hosted
- Linux
- ARM64
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- name: Configure Git
run: git config --global safe.directory "$GITHUB_WORKSPACE"
- name: Install rustup
run: 'curl --proto ''=https'' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -v -y --default-toolchain none
echo "${HOME}/.cargo/bin" >> $GITHUB_PATH
'
- name: Expose Pythons
run: 'echo "/opt/python/cp37-cp37m/bin" >> $GITHUB_PATH
echo "/opt/python/cp38-cp38/bin" >> $GITHUB_PATH
echo "/opt/python/cp39-cp39/bin" >> $GITHUB_PATH
'
- 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
USE_PY39=true ./build-support/bin/release.sh build-wheels
./build-support/bin/release.sh build-wheels
USE_PY38=true ./build-support/bin/release.sh build-wheels'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-wheels-Linux-ARM64
path: .pants.d/pants.log
- env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
if: github.event_name == 'push'
name: Deploy to S3
run: ./build-support/bin/deploy_to_s3.py
timeout-minutes: 90
build_wheels_linux_x86_64:
container:
image: quay.io/pypa/manylinux2014_x86_64:latest
env:
PANTS_REMOTE_CACHE_READ: 'false'
PANTS_REMOTE_CACHE_WRITE: 'false'
if: ((github.repository_owner == 'pantsbuild') && (github.event_name == 'push' || needs.classify_changes.outputs.release
== 'true')) && (needs.classify_changes.outputs.docs_only != 'true')
name: Build wheels (Linux-x86_64)
needs:
- classify_changes
runs-on:
- ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- name: Configure Git
run: git config --global safe.directory "$GITHUB_WORKSPACE"
- name: Install rustup
run: 'curl --proto ''=https'' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -v -y --default-toolchain none
echo "${HOME}/.cargo/bin" >> $GITHUB_PATH
'
- name: Expose Pythons
run: 'echo "/opt/python/cp37-cp37m/bin" >> $GITHUB_PATH
echo "/opt/python/cp38-cp38/bin" >> $GITHUB_PATH
echo "/opt/python/cp39-cp39/bin" >> $GITHUB_PATH
'
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.5
- env: {}
name: Build wheels
run: 'USE_PY39=true ./build-support/bin/release.sh build-local-pex
USE_PY39=true ./build-support/bin/release.sh build-wheels
./build-support/bin/release.sh build-wheels
USE_PY38=true ./build-support/bin/release.sh build-wheels'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-wheels-Linux-x86_64
path: .pants.d/pants.log
- env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
if: github.event_name == 'push'
name: Deploy to S3
run: ./build-support/bin/deploy_to_s3.py
timeout-minutes: 90
build_wheels_macos10_15_x86_64:
env:
PANTS_REMOTE_CACHE_READ: 'false'
PANTS_REMOTE_CACHE_WRITE: 'false'
if: ((github.repository_owner == 'pantsbuild') && (github.event_name == 'push' || needs.classify_changes.outputs.release
== 'true')) && (needs.classify_changes.outputs.docs_only != 'true')
name: Build wheels (macOS10-15-x86_64)
needs:
- classify_changes
runs-on:
- self-hosted
- macOS-10.15-X64
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- name: Cache Rust toolchain
uses: actions/cache@v3
with:
key: macOS10-15-x86_64-rustup-${{ hashFiles('rust-toolchain') }}-v2
path: '~/.rustup/toolchains/1.67.1-*
~/.rustup/update-hashes
~/.rustup/settings.toml
'
- name: Cache Cargo
uses: benjyw/rust-cache@461b9f8eee66b575bce78977bf649b8b7a8d53f1
with:
cache-bin: 'false'
shared-key: engine
workspaces: src/rust/engine
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.5
- env:
ARCHFLAGS: -arch x86_64
name: Build wheels
run: 'USE_PY39=true ./build-support/bin/release.sh build-local-pex
USE_PY39=true ./build-support/bin/release.sh build-wheels
./build-support/bin/release.sh build-wheels
USE_PY38=true ./build-support/bin/release.sh build-wheels'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-wheels-macOS10-15-x86_64
path: .pants.d/pants.log
- env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
if: github.event_name == 'push'
name: Deploy to S3
run: ./build-support/bin/deploy_to_s3.py
timeout-minutes: 90
build_wheels_macos11_arm64:
env:
PANTS_REMOTE_CACHE_READ: 'false'
PANTS_REMOTE_CACHE_WRITE: 'false'
if: ((github.repository_owner == 'pantsbuild') && (github.event_name == 'push' || needs.classify_changes.outputs.release
== 'true')) && (needs.classify_changes.outputs.docs_only != 'true')
name: Build wheels (macOS11-ARM64)
needs:
- classify_changes
runs-on:
- self-hosted
- macOS-11-ARM64
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- name: Cache Rust toolchain
uses: actions/cache@v3
with:
key: macOS11-ARM64-rustup-${{ hashFiles('rust-toolchain') }}-v2
path: '~/.rustup/toolchains/1.67.1-*
~/.rustup/update-hashes
~/.rustup/settings.toml
'
- name: Cache Cargo
uses: benjyw/rust-cache@461b9f8eee66b575bce78977bf649b8b7a8d53f1
with:
cache-bin: 'false'
shared-key: engine
workspaces: src/rust/engine
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.5
- env:
ARCHFLAGS: -arch arm64
name: Build wheels
run: 'USE_PY39=true ./build-support/bin/release.sh build-local-pex
USE_PY39=true ./build-support/bin/release.sh build-wheels'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-wheels-macOS11-ARM64
path: .pants.d/pants.log
- env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
if: github.event_name == 'push'
name: Deploy to S3
run: ./build-support/bin/deploy_to_s3.py
timeout-minutes: 90
check_labels:
if: github.repository_owner == 'pantsbuild'
name: Ensure PR has a category label
runs-on:
- ubuntu-20.04
steps:
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name == 'pull_request'
name: Ensure category label
uses: mheap/github-action-required-labels@v2.1.0
with:
count: 1
labels: category:new feature, category:user api change, category:plugin api change, category:performance, category:bugfix,
category:documentation, category:internal
mode: exactly
classify_changes:
if: github.repository_owner == 'pantsbuild'
name: Classify changes
outputs:
ci_config: ${{ steps.classify.outputs.ci_config }}
docs: ${{ steps.classify.outputs.docs }}
docs_only: ${{ steps.classify.outputs.docs_only }}
other: ${{ steps.classify.outputs.other }}
release: ${{ steps.classify.outputs.release }}
rust: ${{ steps.classify.outputs.rust }}
runs-on:
- ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2
- id: files
name: Get changed files
uses: tj-actions/changed-files@v32
with:
separator: '|'
- id: classify
name: Classify changed files
run: "affected=$(python build-support/bin/classify_changed_files.py \"${{ steps.files.outputs.all_modified_files }}\"\
)\necho \"Affected:\"\nif [[ \"${affected}\" == \"docs\" ]]; then\n echo \"docs_only=true\" >> $GITHUB_OUTPUT\n \
\ echo \"docs_only\"\nfi\nfor i in ${affected}; do\n echo \"${i}=true\" >> $GITHUB_OUTPUT\n echo \"${i}\"\ndone\n"
lint_python:
if: (github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.docs_only != 'true')
name: Lint Python and Shell
needs:
- bootstrap_pants_linux_x86_64
- classify_changes
runs-on:
- ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
name: Launch bazel-remote
run: "mkdir -p ~/bazel-remote\nif [[ -z \"${AWS_ACCESS_KEY_ID}\" ]]; then\n CACHE_WRITE=false\n # If no secret read/write\
\ creds, use hard-coded read-only creds, so that\n # cross-fork PRs can at least read from the cache.\n # These\
\ creds are hard-coded here in this public repo, which makes the bucket\n # world-readable. But since putting raw\
\ AWS tokens in a public repo, even\n # deliberately, is icky, we base64-them. This will at least help hide from\n\
\ # automated scanners that look for checked in AWS keys.\n # Not that it would be terrible if we were scanned,\
\ since this is public\n # on purpose, but it's best not to draw attention.\n AWS_ACCESS_KEY_ID=$(echo 'QUtJQVY2QTZHN1JRVkJJUVM1RUEK'\
\ | base64 -d)\n AWS_SECRET_ACCESS_KEY=$(echo 'd3dOQ1k1eHJJWVVtejZBblV6M0l1endXV0loQWZWcW9GZlVjMDlKRwo=' | base64\
\ -d)\nelse\n CACHE_WRITE=true\nfi\ndocker run --detach -u 1001:1000 -v ~/bazel-remote:/data \
\ -p 9092:9092 buchgr/bazel-remote-cache:v2.4.1 --s3.auth_method=access_key\
\ --s3.access_key_id=\"${AWS_ACCESS_KEY_ID}\" --s3.secret_access_key=\"${AWS_SECRET_ACCESS_KEY}\"\
\ --s3.bucket=cache.pantsbuild.org --s3.endpoint=s3.us-east-1.amazonaws.com \
\ --max_size 30\necho \"PANTS_REMOTE_STORE_ADDRESS=grpc://localhost:9092\" >> \"$GITHUB_ENV\"\necho\
\ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\
\n"
- name: Set up Python ${{ matrix.python-version }}
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
'
- name: Download native binaries
uses: actions/download-artifact@v3
with:
name: native_binaries.${{ matrix.python-version }}.Linux-x86_64
- name: Lint
run: './pants lint check ::
'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-lint-Linux-x86_64
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- '3.7'
timeout-minutes: 30
merge_ok:
if: always()
name: Merge OK
needs:
- set_merge_ok
runs-on:
- ubuntu-20.04
steps:
- run: "merge_ok=\"${{ needs.set_merge_ok.outputs.merge_ok }}\"\nif [[ \"${merge_ok}\" == \"true\" ]]; then\n echo\
\ \"Merge OK\"\n exit 0\nelse\n echo \"Merge NOT OK\"\n exit 1\nfi\n"
set_merge_ok:
if: always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
name: Set Merge OK
needs:
- classify_changes
- check_labels
- bootstrap_pants_linux_arm64
- bootstrap_pants_linux_x86_64
- bootstrap_pants_macos11_x86_64
- build_wheels_linux_arm64
- build_wheels_linux_x86_64
- build_wheels_macos10_15_x86_64
- build_wheels_macos11_arm64
- check_labels
- classify_changes
- lint_python
- test_python_linux_arm64
- test_python_linux_x86_64_0
- test_python_linux_x86_64_1
- test_python_linux_x86_64_2
- test_python_linux_x86_64_3
- test_python_linux_x86_64_4
- test_python_linux_x86_64_5
- test_python_linux_x86_64_6
- test_python_linux_x86_64_7
- test_python_linux_x86_64_8
- test_python_linux_x86_64_9
- test_python_macos11_x86_64
outputs:
merge_ok: ${{ steps.set_merge_ok.outputs.merge_ok }}
runs-on:
- ubuntu-20.04
steps:
- id: set_merge_ok
run: echo 'merge_ok=true' >> ${GITHUB_OUTPUT}
test_python_linux_arm64:
env:
PANTS_CONFIG_FILES: +['pants.ci.toml','pants.ci.aarch64.toml']
if: (github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.docs_only != 'true')
name: Test Python (Linux-ARM64)
needs:
- bootstrap_pants_linux_arm64
- classify_changes
runs-on:
- self-hosted
- Linux
- ARM64
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- name: Install AdoptJDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: '11'
- 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
'
- name: Download native binaries
uses: actions/download-artifact@v3
with:
name: native_binaries.${{ matrix.python-version }}.Linux-ARM64
- name: Run Python tests
run: './pants --tag=+platform_specific_behavior test :: -- -m platform_specific_behavior
'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-python-test-Linux-ARM64
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- '3.7'
timeout-minutes: 90
test_python_linux_x86_64_0:
env: {}
if: (github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.docs_only != 'true')
name: Test Python (Linux-x86_64) Shard 0/10
needs:
- bootstrap_pants_linux_x86_64
- classify_changes
runs-on:
- ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
name: Launch bazel-remote
run: "mkdir -p ~/bazel-remote\nif [[ -z \"${AWS_ACCESS_KEY_ID}\" ]]; then\n CACHE_WRITE=false\n # If no secret read/write\
\ creds, use hard-coded read-only creds, so that\n # cross-fork PRs can at least read from the cache.\n # These\
\ creds are hard-coded here in this public repo, which makes the bucket\n # world-readable. But since putting raw\
\ AWS tokens in a public repo, even\n # deliberately, is icky, we base64-them. This will at least help hide from\n\
\ # automated scanners that look for checked in AWS keys.\n # Not that it would be terrible if we were scanned,\
\ since this is public\n # on purpose, but it's best not to draw attention.\n AWS_ACCESS_KEY_ID=$(echo 'QUtJQVY2QTZHN1JRVkJJUVM1RUEK'\
\ | base64 -d)\n AWS_SECRET_ACCESS_KEY=$(echo 'd3dOQ1k1eHJJWVVtejZBblV6M0l1endXV0loQWZWcW9GZlVjMDlKRwo=' | base64\
\ -d)\nelse\n CACHE_WRITE=true\nfi\ndocker run --detach -u 1001:1000 -v ~/bazel-remote:/data \
\ -p 9092:9092 buchgr/bazel-remote-cache:v2.4.1 --s3.auth_method=access_key\
\ --s3.access_key_id=\"${AWS_ACCESS_KEY_ID}\" --s3.secret_access_key=\"${AWS_SECRET_ACCESS_KEY}\"\
\ --s3.bucket=cache.pantsbuild.org --s3.endpoint=s3.us-east-1.amazonaws.com \
\ --max_size 30\necho \"PANTS_REMOTE_STORE_ADDRESS=grpc://localhost:9092\" >> \"$GITHUB_ENV\"\necho\
\ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\
\n"
- name: Install AdoptJDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: '11'
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.5
- if: runner.os == 'Linux'
name: Download Apache `thrift` binary (Linux)
run: 'mkdir -p "${HOME}/.thrift"
curl --fail -L https://binaries.pantsbuild.org/bin/thrift/linux/x86_64/0.15.0/thrift -o "${HOME}/.thrift/thrift"
chmod +x "${HOME}/.thrift/thrift"
echo "${HOME}/.thrift" >> $GITHUB_PATH
'
- name: Set up Python ${{ matrix.python-version }}
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
'
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe
- name: Download native binaries
uses: actions/download-artifact@v3
with:
name: native_binaries.${{ matrix.python-version }}.Linux-x86_64
- name: Run Python test shard 0/10
run: './pants test --shard=0/10 ::
'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-python-test-0_10-Linux-x86_64
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- '3.7'
timeout-minutes: 90
test_python_linux_x86_64_1:
env: {}
if: (github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.docs_only != 'true')
name: Test Python (Linux-x86_64) Shard 1/10
needs:
- bootstrap_pants_linux_x86_64
- classify_changes
runs-on:
- ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
name: Launch bazel-remote
run: "mkdir -p ~/bazel-remote\nif [[ -z \"${AWS_ACCESS_KEY_ID}\" ]]; then\n CACHE_WRITE=false\n # If no secret read/write\
\ creds, use hard-coded read-only creds, so that\n # cross-fork PRs can at least read from the cache.\n # These\
\ creds are hard-coded here in this public repo, which makes the bucket\n # world-readable. But since putting raw\
\ AWS tokens in a public repo, even\n # deliberately, is icky, we base64-them. This will at least help hide from\n\
\ # automated scanners that look for checked in AWS keys.\n # Not that it would be terrible if we were scanned,\
\ since this is public\n # on purpose, but it's best not to draw attention.\n AWS_ACCESS_KEY_ID=$(echo 'QUtJQVY2QTZHN1JRVkJJUVM1RUEK'\
\ | base64 -d)\n AWS_SECRET_ACCESS_KEY=$(echo 'd3dOQ1k1eHJJWVVtejZBblV6M0l1endXV0loQWZWcW9GZlVjMDlKRwo=' | base64\
\ -d)\nelse\n CACHE_WRITE=true\nfi\ndocker run --detach -u 1001:1000 -v ~/bazel-remote:/data \
\ -p 9092:9092 buchgr/bazel-remote-cache:v2.4.1 --s3.auth_method=access_key\
\ --s3.access_key_id=\"${AWS_ACCESS_KEY_ID}\" --s3.secret_access_key=\"${AWS_SECRET_ACCESS_KEY}\"\
\ --s3.bucket=cache.pantsbuild.org --s3.endpoint=s3.us-east-1.amazonaws.com \
\ --max_size 30\necho \"PANTS_REMOTE_STORE_ADDRESS=grpc://localhost:9092\" >> \"$GITHUB_ENV\"\necho\
\ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\
\n"
- name: Install AdoptJDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: '11'
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.5
- if: runner.os == 'Linux'
name: Download Apache `thrift` binary (Linux)
run: 'mkdir -p "${HOME}/.thrift"
curl --fail -L https://binaries.pantsbuild.org/bin/thrift/linux/x86_64/0.15.0/thrift -o "${HOME}/.thrift/thrift"
chmod +x "${HOME}/.thrift/thrift"
echo "${HOME}/.thrift" >> $GITHUB_PATH
'
- name: Set up Python ${{ matrix.python-version }}
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
'
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe
- name: Download native binaries
uses: actions/download-artifact@v3
with:
name: native_binaries.${{ matrix.python-version }}.Linux-x86_64
- name: Run Python test shard 1/10
run: './pants test --shard=1/10 ::
'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-python-test-1_10-Linux-x86_64
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- '3.7'
timeout-minutes: 90
test_python_linux_x86_64_2:
env: {}
if: (github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.docs_only != 'true')
name: Test Python (Linux-x86_64) Shard 2/10
needs:
- bootstrap_pants_linux_x86_64
- classify_changes
runs-on:
- ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
name: Launch bazel-remote
run: "mkdir -p ~/bazel-remote\nif [[ -z \"${AWS_ACCESS_KEY_ID}\" ]]; then\n CACHE_WRITE=false\n # If no secret read/write\
\ creds, use hard-coded read-only creds, so that\n # cross-fork PRs can at least read from the cache.\n # These\
\ creds are hard-coded here in this public repo, which makes the bucket\n # world-readable. But since putting raw\
\ AWS tokens in a public repo, even\n # deliberately, is icky, we base64-them. This will at least help hide from\n\
\ # automated scanners that look for checked in AWS keys.\n # Not that it would be terrible if we were scanned,\
\ since this is public\n # on purpose, but it's best not to draw attention.\n AWS_ACCESS_KEY_ID=$(echo 'QUtJQVY2QTZHN1JRVkJJUVM1RUEK'\
\ | base64 -d)\n AWS_SECRET_ACCESS_KEY=$(echo 'd3dOQ1k1eHJJWVVtejZBblV6M0l1endXV0loQWZWcW9GZlVjMDlKRwo=' | base64\
\ -d)\nelse\n CACHE_WRITE=true\nfi\ndocker run --detach -u 1001:1000 -v ~/bazel-remote:/data \
\ -p 9092:9092 buchgr/bazel-remote-cache:v2.4.1 --s3.auth_method=access_key\
\ --s3.access_key_id=\"${AWS_ACCESS_KEY_ID}\" --s3.secret_access_key=\"${AWS_SECRET_ACCESS_KEY}\"\
\ --s3.bucket=cache.pantsbuild.org --s3.endpoint=s3.us-east-1.amazonaws.com \
\ --max_size 30\necho \"PANTS_REMOTE_STORE_ADDRESS=grpc://localhost:9092\" >> \"$GITHUB_ENV\"\necho\
\ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\
\n"
- name: Install AdoptJDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: '11'
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.5
- if: runner.os == 'Linux'
name: Download Apache `thrift` binary (Linux)
run: 'mkdir -p "${HOME}/.thrift"
curl --fail -L https://binaries.pantsbuild.org/bin/thrift/linux/x86_64/0.15.0/thrift -o "${HOME}/.thrift/thrift"
chmod +x "${HOME}/.thrift/thrift"
echo "${HOME}/.thrift" >> $GITHUB_PATH
'
- name: Set up Python ${{ matrix.python-version }}
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
'
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe
- name: Download native binaries
uses: actions/download-artifact@v3
with:
name: native_binaries.${{ matrix.python-version }}.Linux-x86_64
- name: Run Python test shard 2/10
run: './pants test --shard=2/10 ::
'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-python-test-2_10-Linux-x86_64
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- '3.7'
timeout-minutes: 90
test_python_linux_x86_64_3:
env: {}
if: (github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.docs_only != 'true')
name: Test Python (Linux-x86_64) Shard 3/10
needs:
- bootstrap_pants_linux_x86_64
- classify_changes
runs-on:
- ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
name: Launch bazel-remote
run: "mkdir -p ~/bazel-remote\nif [[ -z \"${AWS_ACCESS_KEY_ID}\" ]]; then\n CACHE_WRITE=false\n # If no secret read/write\
\ creds, use hard-coded read-only creds, so that\n # cross-fork PRs can at least read from the cache.\n # These\
\ creds are hard-coded here in this public repo, which makes the bucket\n # world-readable. But since putting raw\
\ AWS tokens in a public repo, even\n # deliberately, is icky, we base64-them. This will at least help hide from\n\
\ # automated scanners that look for checked in AWS keys.\n # Not that it would be terrible if we were scanned,\
\ since this is public\n # on purpose, but it's best not to draw attention.\n AWS_ACCESS_KEY_ID=$(echo 'QUtJQVY2QTZHN1JRVkJJUVM1RUEK'\
\ | base64 -d)\n AWS_SECRET_ACCESS_KEY=$(echo 'd3dOQ1k1eHJJWVVtejZBblV6M0l1endXV0loQWZWcW9GZlVjMDlKRwo=' | base64\
\ -d)\nelse\n CACHE_WRITE=true\nfi\ndocker run --detach -u 1001:1000 -v ~/bazel-remote:/data \
\ -p 9092:9092 buchgr/bazel-remote-cache:v2.4.1 --s3.auth_method=access_key\
\ --s3.access_key_id=\"${AWS_ACCESS_KEY_ID}\" --s3.secret_access_key=\"${AWS_SECRET_ACCESS_KEY}\"\
\ --s3.bucket=cache.pantsbuild.org --s3.endpoint=s3.us-east-1.amazonaws.com \
\ --max_size 30\necho \"PANTS_REMOTE_STORE_ADDRESS=grpc://localhost:9092\" >> \"$GITHUB_ENV\"\necho\
\ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\
\n"
- name: Install AdoptJDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: '11'
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.5
- if: runner.os == 'Linux'
name: Download Apache `thrift` binary (Linux)
run: 'mkdir -p "${HOME}/.thrift"
curl --fail -L https://binaries.pantsbuild.org/bin/thrift/linux/x86_64/0.15.0/thrift -o "${HOME}/.thrift/thrift"
chmod +x "${HOME}/.thrift/thrift"
echo "${HOME}/.thrift" >> $GITHUB_PATH
'
- name: Set up Python ${{ matrix.python-version }}
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
'
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe
- name: Download native binaries
uses: actions/download-artifact@v3
with:
name: native_binaries.${{ matrix.python-version }}.Linux-x86_64
- name: Run Python test shard 3/10
run: './pants test --shard=3/10 ::
'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-python-test-3_10-Linux-x86_64
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- '3.7'
timeout-minutes: 90
test_python_linux_x86_64_4:
env: {}
if: (github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.docs_only != 'true')
name: Test Python (Linux-x86_64) Shard 4/10
needs:
- bootstrap_pants_linux_x86_64
- classify_changes
runs-on:
- ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
name: Launch bazel-remote
run: "mkdir -p ~/bazel-remote\nif [[ -z \"${AWS_ACCESS_KEY_ID}\" ]]; then\n CACHE_WRITE=false\n # If no secret read/write\
\ creds, use hard-coded read-only creds, so that\n # cross-fork PRs can at least read from the cache.\n # These\
\ creds are hard-coded here in this public repo, which makes the bucket\n # world-readable. But since putting raw\
\ AWS tokens in a public repo, even\n # deliberately, is icky, we base64-them. This will at least help hide from\n\
\ # automated scanners that look for checked in AWS keys.\n # Not that it would be terrible if we were scanned,\
\ since this is public\n # on purpose, but it's best not to draw attention.\n AWS_ACCESS_KEY_ID=$(echo 'QUtJQVY2QTZHN1JRVkJJUVM1RUEK'\
\ | base64 -d)\n AWS_SECRET_ACCESS_KEY=$(echo 'd3dOQ1k1eHJJWVVtejZBblV6M0l1endXV0loQWZWcW9GZlVjMDlKRwo=' | base64\
\ -d)\nelse\n CACHE_WRITE=true\nfi\ndocker run --detach -u 1001:1000 -v ~/bazel-remote:/data \
\ -p 9092:9092 buchgr/bazel-remote-cache:v2.4.1 --s3.auth_method=access_key\
\ --s3.access_key_id=\"${AWS_ACCESS_KEY_ID}\" --s3.secret_access_key=\"${AWS_SECRET_ACCESS_KEY}\"\
\ --s3.bucket=cache.pantsbuild.org --s3.endpoint=s3.us-east-1.amazonaws.com \
\ --max_size 30\necho \"PANTS_REMOTE_STORE_ADDRESS=grpc://localhost:9092\" >> \"$GITHUB_ENV\"\necho\
\ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\
\n"
- name: Install AdoptJDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: '11'
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.5
- if: runner.os == 'Linux'
name: Download Apache `thrift` binary (Linux)
run: 'mkdir -p "${HOME}/.thrift"
curl --fail -L https://binaries.pantsbuild.org/bin/thrift/linux/x86_64/0.15.0/thrift -o "${HOME}/.thrift/thrift"
chmod +x "${HOME}/.thrift/thrift"
echo "${HOME}/.thrift" >> $GITHUB_PATH
'
- name: Set up Python ${{ matrix.python-version }}
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
'
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe
- name: Download native binaries
uses: actions/download-artifact@v3
with:
name: native_binaries.${{ matrix.python-version }}.Linux-x86_64
- name: Run Python test shard 4/10
run: './pants test --shard=4/10 ::
'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-python-test-4_10-Linux-x86_64
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- '3.7'
timeout-minutes: 90
test_python_linux_x86_64_5:
env: {}
if: (github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.docs_only != 'true')
name: Test Python (Linux-x86_64) Shard 5/10
needs:
- bootstrap_pants_linux_x86_64
- classify_changes
runs-on:
- ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
name: Launch bazel-remote
run: "mkdir -p ~/bazel-remote\nif [[ -z \"${AWS_ACCESS_KEY_ID}\" ]]; then\n CACHE_WRITE=false\n # If no secret read/write\
\ creds, use hard-coded read-only creds, so that\n # cross-fork PRs can at least read from the cache.\n # These\
\ creds are hard-coded here in this public repo, which makes the bucket\n # world-readable. But since putting raw\
\ AWS tokens in a public repo, even\n # deliberately, is icky, we base64-them. This will at least help hide from\n\
\ # automated scanners that look for checked in AWS keys.\n # Not that it would be terrible if we were scanned,\
\ since this is public\n # on purpose, but it's best not to draw attention.\n AWS_ACCESS_KEY_ID=$(echo 'QUtJQVY2QTZHN1JRVkJJUVM1RUEK'\
\ | base64 -d)\n AWS_SECRET_ACCESS_KEY=$(echo 'd3dOQ1k1eHJJWVVtejZBblV6M0l1endXV0loQWZWcW9GZlVjMDlKRwo=' | base64\
\ -d)\nelse\n CACHE_WRITE=true\nfi\ndocker run --detach -u 1001:1000 -v ~/bazel-remote:/data \
\ -p 9092:9092 buchgr/bazel-remote-cache:v2.4.1 --s3.auth_method=access_key\
\ --s3.access_key_id=\"${AWS_ACCESS_KEY_ID}\" --s3.secret_access_key=\"${AWS_SECRET_ACCESS_KEY}\"\
\ --s3.bucket=cache.pantsbuild.org --s3.endpoint=s3.us-east-1.amazonaws.com \
\ --max_size 30\necho \"PANTS_REMOTE_STORE_ADDRESS=grpc://localhost:9092\" >> \"$GITHUB_ENV\"\necho\
\ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\
\n"
- name: Install AdoptJDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: '11'
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.5
- if: runner.os == 'Linux'
name: Download Apache `thrift` binary (Linux)
run: 'mkdir -p "${HOME}/.thrift"
curl --fail -L https://binaries.pantsbuild.org/bin/thrift/linux/x86_64/0.15.0/thrift -o "${HOME}/.thrift/thrift"
chmod +x "${HOME}/.thrift/thrift"
echo "${HOME}/.thrift" >> $GITHUB_PATH
'
- name: Set up Python ${{ matrix.python-version }}
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
'
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe
- name: Download native binaries
uses: actions/download-artifact@v3
with:
name: native_binaries.${{ matrix.python-version }}.Linux-x86_64
- name: Run Python test shard 5/10
run: './pants test --shard=5/10 ::
'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-python-test-5_10-Linux-x86_64
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- '3.7'
timeout-minutes: 90
test_python_linux_x86_64_6:
env: {}
if: (github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.docs_only != 'true')
name: Test Python (Linux-x86_64) Shard 6/10
needs:
- bootstrap_pants_linux_x86_64
- classify_changes
runs-on:
- ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
name: Launch bazel-remote
run: "mkdir -p ~/bazel-remote\nif [[ -z \"${AWS_ACCESS_KEY_ID}\" ]]; then\n CACHE_WRITE=false\n # If no secret read/write\
\ creds, use hard-coded read-only creds, so that\n # cross-fork PRs can at least read from the cache.\n # These\
\ creds are hard-coded here in this public repo, which makes the bucket\n # world-readable. But since putting raw\
\ AWS tokens in a public repo, even\n # deliberately, is icky, we base64-them. This will at least help hide from\n\
\ # automated scanners that look for checked in AWS keys.\n # Not that it would be terrible if we were scanned,\
\ since this is public\n # on purpose, but it's best not to draw attention.\n AWS_ACCESS_KEY_ID=$(echo 'QUtJQVY2QTZHN1JRVkJJUVM1RUEK'\
\ | base64 -d)\n AWS_SECRET_ACCESS_KEY=$(echo 'd3dOQ1k1eHJJWVVtejZBblV6M0l1endXV0loQWZWcW9GZlVjMDlKRwo=' | base64\
\ -d)\nelse\n CACHE_WRITE=true\nfi\ndocker run --detach -u 1001:1000 -v ~/bazel-remote:/data \
\ -p 9092:9092 buchgr/bazel-remote-cache:v2.4.1 --s3.auth_method=access_key\
\ --s3.access_key_id=\"${AWS_ACCESS_KEY_ID}\" --s3.secret_access_key=\"${AWS_SECRET_ACCESS_KEY}\"\
\ --s3.bucket=cache.pantsbuild.org --s3.endpoint=s3.us-east-1.amazonaws.com \
\ --max_size 30\necho \"PANTS_REMOTE_STORE_ADDRESS=grpc://localhost:9092\" >> \"$GITHUB_ENV\"\necho\
\ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\
\n"
- name: Install AdoptJDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: '11'
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.5
- if: runner.os == 'Linux'
name: Download Apache `thrift` binary (Linux)
run: 'mkdir -p "${HOME}/.thrift"
curl --fail -L https://binaries.pantsbuild.org/bin/thrift/linux/x86_64/0.15.0/thrift -o "${HOME}/.thrift/thrift"
chmod +x "${HOME}/.thrift/thrift"
echo "${HOME}/.thrift" >> $GITHUB_PATH
'
- name: Set up Python ${{ matrix.python-version }}
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
'
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe
- name: Download native binaries
uses: actions/download-artifact@v3
with:
name: native_binaries.${{ matrix.python-version }}.Linux-x86_64
- name: Run Python test shard 6/10
run: './pants test --shard=6/10 ::
'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-python-test-6_10-Linux-x86_64
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- '3.7'
timeout-minutes: 90
test_python_linux_x86_64_7:
env: {}
if: (github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.docs_only != 'true')
name: Test Python (Linux-x86_64) Shard 7/10
needs:
- bootstrap_pants_linux_x86_64
- classify_changes
runs-on:
- ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
name: Launch bazel-remote
run: "mkdir -p ~/bazel-remote\nif [[ -z \"${AWS_ACCESS_KEY_ID}\" ]]; then\n CACHE_WRITE=false\n # If no secret read/write\
\ creds, use hard-coded read-only creds, so that\n # cross-fork PRs can at least read from the cache.\n # These\
\ creds are hard-coded here in this public repo, which makes the bucket\n # world-readable. But since putting raw\
\ AWS tokens in a public repo, even\n # deliberately, is icky, we base64-them. This will at least help hide from\n\
\ # automated scanners that look for checked in AWS keys.\n # Not that it would be terrible if we were scanned,\
\ since this is public\n # on purpose, but it's best not to draw attention.\n AWS_ACCESS_KEY_ID=$(echo 'QUtJQVY2QTZHN1JRVkJJUVM1RUEK'\
\ | base64 -d)\n AWS_SECRET_ACCESS_KEY=$(echo 'd3dOQ1k1eHJJWVVtejZBblV6M0l1endXV0loQWZWcW9GZlVjMDlKRwo=' | base64\
\ -d)\nelse\n CACHE_WRITE=true\nfi\ndocker run --detach -u 1001:1000 -v ~/bazel-remote:/data \
\ -p 9092:9092 buchgr/bazel-remote-cache:v2.4.1 --s3.auth_method=access_key\
\ --s3.access_key_id=\"${AWS_ACCESS_KEY_ID}\" --s3.secret_access_key=\"${AWS_SECRET_ACCESS_KEY}\"\
\ --s3.bucket=cache.pantsbuild.org --s3.endpoint=s3.us-east-1.amazonaws.com \
\ --max_size 30\necho \"PANTS_REMOTE_STORE_ADDRESS=grpc://localhost:9092\" >> \"$GITHUB_ENV\"\necho\
\ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\
\n"
- name: Install AdoptJDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: '11'
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.5
- if: runner.os == 'Linux'
name: Download Apache `thrift` binary (Linux)
run: 'mkdir -p "${HOME}/.thrift"
curl --fail -L https://binaries.pantsbuild.org/bin/thrift/linux/x86_64/0.15.0/thrift -o "${HOME}/.thrift/thrift"
chmod +x "${HOME}/.thrift/thrift"
echo "${HOME}/.thrift" >> $GITHUB_PATH
'
- name: Set up Python ${{ matrix.python-version }}
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
'
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe
- name: Download native binaries
uses: actions/download-artifact@v3
with:
name: native_binaries.${{ matrix.python-version }}.Linux-x86_64
- name: Run Python test shard 7/10
run: './pants test --shard=7/10 ::
'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-python-test-7_10-Linux-x86_64
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- '3.7'
timeout-minutes: 90
test_python_linux_x86_64_8:
env: {}
if: (github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.docs_only != 'true')
name: Test Python (Linux-x86_64) Shard 8/10
needs:
- bootstrap_pants_linux_x86_64
- classify_changes
runs-on:
- ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
name: Launch bazel-remote
run: "mkdir -p ~/bazel-remote\nif [[ -z \"${AWS_ACCESS_KEY_ID}\" ]]; then\n CACHE_WRITE=false\n # If no secret read/write\
\ creds, use hard-coded read-only creds, so that\n # cross-fork PRs can at least read from the cache.\n # These\
\ creds are hard-coded here in this public repo, which makes the bucket\n # world-readable. But since putting raw\
\ AWS tokens in a public repo, even\n # deliberately, is icky, we base64-them. This will at least help hide from\n\
\ # automated scanners that look for checked in AWS keys.\n # Not that it would be terrible if we were scanned,\
\ since this is public\n # on purpose, but it's best not to draw attention.\n AWS_ACCESS_KEY_ID=$(echo 'QUtJQVY2QTZHN1JRVkJJUVM1RUEK'\
\ | base64 -d)\n AWS_SECRET_ACCESS_KEY=$(echo 'd3dOQ1k1eHJJWVVtejZBblV6M0l1endXV0loQWZWcW9GZlVjMDlKRwo=' | base64\
\ -d)\nelse\n CACHE_WRITE=true\nfi\ndocker run --detach -u 1001:1000 -v ~/bazel-remote:/data \
\ -p 9092:9092 buchgr/bazel-remote-cache:v2.4.1 --s3.auth_method=access_key\
\ --s3.access_key_id=\"${AWS_ACCESS_KEY_ID}\" --s3.secret_access_key=\"${AWS_SECRET_ACCESS_KEY}\"\
\ --s3.bucket=cache.pantsbuild.org --s3.endpoint=s3.us-east-1.amazonaws.com \
\ --max_size 30\necho \"PANTS_REMOTE_STORE_ADDRESS=grpc://localhost:9092\" >> \"$GITHUB_ENV\"\necho\
\ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\
\n"
- name: Install AdoptJDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: '11'
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.5
- if: runner.os == 'Linux'
name: Download Apache `thrift` binary (Linux)
run: 'mkdir -p "${HOME}/.thrift"
curl --fail -L https://binaries.pantsbuild.org/bin/thrift/linux/x86_64/0.15.0/thrift -o "${HOME}/.thrift/thrift"
chmod +x "${HOME}/.thrift/thrift"
echo "${HOME}/.thrift" >> $GITHUB_PATH
'
- name: Set up Python ${{ matrix.python-version }}
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
'
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe
- name: Download native binaries
uses: actions/download-artifact@v3
with:
name: native_binaries.${{ matrix.python-version }}.Linux-x86_64
- name: Run Python test shard 8/10
run: './pants test --shard=8/10 ::
'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-python-test-8_10-Linux-x86_64
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- '3.7'
timeout-minutes: 90
test_python_linux_x86_64_9:
env: {}
if: (github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.docs_only != 'true')
name: Test Python (Linux-x86_64) Shard 9/10
needs:
- bootstrap_pants_linux_x86_64
- classify_changes
runs-on:
- ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
name: Launch bazel-remote
run: "mkdir -p ~/bazel-remote\nif [[ -z \"${AWS_ACCESS_KEY_ID}\" ]]; then\n CACHE_WRITE=false\n # If no secret read/write\
\ creds, use hard-coded read-only creds, so that\n # cross-fork PRs can at least read from the cache.\n # These\
\ creds are hard-coded here in this public repo, which makes the bucket\n # world-readable. But since putting raw\
\ AWS tokens in a public repo, even\n # deliberately, is icky, we base64-them. This will at least help hide from\n\
\ # automated scanners that look for checked in AWS keys.\n # Not that it would be terrible if we were scanned,\
\ since this is public\n # on purpose, but it's best not to draw attention.\n AWS_ACCESS_KEY_ID=$(echo 'QUtJQVY2QTZHN1JRVkJJUVM1RUEK'\
\ | base64 -d)\n AWS_SECRET_ACCESS_KEY=$(echo 'd3dOQ1k1eHJJWVVtejZBblV6M0l1endXV0loQWZWcW9GZlVjMDlKRwo=' | base64\
\ -d)\nelse\n CACHE_WRITE=true\nfi\ndocker run --detach -u 1001:1000 -v ~/bazel-remote:/data \
\ -p 9092:9092 buchgr/bazel-remote-cache:v2.4.1 --s3.auth_method=access_key\
\ --s3.access_key_id=\"${AWS_ACCESS_KEY_ID}\" --s3.secret_access_key=\"${AWS_SECRET_ACCESS_KEY}\"\
\ --s3.bucket=cache.pantsbuild.org --s3.endpoint=s3.us-east-1.amazonaws.com \
\ --max_size 30\necho \"PANTS_REMOTE_STORE_ADDRESS=grpc://localhost:9092\" >> \"$GITHUB_ENV\"\necho\
\ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\
\n"
- name: Install AdoptJDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: '11'
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.5
- if: runner.os == 'Linux'
name: Download Apache `thrift` binary (Linux)
run: 'mkdir -p "${HOME}/.thrift"
curl --fail -L https://binaries.pantsbuild.org/bin/thrift/linux/x86_64/0.15.0/thrift -o "${HOME}/.thrift/thrift"
chmod +x "${HOME}/.thrift/thrift"
echo "${HOME}/.thrift" >> $GITHUB_PATH
'
- name: Set up Python ${{ matrix.python-version }}
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
'
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe
- name: Download native binaries
uses: actions/download-artifact@v3
with:
name: native_binaries.${{ matrix.python-version }}.Linux-x86_64
- name: Run Python test shard 9/10
run: './pants test --shard=9/10 ::
'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-python-test-9_10-Linux-x86_64
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- '3.7'
timeout-minutes: 90
test_python_macos11_x86_64:
env:
ARCHFLAGS: -arch x86_64
if: (github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.docs_only != 'true')
name: Test Python (macOS11-x86_64)
needs:
- bootstrap_pants_macos11_x86_64
- classify_changes
runs-on:
- macos-11
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- name: Install AdoptJDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: '11'
- name: Set up Python ${{ matrix.python-version }}
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
'
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe
- name: Download native binaries
uses: actions/download-artifact@v3
with:
name: native_binaries.${{ matrix.python-version }}.macOS11-x86_64
- name: Run Python tests
run: './pants --tag=+platform_specific_behavior test :: -- -m platform_specific_behavior
'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-python-test-macOS11-x86_64
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- '3.7'
timeout-minutes: 90
name: Pull Request CI
'on':
pull_request: {}
push:
branches-ignore:
- dependabot/**