Add tester for ViT #730
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: On PR | |
on: | |
workflow_dispatch: | |
inputs: | |
mlir_override: | |
description: 'Git SHA of commit in tenstorrent/tt-mlir' | |
required: false | |
type: string | |
pull_request: | |
branches: [ "main" ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
pre-commit: | |
uses: ./.github/workflows/pre-commit.yml | |
secrets: inherit | |
spdx: | |
uses: ./.github/workflows/spdx.yml | |
secrets: inherit | |
check-files: | |
runs-on: ubuntu-latest | |
outputs: | |
skip: ${{ steps.check.outputs.skip }} | |
steps: | |
- name: Check if ignored files are modified | |
id: check | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
all_match=true | |
if [ "${{ github.event_name }}" = "pull_request" ]; then | |
CHANGED_FILES=$(gh pr diff ${{ github.event.pull_request.number }} --name-only --repo ${{ github.repository }}) | |
for file in $CHANGED_FILES; | |
do | |
if [[ ! $file =~ ^.*\.(md|gitignore)$ && $file != *"LICENSE"* ]]; then | |
all_match=false | |
break | |
fi | |
done | |
else | |
all_match=false | |
fi | |
if [ "$all_match" = true ]; then | |
echo "skip=true" >> "$GITHUB_OUTPUT" | |
echo "> --- Build is skipped. Files in PR:" | |
echo "$CHANGED_FILES" | |
echo "< ---" | |
else | |
echo "skip=false" >> "$GITHUB_OUTPUT" | |
echo "> Build is required." | |
fi | |
build-and-test: | |
needs: [pre-commit, spdx, check-files] | |
if: needs.check-files.outputs.skip == 'false' | |
uses: ./.github/workflows/build-and-test.yml | |
secrets: inherit | |
with: | |
mlir_override: ${{ inputs.mlir_override }} | |
test_mark: 'push' | |
check-all-green: | |
if: always() | |
needs: | |
- pre-commit | |
- spdx | |
- check-files | |
- build-and-test | |
runs-on: Ubuntu-latest | |
steps: | |
- name: Check if the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
allowed-skips: build-and-test | |
jobs: ${{ toJSON(needs) }} |