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

Simplify generate_github_workflow.py #11866

Merged
merged 4 commits into from
Apr 9, 2021
Merged
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
53 changes: 43 additions & 10 deletions .github/workflows/test-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

env:
PANTS_CONFIG_FILES: +['pants.ci.toml']
PANTS_REMOTE_CACHE_READ: 'true'
PANTS_REMOTE_CACHE_WRITE: 'true'
RUST_BACKTRACE: all
jobs:
bootstrap_pants_linux:
Expand Down Expand Up @@ -44,6 +42,13 @@ jobs:
uses: actions/setup-python@v2
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_SETUP_INTERPRETER_CONSTRAINTS=[''==${{ matrix.python-version
}}.*'']" >> $GITHUB_ENV

'
- name: Cache Rust toolchain
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -130,7 +135,7 @@ jobs:
strategy:
matrix:
python-version:
- 3.8.3
- '3.8'
bootstrap_pants_macos:
name: Bootstrap Pants, test Rust (macOS)
runs-on: macos-10.15
Expand Down Expand Up @@ -161,6 +166,13 @@ jobs:
uses: actions/setup-python@v2
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_SETUP_INTERPRETER_CONSTRAINTS=[''==${{ matrix.python-version
}}.*'']" >> $GITHUB_ENV

'
- name: Cache Rust toolchain
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -231,7 +243,7 @@ jobs:
strategy:
matrix:
python-version:
- 3.8.3
- '3.8'
lint_python:
name: Lint Python and Shell
needs: bootstrap_pants_linux
Expand Down Expand Up @@ -268,6 +280,13 @@ jobs:
uses: actions/setup-python@v2
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_SETUP_INTERPRETER_CONSTRAINTS=[''==${{ matrix.python-version
}}.*'']" >> $GITHUB_ENV

'
- name: Cache Pants Virtualenv
uses: actions/cache@v2
with:
Expand All @@ -289,15 +308,15 @@ jobs:
./pants lint typecheck ::

'
- name: Upload pants log
- name: Upload pants.log
uses: actions/upload-artifact@v2
with:
name: pants-log-lint
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- 3.8.3
- '3.8'
test_python_linux:
name: Test Python (Linux)
needs: bootstrap_pants_linux
Expand Down Expand Up @@ -334,6 +353,13 @@ jobs:
uses: actions/setup-python@v2
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_SETUP_INTERPRETER_CONSTRAINTS=[''==${{ matrix.python-version
}}.*'']" >> $GITHUB_ENV

'
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe
- name: Cache Pants Virtualenv
Expand All @@ -355,15 +381,15 @@ jobs:
run: './pants test ::

'
- name: Upload pants log
- name: Upload pants.log
uses: actions/upload-artifact@v2
with:
name: pants-log-python-test-linux
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- 3.8.3
- '3.8'
test_python_macos:
env:
ARCHFLAGS: -arch x86_64
Expand Down Expand Up @@ -402,6 +428,13 @@ jobs:
uses: actions/setup-python@v2
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_SETUP_INTERPRETER_CONSTRAINTS=[''==${{ matrix.python-version
}}.*'']" >> $GITHUB_ENV

'
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe
- name: Cache Pants Virtualenv
Expand All @@ -423,15 +456,15 @@ jobs:
run: './pants --tag=+platform_specific_behavior test ::

'
- name: Upload pants log
- name: Upload pants.log
uses: actions/upload-artifact@v2
with:
name: pants-log-python-test-macos
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- 3.8.3
- '3.8'
name: Daily Extended Python Testing
'on':
schedule:
Expand Down
53 changes: 43 additions & 10 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

env:
PANTS_CONFIG_FILES: +['pants.ci.toml']
PANTS_REMOTE_CACHE_READ: 'true'
PANTS_REMOTE_CACHE_WRITE: 'true'
RUST_BACKTRACE: all
jobs:
bootstrap_pants_linux:
Expand Down Expand Up @@ -44,6 +42,13 @@ jobs:
uses: actions/setup-python@v2
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_SETUP_INTERPRETER_CONSTRAINTS=[''==${{ matrix.python-version
}}.*'']" >> $GITHUB_ENV

'
- name: Cache Rust toolchain
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -130,7 +135,7 @@ jobs:
strategy:
matrix:
python-version:
- 3.7.10
- '3.7'
bootstrap_pants_macos:
name: Bootstrap Pants, test Rust (macOS)
runs-on: macos-10.15
Expand Down Expand Up @@ -161,6 +166,13 @@ jobs:
uses: actions/setup-python@v2
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_SETUP_INTERPRETER_CONSTRAINTS=[''==${{ matrix.python-version
}}.*'']" >> $GITHUB_ENV

'
- name: Cache Rust toolchain
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -231,7 +243,7 @@ jobs:
strategy:
matrix:
python-version:
- 3.7.10
- '3.7'
build_wheels_linux:
container: quay.io/pypa/manylinux2014_x86_64:latest
name: Build wheels and fs_util (Linux)
Expand Down Expand Up @@ -395,6 +407,13 @@ jobs:
uses: actions/setup-python@v2
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_SETUP_INTERPRETER_CONSTRAINTS=[''==${{ matrix.python-version
}}.*'']" >> $GITHUB_ENV

'
- name: Cache Pants Virtualenv
uses: actions/cache@v2
with:
Expand All @@ -416,15 +435,15 @@ jobs:
./pants lint typecheck ::

'
- name: Upload pants log
- name: Upload pants.log
uses: actions/upload-artifact@v2
with:
name: pants-log-lint
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- 3.7.10
- '3.7'
test_python_linux:
name: Test Python (Linux)
needs: bootstrap_pants_linux
Expand Down Expand Up @@ -461,6 +480,13 @@ jobs:
uses: actions/setup-python@v2
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_SETUP_INTERPRETER_CONSTRAINTS=[''==${{ matrix.python-version
}}.*'']" >> $GITHUB_ENV

'
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe
- name: Cache Pants Virtualenv
Expand All @@ -482,15 +508,15 @@ jobs:
run: './pants test ::

'
- name: Upload pants log
- name: Upload pants.log
uses: actions/upload-artifact@v2
with:
name: pants-log-python-test-linux
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- 3.7.10
- '3.7'
test_python_macos:
env:
ARCHFLAGS: -arch x86_64
Expand Down Expand Up @@ -529,6 +555,13 @@ jobs:
uses: actions/setup-python@v2
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_SETUP_INTERPRETER_CONSTRAINTS=[''==${{ matrix.python-version
}}.*'']" >> $GITHUB_ENV

'
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe
- name: Cache Pants Virtualenv
Expand All @@ -550,15 +583,15 @@ jobs:
run: './pants --tag=+platform_specific_behavior test ::

'
- name: Upload pants log
- name: Upload pants.log
uses: actions/upload-artifact@v2
with:
name: pants-log-python-test-macos
path: .pants.d/pants.log
strategy:
matrix:
python-version:
- 3.7.10
- '3.7'
name: Pull Request CI
'on':
- push
Expand Down
Loading