2021-09-21 17:40:35 +00:00
|
|
|
name: Update Vulkan-Headers PR
|
2021-09-21 09:05:25 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * *' # every day at midnight
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
update-vulkan-headers:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
build_type: [Debug]
|
|
|
|
cxx_compiler: [g++-9]
|
|
|
|
cxx_standard: [11]
|
|
|
|
|
|
|
|
steps:
|
2023-01-19 07:11:46 +00:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-09-21 09:05:25 +00:00
|
|
|
|
|
|
|
- name: Install libraries
|
2023-01-23 10:46:28 +00:00
|
|
|
run: |
|
|
|
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
|
|
|
sudo echo "deb http://apt.llvm.org/unstable/ llvm-toolchain-15 main" > sudo tee -a "/etc/apt/sources.list.d/llvm.list"
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y clang-format-15
|
2021-09-21 09:05:25 +00:00
|
|
|
|
|
|
|
- name: Update Submodules
|
|
|
|
run: |
|
|
|
|
cd Vulkan-Headers
|
2022-03-15 09:19:49 +00:00
|
|
|
VK_HEADER_GIT_TAG=$(git describe --always --tags $(git rev-list --tags) | grep 'v[0-9]\.' | head -n1)
|
2022-03-02 09:28:20 +00:00
|
|
|
echo "New revision of Vulkan-Headers: $VK_HEADER_GIT_TAG"
|
2021-09-21 09:05:25 +00:00
|
|
|
git checkout $VK_HEADER_GIT_TAG
|
|
|
|
echo "VK_HEADER_GIT_TAG=$VK_HEADER_GIT_TAG" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Configure CMake
|
|
|
|
run: cmake -B ${{github.workspace}}/build
|
|
|
|
-DSAMPLES_BUILD=OFF
|
|
|
|
-DTESTS_BUILD=OFF
|
|
|
|
-DVULKAN_HPP_RUN_GENERATOR=ON
|
|
|
|
-DCMAKE_CXX_COMPILER=${{matrix.cxx_compiler}}
|
|
|
|
-DCMAKE_CXX_STANDARD=${{matrix.cxx_standard}}
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}}
|
|
|
|
|
|
|
|
- name: Commit changes
|
|
|
|
run: |
|
|
|
|
git config user.name "GitHub"
|
|
|
|
git config user.email "noreply@github.com"
|
|
|
|
git add Vulkan-Headers vulkan
|
|
|
|
rm -rf build
|
2022-03-08 08:52:06 +00:00
|
|
|
git fetch --all --tags
|
|
|
|
if [ -z $(git tag | grep $VK_HEADER_GIT_TAG) ]
|
|
|
|
then
|
|
|
|
echo "Creating commit for new tag: $VK_HEADER_GIT_TAG"
|
|
|
|
git commit -m "Update Vulkan-Headers to $VK_HEADER_GIT_TAG" || echo 'No commit necessary!'
|
|
|
|
else
|
|
|
|
echo "Tag already exists: $VK_HEADER_GIT_TAG"
|
|
|
|
fi
|
|
|
|
git stash
|
2021-09-21 09:05:25 +00:00
|
|
|
git clean -xf
|
|
|
|
|
|
|
|
- name: Create Pull Request
|
|
|
|
uses: peter-evans/create-pull-request@v3
|
|
|
|
with:
|
|
|
|
commit-message: Update Vulkan-Headers to ${{ env.VK_HEADER_GIT_TAG }}
|
|
|
|
title: Update Vulkan-Headers to ${{ env.VK_HEADER_GIT_TAG }}
|
|
|
|
branch: update-vulkan-headers-pr
|
|
|
|
base: ${{ github.head_ref }}
|
|
|
|
body: |
|
2021-09-21 17:40:35 +00:00
|
|
|
Please close and reopen this PR to trigger the CI!
|