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

Fix Several Problems with Auto-Issue Creation #36

Merged
merged 5 commits into from
Nov 3, 2023
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
37 changes: 24 additions & 13 deletions .github/workflows/nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,33 @@ on:

jobs:
call-workflow:
uses: ./.github/workflows/test-plugin.yml
with:
triton-ref: 'main'
triton-shared-ref: 'main'
force-failure: ${{ inputs.force-failure }}
report-failure:
runs-on: ubuntu-latest
needs: [call-workflow]
if: ${{ always() && inputs.notify-on-failure && needs.call-workflow.result == 'failure' }}
steps:
- name: Force Failure
if: ${{ github.event.inputs.force-failure }}
run: exit 1
- name: Run Triton-Shared Testing
uses: ./.github/workflows/test-plugin.yml
with:
triton-ref: 'main'
triton-shared-ref: 'main'
- name: Report Failure
if: ${{ failure() }}
run: |
gh --repo ${{ github.repository }} issue create \
--title "Rolling Build Failure $(date +'%Y-%m-%d')" \
--body "cc @microsoft/aifx-compilers
The rolling build has failed. See: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
issues=$(gh --repo microsoft/triton-shared issue list --label nightly-build-failure --state open)
build_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
notificiation_list="@microsoft/aifx-compilers"
repo=microsoft/triton-shared #"${{ github.repository }}"
if [ -z "$issues" ]; then
gh --repo $repo issue create \
--title "Nightly Build Failure $(date +'%Y-%m-%d')" \
--label "nightly-build-failure" \
--body "cc $notificiation_list
The nightly build has failed. See: $build_url"
else
issue_number=$(echo "$issues" | head -n 1 | awk '{print $1}')
gh --repo $repo issue comment $issue_number \
--body "cc $notificiation_list
The nightly build has failed again. See: $build_url"
fi
env:
GH_TOKEN: ${{ github.token }}
32 changes: 32 additions & 0 deletions .github/workflows/test-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
triton-shared-ref:
required: true
type: string
force-failure:
default: false
type: boolean
workflow_dispatch:
inputs:
triton-ref:
Expand All @@ -17,12 +20,19 @@ on:
triton-shared-ref:
required: true
type: string
force-failure:
default: false
type: boolean


jobs:
build_and_test_triton_shared:
runs-on: ubuntu-latest

steps:
- name: Force Failure
if: ${{ inputs.force-failure }}
run: exit 1

- name: Checkout Triton
uses: actions/checkout@v4
Expand Down Expand Up @@ -72,3 +82,25 @@ jobs:
echo "Coult not find '${LIT_TEST_DIR}'" ; exit -1
fi
lit -v "${LIT_TEST_DIR}"

- name: Report Failure
if: ${{ inputs.notify-on-failure && failure() }}
run: |
issues=$(gh --repo microsoft/triton-shared issue list --label nightly-build-failure --state open)
build_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
notificiation_list="@microsoft/aifx-compilers"
repo=microsoft/triton-shared #"${{ github.repository }}"
if [ -z "$issues" ]; then
gh --repo $repo issue create \
--title "Nightly Build Failure $(date +'%Y-%m-%d')" \
--label "nightly-build-failure" \
--body "cc $notificiation_list
The nightly build has failed. See: $build_url"
else
issue_number=$(echo "$issues" | head -n 1 | awk '{print $1}')
gh --repo $repo issue comment $issue_number \
--body "cc $notificiation_list
The nightly build has failed again. See: $build_url"
fi
env:
GH_TOKEN: ${{ github.token }}
Loading