Header Update #12
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: Header Update | |
on: workflow_dispatch | |
jobs: | |
header-update: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update known-good | |
run: | | |
python scripts/update_deps.py --no-build --dir external --roll-mode latest-tag --roll Vulkan-Headers Vulkan-Loader Vulkan-Utility-Libraries Vulkan-Tools | |
echo HEADER_VERSION=$(jq -r '.["repos"][] | select(.name=="Vulkan-Headers").commit' scripts/known_good.json) >> $GITHUB_ENV | |
- name: Generate source | |
continue-on-error: true | |
run: python scripts/generate_source.py external/Vulkan-Headers/registry external/SPIRV-Headers/include/spirv/unified1 | |
- name: Generate validation stats | |
continue-on-error: true | |
run: python scripts/vk_validation_stats.py external/Vulkan-Headers/registry/validusage.json -spirvtools external/SPIRV-Tools -summary -c > stats.txt | |
- name: Commit | |
run: | | |
git config user.name 'github-actions[bot]' | |
git config user.email 'github-actions[bot]@users.noreply.github.com' | |
git checkout -b gha-header-update-$HEADER_VERSION | |
git commit -a -m "build: Update to header $HEADER_VERSION" | |
git push --force origin gha-header-update-$HEADER_VERSION | |
- name: Open PR | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
echo "Generated by ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> body.md | |
echo "### Summary\n\`\`\`\n$(git show --oneline --stat)\`\`\`" >> body.md | |
echo "### Validation Statistics\n\`\`\`\n$(cat stats.txt)\`\`\`" >> body.md | |
gh pr create --fill --body-file body.md |