name: Vulkan CI/CD
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Vulkan SDK
uses: humbletim/install-vulkan-sdk@v1.1.1
with:
version: latest
cache: true
- name: Configure CMake
run: cmake -B github.workspace/build−DCMAKEBUILDTYPE={{matrix.build_type}}
- name: Build
run: cmake --build github.workspace/build−−config{{matrix.build_type}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.build_type}}
- name: Package
if: matrix.build_type == 'Release'
run: |
# Platform-specific packaging commands
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
# Linux packaging (e.g., .deb or .AppImage)
echo "Packaging for Linux"
elif [ "${{ matrix.os }}" == "windows-latest" ]; then
# Windows packaging (e.g., .exe installer)
echo "Packaging for Windows"
elif [ "${{ matrix.os }}" == "macos-latest" ]; then
# macOS packaging (e.g., .app bundle or .dmg)
echo "Packaging for macOS"
fi