forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (60 loc) · 2.09 KB
/
cache_comparison.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# GENERATED, DO NOT EDIT!
# To change, edit `src/python/pants_release/generate_github_workflows.py` and run:
# ./pants run src/python/pants_release/generate_github_workflows.py
jobs:
cache_comparison:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@v9
- env:
BASE_REF: ${{ github.event.inputs.base_ref }}
BUILD_COMMIT: ${{ github.event.inputs.build_commit }}
PANTS_ARGS: ${{ github.event.inputs.pants_args }}
SOURCE_DIFFSPEC: ${{ github.event.inputs.source_diffspec }}
SOURCE_DIFFSPEC_STEP: ${{ github.event.inputs.source_diffspec_step }}
name: Prepare cache comparison
run: 'MODE=debug ./pants package build-support/bin/cache_comparison.py
git fetch --no-tags --depth=1024 origin "$BASE_REF"
'
- env:
BASE_REF: ${{ github.event.inputs.base_ref }}
BUILD_COMMIT: ${{ github.event.inputs.build_commit }}
PANTS_ARGS: ${{ github.event.inputs.pants_args }}
SOURCE_DIFFSPEC: ${{ github.event.inputs.source_diffspec }}
SOURCE_DIFFSPEC_STEP: ${{ github.event.inputs.source_diffspec_step }}
name: Run cache comparison
run: "dist/build-support.bin/cache_comparison_py.pex \\\n --args=\"$PANTS_ARGS\"\
\ \\\n --build-commit=\"$BUILD_COMMIT\" \\\n --source-diffspec=\"$SOURCE_DIFFSPEC\"\
\ \\\n --source-diffspec-step=$SOURCE_DIFFSPEC_STEP\n"
timeout-minutes: 90
name: Cache Comparison
'on':
workflow_dispatch:
inputs:
base_ref:
default: main
required: false
type: string
build_commit:
required: true
type: string
pants_args:
default: 'check lint test ::'
required: false
type: string
source_diffspec:
required: true
type: string
source_diffspec_step:
default: 1
required: false
type: int