Update Vulkan Loader #86
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: Update Vulkan Loader | |
on: | |
schedule: | |
- cron: '0 16 * * 0' | |
workflow_dispatch: | |
jobs: | |
update-vulkan-loader: | |
name: Update Vulkan Loader | |
if: github.repository == 'GamesTrap/TRAP' | |
runs-on: [self-hosted, Linux, X64, ubuntu, cpu] | |
steps: | |
- name: Cleanup workspace | |
if: ${{ always() }} | |
uses: gamestrap/[email protected] | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'false' | |
ref: dev | |
- uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
git_committer_name: TRAP CI/CD | |
- name: Make python3 available as python | |
run: sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10 | |
- name: Make pip3 available as pip | |
run: sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 10 | |
- uses: actions/create-github-app-token@v1 | |
id: generate-token | |
with: | |
app-id: ${{ secrets.APP_ID }} | |
private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
- name: Make scripts and premake executable | |
run: | | |
chmod +x libs/premake5/linux/premake5 | |
chmod +x GeneratorScripts/GenerateVulkanLoader.sh | |
- name: Update Vulkan Loader | |
run: | | |
cd GeneratorScripts/ | |
./GenerateVulkanLoader.sh | |
cd .. | |
- name: Retrieve new Vulkan version | |
id: get-vulkan-version | |
run: echo "VULKAN_VERSION=$(grep -oP '#define VULKANLOADER_HEADER_VERSION \K\d+' TRAP/src/Graphics/API/Vulkan/Utils/VulkanLoader.h | cut -d ' ' -f 4)" >> "$GITHUB_OUTPUT" | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
base: dev | |
branch: vk-update/1-3-${{steps.get-vulkan-version.outputs.VULKAN_VERSION}} | |
delete-branch: true | |
commit-message: "Update Vulkan Loader to 1.3.${{steps.get-vulkan-version.outputs.VULKAN_VERSION}}" | |
title: "Update Vulkan Loader to 1.3.${{steps.get-vulkan-version.outputs.VULKAN_VERSION}}" | |
labels: "CI/CD, Vulkan, Update" | |
assignees: "GamesTrap" | |
milestone: 5 | |
token: ${{steps.generate-token.outputs.token}} | |
author: "TRAP CI/CD <[email protected]>" | |
committer: "TRAP CI/CD <[email protected]>" |