File: ci.yml

package info (click to toggle)
vulkan-utility-libraries 1.4.341.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,636 kB
  • sloc: cpp: 109,126; ansic: 17,113; python: 2,220; sh: 23; makefile: 6
file content (122 lines) | stat: -rw-r--r-- 3,818 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# Copyright 2023-2024 The Khronos Group Inc.
# Copyright 2023-2024 Valve Corporation
# Copyright 2023-2024 LunarG, Inc.
#
# SPDX-License-Identifier: Apache-2.0

name: ci

on:
  push:
  pull_request:
    branches:
    - main

jobs:
  build_and_test:
    # Use chromium as a test build, so don't run this job unless something simple works first
    needs: chromium
    runs-on: ${{matrix.os}}
    strategy:
      matrix:
        config: [Debug, Release]
        os: [ ubuntu-22.04, ubuntu-24.04, windows-latest, macos-latest ]
    steps:
      - uses: actions/checkout@v6
      - name: Set up Python 3.8
        if: matrix.os != 'macos-latest'
        uses: actions/setup-python@v6
        with:
          python-version: '3.8'
      # MacOS machine can run on arm64 and it doesn't support 3.8
      - name: Set up Python 3.10.11
        if: matrix.os == 'macos-latest'
        uses: actions/setup-python@v6
        with:
          python-version: '3.10.11'
      - name: Test CMake Minimum
        if: matrix.os == 'ubuntu-22.04'
        uses: lukka/get-cmake@latest
        with:
          cmakeVersion: 3.22.1
      - run: cmake -S. -B build -D VUL_WERROR=ON -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=${{matrix.config}} -D UPDATE_DEPS=ON
      - run: cmake --build build --config ${{matrix.config}} --verbose
      - run: ctest -C ${{matrix.config}} --output-on-failure
        working-directory: build/

  windows-arm64:
    # Use chromium as a test build, so don't run this job unless something simple works first
    needs: chromium
    runs-on: windows-latest
    env:
      CMAKE_GENERATOR: Ninja
    steps:
      - uses: actions/checkout@v6
      - uses: ilammy/msvc-dev-cmd@v1
        with:
          arch: amd64_arm64
      - run: cmake -S. -B build -D VUL_WERROR=ON -D CMAKE_BUILD_TYPE=Debug -D UPDATE_DEPS=ON
      - run: cmake --build build
      - run: cmake --install build --prefix build/install

  android:
    # Use chromium as a test build, so don't run this job unless something simple works first
    needs: chromium
    runs-on: ubuntu-24.04
    strategy:
      matrix:
        abi: [ armeabi-v7a, arm64-v8a ]
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-python@v6
        with:
          python-version: '3.8'
      - uses: lukka/get-cmake@latest
      - name: Configure
        run: |
          cmake -S . -B build/ --toolchain $ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake \
          -D ANDROID_PLATFORM=26 \
          -D CMAKE_ANDROID_ARCH_ABI=${{matrix.abi}} \
          -D CMAKE_ANDROID_STL_TYPE=c++_static \
          -D ANDROID_USE_LEGACY_TOOLCHAIN_FILE=NO \
          -D VUL_WERROR=ON \
          -D CMAKE_BUILD_TYPE=Release \
          -D UPDATE_DEPS=ON \
          -D BUILD_TESTS=ON \
          -G "Ninja"
      - name: Build
        run: cmake --build build

  reuse:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v6
    - name: REUSE Compliance Check
      uses: fsfe/reuse-action@v6

  # Test to ensure we don't accidentally break the Chromium build.
  chromium:
    needs: generate_source
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-python@v6
        with:
          python-version: '3.10'
      - name: Install WSI dependencies
        run: sudo apt-get -qq update && sudo apt-get install -y libwayland-dev xorg-dev
      - name: Test chromium build
        run: python scripts/gn/gn.py

  generate_source:
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-python@v6
        with:
          python-version: '3.10'
      - name: Generate source
        run: |
          scripts/update_deps.py --dir external --no-build
          scripts/generate_source.py external/Vulkan-Headers/registry/
      - run: git diff --exit-code