Skip to content
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
52 changes: 7 additions & 45 deletions .github/workflows/build_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,13 @@
name: Build Tests

on:
workflow_dispatch:
inputs:
tpu-type:
description: 'TPU Type'
required: true
default: 'v4-8'
type: choice
options:
- v4-8
pull_request: # By default this runs for types assigned, opened and synchronize.
pull_request:

permissions:
contents: read

jobs:
set-variables:
runs-on: [ubuntu-22.04]
concurrency:
group: set-variables-${{ github.event.number}}
cancel-in-progress: true
outputs:
run-id: ${{steps.set-run-id.outputs.run-id}}
steps:
- name: set run-id
id: set-run-id
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
RUN_ID="dispatch"
elif [ "${{ github.ref }}" == "refs/heads/main" ]; then
RUN_ID="main"
else
RUN_ID="${{ github.event.number }}"
fi
echo run-id=$RUN_ID >> $GITHUB_OUTPUT
install-dependencies:
needs: [set-variables]
runs-on: ubuntu-22.04
strategy:
matrix:
Expand Down Expand Up @@ -85,23 +59,11 @@ jobs:
${{env.pythonLocation}}
key: xpk-deps-${{ matrix.python-version }}-${{github.run_id}}-${{github.run_attempt}}
linter:
needs: [install-dependencies, set-variables]
concurrency: # We support one build or nightly test to run at a time currently.
group: linter-${{needs.set-variables.outputs.run-id}}
cancel-in-progress: true
needs: [install-dependencies]
uses: ./.github/workflows/reusable_lint_and_format.yml
with:
run-id: '${{needs.set-variables.outputs.run-id}}'
verify-goldens:
needs: [install-dependencies, set-variables]
needs: [install-dependencies]
uses: ./.github/workflows/reusable_goldens.yaml
with:
run-id: '${{needs.set-variables.outputs.run-id}}'
run-unit-tests:
needs: [install-dependencies, set-variables]
needs: [install-dependencies]
uses: ./.github/workflows/reusable_unit_tests.yaml
with:
run-id: ${{needs.set-variables.outputs.run-id}}
concurrency: # We support one build or nightly test to run at a time currently.
group: unit-tests-${{needs.set-variables.outputs.run-id}}
cancel-in-progress: true
4 changes: 0 additions & 4 deletions .github/workflows/reusable_goldens.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@

on:
workflow_call:
inputs:
run-id:
required: true
type: string

permissions:
contents: read
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/reusable_lint_and_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ name: Lint and Format

on:
workflow_call:
inputs:
run-id:
required: true
type: string

permissions:
contents: read

jobs:
build-and-test:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/reusable_unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@

on:
workflow_call:
inputs:
run-id:
required: true
type: string

permissions:
contents: read

jobs:
run-unit-tests:
Expand Down
Loading