Skip to content

Daily Extended Python Testing #487

Daily Extended Python Testing

Daily Extended Python Testing #487

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
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'
name: Bootstrap Pants, test Rust (Linux-ARM64)
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.66.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'
- if: github.event_name != 'pull_request'
name: Setup toolchain auth
run: 'echo TOOLCHAIN_AUTH_TOKEN="${{ secrets.TOOLCHAIN_AUTH_TOKEN }}" >> $GITHUB_ENV
'
- 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
strategy:
matrix:
python-version:
- '3.8'
- '3.9'
timeout-minutes: 60
bootstrap_pants_linux_x86_64:
env:
PANTS_REMOTE_CACHE_READ: 'false'
PANTS_REMOTE_CACHE_WRITE: 'false'
if: github.repository_owner == 'pantsbuild'
name: Bootstrap Pants, test and lint Rust (Linux-x86_64)
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.66.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'
- if: github.event_name != 'pull_request'
name: Setup toolchain auth
run: 'echo TOOLCHAIN_AUTH_TOKEN="${{ secrets.TOOLCHAIN_AUTH_TOKEN }}" >> $GITHUB_ENV
'
- 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.8'
- '3.9'
timeout-minutes: 60
bootstrap_pants_macos11_x86_64:
env:
PANTS_REMOTE_CACHE_READ: 'false'
PANTS_REMOTE_CACHE_WRITE: 'false'
if: github.repository_owner == 'pantsbuild'
name: Bootstrap Pants, test Rust (macOS11-x86_64)
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.66.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'
- if: github.event_name != 'pull_request'
name: Setup toolchain auth
run: 'echo TOOLCHAIN_AUTH_TOKEN="${{ secrets.TOOLCHAIN_AUTH_TOKEN }}" >> $GITHUB_ENV
'
- 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.8'
- '3.9'
timeout-minutes: 60
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
lint_python:
if: github.repository_owner == 'pantsbuild'
name: Lint Python and Shell
needs: bootstrap_pants_linux_x86_64
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: Download native binaries
uses: actions/download-artifact@v3
with:
name: native_binaries.${{ matrix.python-version }}.Linux-x86_64
- if: github.event_name != 'pull_request'
name: Setup toolchain auth
run: 'echo TOOLCHAIN_AUTH_TOKEN="${{ secrets.TOOLCHAIN_AUTH_TOKEN }}" >> $GITHUB_ENV
'
- 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.8'
- '3.9'
timeout-minutes: 30
test_python_linux_arm64:
env:
PANTS_CONFIG_FILES: +['pants.ci.toml','pants.ci.aarch64.toml']
if: github.repository_owner == 'pantsbuild'
name: Test Python (Linux-ARM64)
needs: bootstrap_pants_linux_arm64
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
- if: github.event_name != 'pull_request'
name: Setup toolchain auth
run: 'echo TOOLCHAIN_AUTH_TOKEN="${{ secrets.TOOLCHAIN_AUTH_TOKEN }}" >> $GITHUB_ENV
'
- 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.8'
- '3.9'
timeout-minutes: 90
test_python_linux_x86_64_0:
env: {}
if: github.repository_owner == 'pantsbuild'
name: Test Python (Linux-x86_64) Shard 0/3
needs: bootstrap_pants_linux_x86_64
runs-on:
- ubuntu-20.04
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: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.17.1
- 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
- if: github.event_name != 'pull_request'
name: Setup toolchain auth
run: 'echo TOOLCHAIN_AUTH_TOKEN="${{ secrets.TOOLCHAIN_AUTH_TOKEN }}" >> $GITHUB_ENV
'
- name: Run Python test shard 0/3
run: './pants test --shard=0/3 ::
'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-python-test-0_3-Linux-x86_64
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- '3.8'
- '3.9'
timeout-minutes: 90
test_python_linux_x86_64_1:
env: {}
if: github.repository_owner == 'pantsbuild'
name: Test Python (Linux-x86_64) Shard 1/3
needs: bootstrap_pants_linux_x86_64
runs-on:
- ubuntu-20.04
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: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.17.1
- 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
- if: github.event_name != 'pull_request'
name: Setup toolchain auth
run: 'echo TOOLCHAIN_AUTH_TOKEN="${{ secrets.TOOLCHAIN_AUTH_TOKEN }}" >> $GITHUB_ENV
'
- name: Run Python test shard 1/3
run: './pants test --shard=1/3 ::
'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-python-test-1_3-Linux-x86_64
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- '3.8'
- '3.9'
timeout-minutes: 90
test_python_linux_x86_64_2:
env: {}
if: github.repository_owner == 'pantsbuild'
name: Test Python (Linux-x86_64) Shard 2/3
needs: bootstrap_pants_linux_x86_64
runs-on:
- ubuntu-20.04
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: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.17.1
- 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
- if: github.event_name != 'pull_request'
name: Setup toolchain auth
run: 'echo TOOLCHAIN_AUTH_TOKEN="${{ secrets.TOOLCHAIN_AUTH_TOKEN }}" >> $GITHUB_ENV
'
- name: Run Python test shard 2/3
run: './pants test --shard=2/3 ::
'
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-python-test-2_3-Linux-x86_64
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- '3.8'
- '3.9'
timeout-minutes: 90
test_python_macos11_x86_64:
env:
ARCHFLAGS: -arch x86_64
if: github.repository_owner == 'pantsbuild'
name: Test Python (macOS11-x86_64)
needs: bootstrap_pants_macos11_x86_64
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
- if: github.event_name != 'pull_request'
name: Setup toolchain auth
run: 'echo TOOLCHAIN_AUTH_TOKEN="${{ secrets.TOOLCHAIN_AUTH_TOKEN }}" >> $GITHUB_ENV
'
- 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.8'
- '3.9'
timeout-minutes: 90
name: Daily Extended Python Testing
'on':
schedule:
- cron: 45 8 * * *