-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified OpenCL generator to forward declare all variables. (#1088)
* Modified OpenCL generator to forward declare all variables. - Backported #1084. Co-authored-by: Ivan Pavlovic <[email protected]> Co-authored-by: Jonathan Giannuzzi <[email protected]>
- Loading branch information
1 parent
30aabb5
commit df6b23a
Showing
7 changed files
with
138 additions
and
17 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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Check required jobs | ||
|
||
# This workflow is triggered when a workflow run for the CI is completed. | ||
# It checks if the "All required checks done" job was actually successful | ||
# (and not just skipped) and creates a check run if that is the case. The | ||
# check run can be used to protect the main branch from being merged if the | ||
# CI is not passing. | ||
|
||
on: | ||
workflow_run: | ||
types: [completed] | ||
workflows: | ||
- CI | ||
- Deploy Site with Jekyll, GitHub Pages | ||
|
||
permissions: | ||
actions: read | ||
checks: write | ||
|
||
jobs: | ||
required-jobs: | ||
name: Check required jobs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
// list jobs for worklow run attempt | ||
const { data: { jobs } } = await github.rest.actions.listJobsForWorkflowRunAttempt({ | ||
owner: context.payload.repository.owner.login, | ||
repo: context.payload.repository.name, | ||
run_id: context.payload.workflow_run.id, | ||
attempt_number: context.payload.workflow_run.run_attempt, | ||
}); | ||
// check if required job was successful | ||
var success = false; | ||
core.info(`Checking jobs for workflow run ${context.payload.workflow_run.html_url}`); | ||
jobs.forEach(job => { | ||
var mark = '-' | ||
if (job.name === 'All required checks done' && job.conclusion === 'success') { | ||
success = true; | ||
mark = '✅'; | ||
} | ||
core.info(`${mark} ${job.name}: ${job.conclusion}`); | ||
}); | ||
// create check run if job was successful | ||
if (success) { | ||
await github.rest.checks.create({ | ||
owner: context.payload.repository.owner.login, | ||
repo: context.payload.repository.name, | ||
name: 'All required checks succeeded', | ||
head_sha: context.payload.workflow_run.head_sha, | ||
status: 'completed', | ||
conclusion: 'success', | ||
output: { | ||
title: 'All required checks succeeded', | ||
summary: `See [workflow run](${context.payload.workflow_run.html_url}) for details.`, | ||
}, | ||
}); | ||
} |
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
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
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
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
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
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