-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[workflow:nightly] Rebuild CI infra, add nightly workflow.
- Loading branch information
1 parent
7874135
commit 3dbd30b
Showing
26 changed files
with
2,164 additions
and
656 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,95 @@ | ||
name: "CCCL Build Workflow" | ||
description: "Parses a matrix definition and exports a set of dispatchable build/test/etc jobs." | ||
|
||
inputs: | ||
workflows: | ||
description: "Space separated list of workflows in matrix file to run" | ||
required: true | ||
skip_tests: | ||
description: "Skip running tests" | ||
default: "false" | ||
required: false | ||
inspect_changes_script: | ||
description: "If defined, run this script to determine which projects/deps need to be tested." | ||
default: "" | ||
required: false | ||
inspect_changes_base_sha: | ||
description: "If defined, use this base ref for inspect-changes script." | ||
default: "" | ||
required: false | ||
matrix_file: | ||
description: "Path to the matrix file in the consumer repository." | ||
default: "ci/matrix.yaml" | ||
required: false | ||
matrix_parser: | ||
description: "Path to the matrix parser script (default if blank: build-workflow.py from action dir)" | ||
default: "" | ||
required: false | ||
|
||
outputs: | ||
workflow: | ||
description: "The dispatchable workflow matrix" | ||
value: ${{ steps.build-workflow.outputs.workflow }} | ||
workflow_keys: | ||
description: "The keys of the parsed workflow" | ||
value: ${{ steps.build-workflow.outputs.workflow_keys }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
|
||
- name: Inspect changes | ||
if: ${{ inputs.inspect_changes_script != '' && inputs.inspect_changes_base_sha != '' }} | ||
id: inspect-changes | ||
shell: bash --noprofile --norc -euo pipefail {0} | ||
env: | ||
base_ref: ${{ inputs.inspect_changes_base_sha }} | ||
run: | | ||
echo "Running inspect-changes script..." | ||
${{ inputs.inspect_changes_script }} ${base_ref} ${GITHUB_SHA} | ||
echo "Exporting summary..." | ||
mkdir workflow | ||
cp ${GITHUB_STEP_SUMMARY} workflow/changes.md | ||
- name: Parse matrix file into a workflow | ||
id: build-workflow | ||
shell: bash --noprofile --norc -euo pipefail {0} | ||
env: | ||
skip_tests: ${{ inputs.skip_tests == 'true' && '--skip-tests' || ''}} | ||
dirty_projects_flag: ${{ steps.inspect-changes.outputs.dirty_projects != '' && '--dirty-projects' || ''}} | ||
dirty_projects: ${{ steps.inspect-changes.outputs.dirty_projects }} | ||
matrix_parser: ${{ inputs.matrix_parser && inputs.matrix_parser || '${GITHUB_ACTION_PATH}/build-workflow.py' }} | ||
run: | | ||
echo "Parsing matrix file into a workflow..." | ||
${{ env.matrix_parser }} ${{ inputs.matrix_file }} \ | ||
--workflows ${{ inputs.workflows }} \ | ||
${{ env.skip_tests }} \ | ||
${{ env.dirty_projects_flag }} ${{ env.dirty_projects }} | ||
echo "::group::Workflow" | ||
cat workflow/workflow.json | ||
echo "::endgroup::" | ||
echo "::group::Runners" | ||
cat workflow/runner_summary.json | jq -r '"# \(.heading)\n\n\(.body)"' | tee -a "${GITHUB_STEP_SUMMARY}" | ||
echo "::endgroup::" | ||
echo "::group::Job List" | ||
cat workflow/job_list.txt | ||
echo "::endgroup::" | ||
echo "Setting outputs..." | ||
echo "::group::GHA Output: WORKFLOW" | ||
printf "WORKFLOW=%s\n" "$(cat workflow/workflow.json | jq -c '.')" | tee -a "${GITHUB_OUTPUT}" | ||
echo "::endgroup::" | ||
echo "::group::GHA Output: WORKFLOW_KEYS" | ||
printf "WORKFLOW_KEYS=%s\n" "$(cat workflow/workflow_keys.json | jq -c '.')" | tee -a "${GITHUB_OUTPUT}" | ||
echo "::endgroup::" | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: workflow | ||
path: workflow/ |
Oops, something went wrong.