|
1 | 1 | # SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
2 | 2 | # SPDX-License-Identifier: BSD-2-Clause |
3 | 3 |
|
4 | | -on: |
5 | | - workflow_call: |
6 | | - inputs: |
7 | | - dependency_generator_config_file_path: |
8 | | - description: "Location of the dependencies.yaml configuration file" |
9 | | - default: "dependencies.yaml" |
10 | | - required: false |
11 | | - type: string |
12 | | - enable_check_size: |
13 | | - description: "Whether to enable the size checker" |
14 | | - default: true |
15 | | - type: boolean |
16 | | - required: false |
17 | | - enable_check_style: |
18 | | - description: "Whether to enable the style checker" |
19 | | - default: true |
20 | | - type: boolean |
21 | | - required: false |
22 | | - enable_check_generated_files: |
23 | | - description: "Whether to enable the generated files checker" |
24 | | - default: true |
25 | | - type: boolean |
26 | | - required: false |
27 | | - enable_check_pr_job_dependencies: |
28 | | - description: "Whether to enable the PR workflow dependency checker" |
29 | | - default: true |
30 | | - type: boolean |
31 | | - required: false |
32 | | - ignored_pr_jobs: |
33 | | - description: "Space separated list of jobs to ignore when checking PR workflow dependencies" |
34 | | - default: "" |
35 | | - type: string |
36 | | - required: false |
37 | | - |
38 | 4 | defaults: |
39 | 5 | run: |
40 | 6 | shell: bash |
41 | 7 |
|
42 | 8 | jobs: |
43 | | - other-checks: |
44 | | - runs-on: ubuntu-latest |
45 | | - container: |
46 | | - image: rapidsai/ci-conda:latest |
47 | | - env: |
48 | | - RAPIDS_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
49 | | - steps: |
50 | | - - name: Checkout code |
51 | | - uses: actions/checkout@v4 |
52 | | - - name: Telemetry setup |
53 | | - uses: rapidsai/shared-actions/telemetry-dispatch-setup@main |
54 | | - continue-on-error: true |
55 | | - if: ${{ vars.TELEMETRY_ENABLED == 'true' && github.run_attempt == '1' }} |
56 | | - - name: Get PR Info |
57 | | - id: get-pr-info |
58 | | - uses: nv-gha-runners/get-pr-info@main |
59 | | - - name: Run rapids-size-checker |
60 | | - if: ${{ inputs.enable_check_size }} |
61 | | - run: rapids-size-checker |
62 | | - env: |
63 | | - RAPIDS_BASE_BRANCH: ${{ fromJSON(steps.get-pr-info.outputs.pr-info).base.ref }} |
64 | | - - name: Check workflow file dependencies |
65 | | - if: ${{ inputs.enable_check_pr_job_dependencies }} |
66 | | - run: rapids-check-pr-job-dependencies "${IGNORED_JOBS}" |
67 | | - env: |
68 | | - IGNORED_JOBS: ${{ inputs.ignored_pr_jobs }} |
69 | | - - name: Telemetry upload attributes |
70 | | - uses: rapidsai/shared-actions/telemetry-dispatch-stash-job-artifacts@main |
71 | | - continue-on-error: true |
72 | | - if: ${{ vars.TELEMETRY_ENABLED == 'true' && github.run_attempt == '1' }} |
73 | | - |
74 | 9 | check-style: |
75 | | - if: ${{ inputs.enable_check_style }} |
76 | 10 | runs-on: ubuntu-latest |
77 | 11 | container: |
78 | 12 | image: rapidsai/ci-conda:latest |
|
81 | 15 | uses: actions/checkout@v4 |
82 | 16 | with: |
83 | 17 | fetch-depth: 0 |
84 | | - - name: Telemetry setup |
85 | | - uses: rapidsai/shared-actions/telemetry-dispatch-setup@main |
86 | | - continue-on-error: true |
87 | | - if: ${{ vars.TELEMETRY_ENABLED == 'true' && github.run_attempt == '1' }} |
88 | | - - name: Get PR Info |
89 | | - id: get-pr-info |
90 | | - uses: nv-gha-runners/get-pr-info@main |
91 | 18 | - uses: actions/cache@v4 |
92 | 19 | with: |
93 | 20 | path: ~/.cache/pre-commit |
94 | 21 | key: pre-commit-0|${{ hashFiles('.pre-commit-config.yaml') }} |
95 | 22 | - name: Run ci/check_style.sh |
96 | 23 | run: ci/check_style.sh |
97 | | - env: |
98 | | - RAPIDS_BASE_BRANCH: ${{ fromJSON(steps.get-pr-info.outputs.pr-info).base.ref }} |
99 | | - - name: Telemetry upload attributes |
100 | | - uses: rapidsai/shared-actions/telemetry-dispatch-stash-job-artifacts@main |
101 | | - continue-on-error: true |
102 | | - if: ${{ vars.TELEMETRY_ENABLED == 'true' && github.run_attempt == '1' }} |
0 commit comments