Skip to content

Trying to fix workflows #465

Trying to fix workflows

Trying to fix workflows #465

Workflow file for this run

name: "Cross-platform check"
on:
push:
paths:
- 'include/**'
- 'src/**'
- 'CMakeLists.txt'
pull_request:
# workflow_dispatch:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
linux:
name: ${{ matrix.config.name }}, VulkanSDK ${{ matrix.vulkan-sdk }}, VMA=${{ matrix.vma }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
config:
#- {
# name: "linux: clang",
# cc: "clang",
# cxx: "clang++"
#}
- {
name: "linux: gcc",
cc: "gcc-14",
cxx: "g++-14"
}
# note: if a specific vulkan version (e.g. 1.1.x, or < 1.2.135) needs testing, you can add it here:
# (not that ubuntu-latest (20.04) only supports >= v1.2.148 via apt)
vulkan-sdk: ["latest", "1.3.216", "1.2.198"]
vma: ["ON", "OFF"]
exclude: # exclude combinations that are known to fail
- vulkan-sdk: "1.2.198"
vma: "ON"
steps:
- uses: actions/checkout@v3
- name: Create Build Environment
shell: bash
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: |
# Add lunarg apt sources
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
if [ "${{ matrix.vulkan-sdk }}" = "latest" ]; then
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-focal.list https://packages.lunarg.com/vulkan/lunarg-vulkan-focal.list
else
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-${{ matrix.vulkan-sdk }}-focal.list https://packages.lunarg.com/vulkan/${{ matrix.vulkan-sdk }}/lunarg-vulkan-${{ matrix.vulkan-sdk }}-focal.list
fi
# For GCC-13
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/ppa
# Update package lists
sudo apt-get update -qq
# Install dependencies
sudo apt-get install -y \
vulkan-sdk \
g++-13 \
gcc-13
# clang does not yet (<= 12) support "Down with typename" (P0634R3), which is used in libstdc++ >= 11 in the ranges-header
if [ "${{ matrix.config.cc }}" = "clang" ]; then
sudo apt remove libgcc-11-dev gcc-11
fi
cmake -E make_directory ${{ runner.workspace }}/build
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{ runner.workspace }}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: |
export CC=${{ matrix.config.cc }}
export CXX=${{ matrix.config.cxx }}
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -Davk_LibraryType=STATIC $GITHUB_WORKSPACE -Davk_UseVMA=${{ matrix.vma }}
- name: Build
shell: bash
working-directory: ${{ runner.workspace }}/build
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build .
windows:
name: ${{ matrix.config.name }}, windows-2019, VulkanSDK ${{ matrix.vulkan-sdk }}, VMA=${{ matrix.vma }}
runs-on: windows-2019
env:
vulkan_sdk: "$GITHUB_WORKSPACE/vulkan_sdk/"
strategy:
fail-fast: false
matrix:
config:
- {
name: "windows: msvc",
cc: "cl",
cxx: "cl"
}
# note: if a specific vulkan version needs testing, you can add it here:
vulkan-sdk: ["latest", "1.3.216.0", "1.2.198.1"]
vma: ["ON", "OFF"]
exclude: # exclude combinations that are known to fail
- vulkan-sdk: "1.2.198"
vma: "ON"
steps:
# apparently checkout@v3 pulls to Auto-Vk/Auto-Vk on windows
- uses: actions/checkout@v3
- name: Create Build Environment
# apparently checkout@v3 pulls to Auto-Vk/Auto-Vk on windows
working-directory: ${{ runner.workspace }}/${{ github.event.repository.name }}
shell: pwsh
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: |
If ('${{ matrix.vulkan-sdk }}' -eq 'latest') {
# the download URL for the latest SDK version changes sometimes (every four months or so?)...
curl -LS -o vulkan-sdk.exe https://sdk.lunarg.com/sdk/download/latest/windows/vulkan-sdk.exe
} Else {
curl -LS -o vulkan-sdk.exe https://sdk.lunarg.com/sdk/download/${{ matrix.vulkan-sdk }}/windows/VulkanSDK-${{ matrix.vulkan-sdk }}-Installer.exe
}
7z x vulkan-sdk.exe -o"${{ env.vulkan_sdk }}"
mkdir "${{ env.vulkan_sdk }}Include/vma/"
curl -LS -o "${{ env.vulkan_sdk }}Include/vma/vk_mem_alloc.h" https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/blob/master/include/vk_mem_alloc.h?raw=true
# apparently checkout@v2 pulls to Auto-Vk/Auto-Vk on windows
cmake -E make_directory ${{ runner.workspace }}/${{ github.event.repository.name }}/build
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: pwsh
# apparently checkout@v2 pulls to Auto-Vk/Auto-Vk on windows
working-directory: ${{ runner.workspace }}/${{ github.event.repository.name }}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: |
$env:CC="${{ matrix.config.cc }}"
$env:CXX="${{ matrix.config.cxx }}"
$env:Path += ";${{ env.vulkan_sdk }}\;${{ env.vulkan_sdk }}\Bin\"
$env:VULKAN_SDK="${{ env.vulkan_sdk }}"
$env:Vulkan_LIBRARY="${{ env.vulkan_sdk }}/Bin"
$env:Vulkan_INCLUDE_DIR="${{ env.vulkan_sdk }}/Include"
# apparently checkout@v2 pulls to Auto-Vk/Auto-Vk on windows
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -Davk_LibraryType=STATIC ${{ runner.workspace }}/${{ github.event.repository.name }} -Davk_UseVMA=${{ matrix.vma }} -G "Visual Studio 16 2019" -A x64
- name: Build
shell: bash
# apparently checkout@v3 pulls to Auto-Vk/Auto-Vk on windows
working-directory: ${{ runner.workspace }}/${{ github.event.repository.name }}/build
# Execute the build. You can specify a specific target with "--target <NAME>"
run: VULKAN_SDK=${{ env.vulkan_sdk }} cmake --build . --config $BUILD_TYPE
windows-latest:
name: ${{ matrix.config.name }}, windows-latest, VulkanSDK ${{ matrix.vulkan-sdk }}, VMA=${{ matrix.vma }}
runs-on: windows-latest
env:
vulkan_sdk: "$GITHUB_WORKSPACE/vulkan_sdk/"
strategy:
fail-fast: false
matrix:
config:
- {
name: "windows: msvc",
cc: "cl",
cxx: "cl"
}
# note: if a specific vulkan version needs testing, you can add it here:
vulkan-sdk: ["latest", "1.3.216.0", "1.2.198.1"]
vma: ["ON", "OFF"]
exclude: # exclude combinations that are known to fail
- vulkan-sdk: "1.2.198"
vma: "ON"
steps:
# apparently checkout@v3 pulls to Auto-Vk/Auto-Vk on windows
- uses: actions/checkout@v3
- name: Create Build Environment
# apparently checkout@v3 pulls to Auto-Vk/Auto-Vk on windows
working-directory: ${{ runner.workspace }}/${{ github.event.repository.name }}
shell: pwsh
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: |
If ('${{ matrix.vulkan-sdk }}' -eq 'latest') {
# the download URL for the latest SDK version changes sometimes (every four months or so?)...
curl -LS -o vulkan-sdk.exe https://sdk.lunarg.com/sdk/download/latest/windows/vulkan-sdk.exe
} Else {
curl -LS -o vulkan-sdk.exe https://sdk.lunarg.com/sdk/download/${{ matrix.vulkan-sdk }}/windows/VulkanSDK-${{ matrix.vulkan-sdk }}-Installer.exe
}
7z x vulkan-sdk.exe -o"${{ env.vulkan_sdk }}"
mkdir "${{ env.vulkan_sdk }}Include/vma/"
curl -LS -o "${{ env.vulkan_sdk }}Include/vma/vk_mem_alloc.h" https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/blob/master/include/vk_mem_alloc.h?raw=true
# apparently checkout@v3 pulls to Auto-Vk/Auto-Vk on windows
cmake -E make_directory ${{ runner.workspace }}/${{ github.event.repository.name }}/build
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: pwsh
# apparently checkout@v2 pulls to Auto-Vk/Auto-Vk on windows
working-directory: ${{ runner.workspace }}/${{ github.event.repository.name }}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: |
$env:CC="${{ matrix.config.cc }}"
$env:CXX="${{ matrix.config.cxx }}"
$env:VULKAN_SDK="${{ env.vulkan_sdk }}"
$env:Vulkan_LIBRARY="${{ env.vulkan_sdk }}/Bin"
$env:Vulkan_INCLUDE_DIR="${{ env.vulkan_sdk }}/Include"
$env:Path += ";${{ env.vulkan_sdk }}\;${{ env.vulkan_sdk }}\Bin\"
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -Davk_LibraryType=STATIC ${{ runner.workspace }}/${{ github.event.repository.name }} -Davk_UseVMA=${{ matrix.vma }} -G "Visual Studio 17 2022" -A x64
- name: Build
shell: bash
# apparently checkout@v3 pulls to Auto-Vk/Auto-Vk on windows
working-directory: ${{ runner.workspace }}/${{ github.event.repository.name }}/build
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE