-
Notifications
You must be signed in to change notification settings - Fork 575
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#7821: Move failure notification config to reusable workflow
Refactors the Github Action configs to move config to send notification email on master merge failure into a reusable workflow which is now used by all workflows instead of duplicating the logic 19 times. Issue: #7821
- Loading branch information
1 parent
18a77d5
commit a948042
Showing
10 changed files
with
188 additions
and
559 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,30 +98,6 @@ jobs: | |
CI_TRIGGER: ${{ github.event_name }} | ||
CI_BRANCH: ${{ github.ref }} | ||
|
||
- name: Send failure mail to dynamorio-devs | ||
if: failure() && github.ref == 'refs/heads/master' | ||
uses: dawidd6/action-send-mail@v2 | ||
with: | ||
server_address: smtp.gmail.com | ||
server_port: 465 | ||
username: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_USERNAME}} | ||
password: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_PASSWORD}} | ||
subject: | | ||
[${{github.repository}}] ${{github.workflow}} FAILED | ||
on ${{github.event_name}} at ${{github.ref}} | ||
body: | | ||
Github Actions CI workflow run FAILED! | ||
Workflow: ${{github.workflow}}/aarchxx-cross-compile | ||
Repository: ${{github.repository}} | ||
Branch ref: ${{github.ref}} | ||
SHA: ${{github.sha}} | ||
Triggering actor: ${{github.actor}} | ||
Triggering event: ${{github.event_name}} | ||
Run Id: ${{github.run_id}} | ||
See more details on github.com/DynamoRIO/dynamorio/actions/runs/${{github.run_id}} | ||
to: [email protected] | ||
from: Github Action CI | ||
|
||
# ARM cross-compile with gcc, with some tests run under QEMU. | ||
# We use a more recent Ubuntu for a more recent QEMU. | ||
arm-cross-compile: | ||
|
@@ -171,30 +147,6 @@ jobs: | |
CI_TRIGGER: ${{ github.event_name }} | ||
CI_BRANCH: ${{ github.ref }} | ||
|
||
- name: Send failure mail to dynamorio-devs | ||
if: failure() && github.ref == 'refs/heads/master' | ||
uses: dawidd6/action-send-mail@v2 | ||
with: | ||
server_address: smtp.gmail.com | ||
server_port: 465 | ||
username: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_USERNAME}} | ||
password: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_PASSWORD}} | ||
subject: | | ||
[${{github.repository}}] ${{github.workflow}} FAILED | ||
on ${{github.event_name}} at ${{github.ref}} | ||
body: | | ||
Github Actions CI workflow run FAILED! | ||
Workflow: ${{github.workflow}}/aarchxx-cross-compile | ||
Repository: ${{github.repository}} | ||
Branch ref: ${{github.ref}} | ||
SHA: ${{github.sha}} | ||
Triggering actor: ${{github.actor}} | ||
Triggering event: ${{github.event_name}} | ||
Run Id: ${{github.run_id}} | ||
See more details on github.com/DynamoRIO/dynamorio/actions/runs/${{github.run_id}} | ||
to: [email protected] | ||
from: Github Action CI | ||
|
||
# Android ARM cross-compile with gcc, no tests: | ||
android-arm-cross-compile: | ||
runs-on: ubuntu-20.04 | ||
|
@@ -243,30 +195,6 @@ jobs: | |
CI_BRANCH: ${{ github.ref }} | ||
run: ./suite/runsuite_wrapper.pl automated_ci 32_only | ||
|
||
- name: Send failure mail to dynamorio-devs | ||
if: failure() && github.ref == 'refs/heads/master' | ||
uses: dawidd6/action-send-mail@v2 | ||
with: | ||
server_address: smtp.gmail.com | ||
server_port: 465 | ||
username: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_USERNAME}} | ||
password: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_PASSWORD}} | ||
subject: | | ||
[${{github.repository}}] ${{github.workflow}} FAILED | ||
on ${{github.event_name}} at ${{github.ref}} | ||
body: | | ||
Github Actions CI workflow run FAILED! | ||
Workflow: ${{github.workflow}}/android-arm-cross-compile | ||
Repository: ${{github.repository}} | ||
Branch ref: ${{github.ref}} | ||
SHA: ${{github.sha}} | ||
Triggering actor: ${{github.actor}} | ||
Triggering event: ${{github.event_name}} | ||
Run Id: ${{github.run_id}} | ||
See more details on github.com/DynamoRIO/dynamorio/actions/runs/${{github.run_id}} | ||
to: [email protected] | ||
from: Github Action CI | ||
|
||
# Android AArch64 cross-compile with LLVM, no tests: | ||
android-aarch64-cross-compile: | ||
runs-on: ubuntu-22.04 | ||
|
@@ -309,30 +237,6 @@ jobs: | |
CI_BRANCH: ${{ github.ref }} | ||
run: ./suite/runsuite_wrapper.pl automated_ci 64_only | ||
|
||
- name: Send failure mail to dynamorio-devs | ||
if: failure() && github.ref == 'refs/heads/master' | ||
uses: dawidd6/action-send-mail@v2 | ||
with: | ||
server_address: smtp.gmail.com | ||
server_port: 465 | ||
username: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_USERNAME}} | ||
password: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_PASSWORD}} | ||
subject: | | ||
[${{github.repository}}] ${{github.workflow}} FAILED | ||
on ${{github.event_name}} at ${{github.ref}} | ||
body: | | ||
Github Actions CI workflow run FAILED! | ||
Workflow: ${{github.workflow}}/android-aarch64-cross-compile | ||
Repository: ${{github.repository}} | ||
Branch ref: ${{github.ref}} | ||
SHA: ${{github.sha}} | ||
Triggering actor: ${{github.actor}} | ||
Triggering event: ${{github.event_name}} | ||
Run Id: ${{github.run_id}} | ||
See more details on github.com/DynamoRIO/dynamorio/actions/runs/${{github.run_id}} | ||
to: [email protected] | ||
from: Github Action CI | ||
|
||
# AArch64 drdecode and drmemtrace on x86: | ||
a64-on-x86: | ||
runs-on: ubuntu-20.04 | ||
|
@@ -369,26 +273,18 @@ jobs: | |
CI_TRIGGER: ${{ github.event_name }} | ||
CI_BRANCH: ${{ github.ref }} | ||
|
||
- name: Send failure mail to dynamorio-devs | ||
if: failure() && github.ref == 'refs/heads/master' | ||
uses: dawidd6/action-send-mail@v2 | ||
send-failure-notification: | ||
uses: ./.github/workflows/failure-notification.yml | ||
needs: [aarch64-cross-compile, arm-cross-compile, android-arm-cross-compile, android-aarch64-cross-compile, a64-on-x86] | ||
# We need this to ensure this job runs even if there is failure in | ||
# any of the workflows marked as needed. | ||
if: ${{ always() }} | ||
with: | ||
server_address: smtp.gmail.com | ||
server_port: 465 | ||
username: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_USERNAME}} | ||
password: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_PASSWORD}} | ||
subject: | | ||
[${{github.repository}}] ${{github.workflow}} FAILED | ||
on ${{github.event_name}} at ${{github.ref}} | ||
body: | | ||
Github Actions CI workflow run FAILED! | ||
Workflow: ${{github.workflow}}/a64-on-x86 | ||
Repository: ${{github.repository}} | ||
Branch ref: ${{github.ref}} | ||
SHA: ${{github.sha}} | ||
Triggering actor: ${{github.actor}} | ||
Triggering event: ${{github.event_name}} | ||
Run Id: ${{github.run_id}} | ||
See more details on github.com/DynamoRIO/dynamorio/actions/runs/${{github.run_id}} | ||
to: [email protected] | ||
from: Github Action CI | ||
test_suite_status: ${{ format('{0} {1} | {2} {3} | {4} {5} | {6} {7} | {8} {9}', | ||
'aarch64-cross-compile', needs.aarch64-cross-compile.result, | ||
'arm-cross-compile', needs.arm-cross-compile.result, | ||
'android-arm-cross-compile', needs.android-arm-cross-compile.result, | ||
'android-aarch64-cross-compile', needs.android-aarch64-cross-compile.result, | ||
'a64-on-x86', needs.a64-on-x86.result) }} | ||
test_suite_results_only: ${{ join(needs.*.result, ',') }} | ||
secrets: inherit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,26 +128,14 @@ jobs: | |
CI_BRANCH: ${{ github.ref }} | ||
if: ${{ matrix.sve == true && matrix.sve_length != ''}} | ||
|
||
- name: Send failure mail to dynamorio-devs | ||
if: failure() && github.ref == 'refs/heads/master' | ||
uses: dawidd6/action-send-mail@v2 | ||
with: | ||
server_address: smtp.gmail.com | ||
server_port: 465 | ||
username: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_USERNAME}} | ||
password: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_PASSWORD}} | ||
subject: | | ||
[${{github.repository}}] ${{github.workflow}} FAILED | ||
on ${{github.event_name}} at ${{github.ref}} | ||
body: | | ||
Github Actions CI workflow run FAILED! | ||
Workflow: ${{github.workflow}}/x86-32 | ||
Repository: ${{github.repository}} | ||
Branch ref: ${{github.ref}} | ||
SHA: ${{github.sha}} | ||
Triggering actor: ${{github.actor}} | ||
Triggering event: ${{github.event_name}} | ||
Run Id: ${{github.run_id}} | ||
See more details on github.com/DynamoRIO/dynamorio/actions/runs/${{github.run_id}} | ||
to: [email protected] | ||
from: Github Action CI | ||
send-failure-notification: | ||
uses: ./.github/workflows/failure-notification.yml | ||
needs: [aarch64-precommit] | ||
# We need this to ensure this job runs even if there is failure in | ||
# any of the workflows marked as needed. | ||
if: ${{ always() }} | ||
with: | ||
test_suite_status: ${{ format('{0} {1}', | ||
'aarch64-precommit', needs.aarch64-precommit.result) }} | ||
test_suite_results_only: ${{ join(needs.*.result, ',') }} | ||
secrets: inherit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,26 +87,15 @@ jobs: | |
CI_TRIGGER: ${{ github.event_name }} | ||
CI_BRANCH: ${{ github.ref }} | ||
|
||
- name: Send failure mail to dynamorio-devs | ||
if: failure() && github.ref == 'refs/heads/master' | ||
uses: dawidd6/action-send-mail@v2 | ||
|
||
send-failure-notification: | ||
uses: ./.github/workflows/failure-notification.yml | ||
needs: [clang-format] | ||
# We need this to ensure this job runs even if there is failure in | ||
# any of the workflows marked as needed. | ||
if: ${{ always() }} | ||
with: | ||
server_address: smtp.gmail.com | ||
server_port: 465 | ||
username: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_USERNAME}} | ||
password: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_PASSWORD}} | ||
subject: | | ||
[${{github.repository}}] ${{github.workflow}} FAILED | ||
on ${{github.event_name}} at ${{github.ref}} | ||
body: | | ||
Github Actions CI workflow run FAILED! | ||
Workflow: ${{github.workflow}}/clang-format | ||
Repository: ${{github.repository}} | ||
Branch ref: ${{github.ref}} | ||
SHA: ${{github.sha}} | ||
Triggering actor: ${{github.actor}} | ||
Triggering event: ${{github.event_name}} | ||
Run Id: ${{github.run_id}} | ||
See more details on github.com/DynamoRIO/dynamorio/actions/runs/${{github.run_id}} | ||
to: [email protected] | ||
from: Github Action CI | ||
test_suite_status: ${{ format('{0} {1}', | ||
'clang-format', needs.clang-format.result) }} | ||
test_suite_results_only: ${{ join(needs.*.result, ',') }} | ||
secrets: inherit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,26 +130,14 @@ jobs: | |
# We need a personal access token for write access to another repo. | ||
GITHUB_TOKEN: ${{ secrets.DOCS_TOKEN }} | ||
|
||
- name: Send failure mail to dynamorio-devs | ||
if: failure() && github.ref == 'refs/heads/master' | ||
uses: dawidd6/action-send-mail@v2 | ||
send-failure-notification: | ||
uses: ./.github/workflows/failure-notification.yml | ||
needs: [docs] | ||
# We need this to ensure this job runs even if there is failure in | ||
# any of the workflows marked as needed. | ||
if: ${{ always() }} | ||
with: | ||
server_address: smtp.gmail.com | ||
server_port: 465 | ||
username: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_USERNAME}} | ||
password: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_PASSWORD}} | ||
subject: | | ||
[${{github.repository}}] ${{github.workflow}} FAILED | ||
on ${{github.event_name}} at ${{github.ref}} | ||
body: | | ||
Github Actions CI workflow run FAILED! | ||
Workflow: ${{github.workflow}}/docs | ||
Repository: ${{github.repository}} | ||
Branch ref: ${{github.ref}} | ||
SHA: ${{github.sha}} | ||
Triggering actor: ${{github.actor}} | ||
Triggering event: ${{github.event_name}} | ||
Run Id: ${{github.run_id}} | ||
See more details on github.com/DynamoRIO/dynamorio/actions/runs/${{github.run_id}} | ||
to: [email protected] | ||
from: Github Action package jobs | ||
test_suite_status: ${{ format('{0} {1}', | ||
'docs', needs.docs.result) }} | ||
test_suite_results_only: ${{ join(needs.*.result, ',') }} | ||
secrets: inherit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,26 +86,14 @@ jobs: | |
CI_TRIGGER: ${{ github.event_name }} | ||
CI_BRANCH: ${{ github.ref }} | ||
|
||
- name: Send failure mail to dynamorio-devs | ||
if: failure() && github.ref == 'refs/heads/master' | ||
uses: dawidd6/action-send-mail@v2 | ||
send-failure-notification: | ||
uses: ./.github/workflows/failure-notification.yml | ||
needs: [osx-x86-64] | ||
# We need this to ensure this job runs even if there is failure in | ||
# any of the workflows marked as needed. | ||
if: ${{ always() }} | ||
with: | ||
server_address: smtp.gmail.com | ||
server_port: 465 | ||
username: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_USERNAME}} | ||
password: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_PASSWORD}} | ||
subject: | | ||
[${{github.repository}}] ${{github.workflow}} FAILED | ||
on ${{github.event_name}} at ${{github.ref}} | ||
body: | | ||
Github Actions CI workflow run FAILED! | ||
Workflow: ${{github.workflow}}/osx-x86-64 | ||
Repository: ${{github.repository}} | ||
Branch ref: ${{github.ref}} | ||
SHA: ${{github.sha}} | ||
Triggering actor: ${{github.actor}} | ||
Triggering event: ${{github.event_name}} | ||
Run Id: ${{github.run_id}} | ||
See more details on github.com/DynamoRIO/dynamorio/actions/runs/${{github.run_id}} | ||
to: [email protected] | ||
from: Github Action CI | ||
test_suite_status: ${{ format('{0} {1}', | ||
'osx-x86-64', needs.osx-x86-64.result) }} | ||
test_suite_results_only: ${{ join(needs.*.result, ',') }} | ||
secrets: inherit |
Oops, something went wrong.