1# Copyright 2022-2023 LunarG, Inc. 2# 3# SPDX-License-Identifier: Apache-2.0 4 5name: ci 6 7on: 8 push: 9 pull_request: 10 11env: 12 CMAKE_GENERATOR: Ninja 13 14permissions: 15 contents: read 16 17jobs: 18 cmake-unix: 19 runs-on: ${{ matrix.os }} 20 if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name 21 strategy: 22 matrix: 23 os: [ ubuntu-latest, macos-latest ] 24 cmake-version: [ '3.22.1', 'latest'] 25 steps: 26 - uses: actions/checkout@v4 27 - uses: lukka/get-cmake@latest 28 with: 29 cmakeVersion: ${{ matrix.cmake-version }} 30 - uses: ilammy/msvc-dev-cmd@v1 31 - run: cmake -S . -B build -D VULKAN_HEADERS_ENABLE_TESTS=ON -D VULKAN_HEADERS_ENABLE_INSTALL=ON -G Ninja 32 - run: cmake --build ./build 33 - run: cmake --install build/ --prefix build/install 34 - run: ctest --output-on-failure 35 working-directory: build 36 37 cmake-windows: 38 runs-on: windows-latest 39 if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name 40 strategy: 41 matrix: 42 cmake-version: [ '3.22.1', 'latest'] 43 steps: 44 - uses: actions/checkout@v4 45 - uses: lukka/get-cmake@latest 46 with: 47 cmakeVersion: ${{ matrix.cmake-version }} 48 - uses: ilammy/msvc-dev-cmd@v1 49 - run: cmake -S . -B build -D VULKAN_HEADERS_ENABLE_TESTS=ON -D VULKAN_HEADERS_ENABLE_INSTALL=ON -G Ninja 50 - run: cmake --build ./build 51 - run: cmake --install build/ --prefix build/install 52 - run: ctest --output-on-failure 53 working-directory: build 54 55 windows_clang: 56 runs-on: windows-2022 57 if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name 58 strategy: 59 matrix: 60 compiler: [ clang, clang-cl ] 61 steps: 62 - uses: actions/checkout@v4 63 - uses: ilammy/msvc-dev-cmd@v1 64 - run: | 65 cmake -S . -B build ` 66 -D CMAKE_C_COMPILER=${{matrix.compiler}} ` 67 -D CMAKE_CXX_COMPILER=${{matrix.compiler}} ` 68 -D CMAKE_BUILD_TYPE=Release ` 69 -D VULKAN_HEADERS_ENABLE_TESTS=ON ` 70 -D VULKAN_HEADERS_ENABLE_INSTALL=ON ` 71 -G Ninja 72 - run: cmake --build ./build 73 - run: cmake --install build/ --prefix build/install 74 - run: ctest --output-on-failure 75 working-directory: build 76 77 reuse: 78 runs-on: ubuntu-latest 79 if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name 80 steps: 81 - uses: actions/checkout@v4 82 - name: REUSE Compliance Check 83 uses: fsfe/reuse-action@v5 84