File: codeql.yml

package info (click to toggle)
vulkan-loader 1.4.335.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 43,192 kB
  • sloc: cpp: 325,195; ansic: 46,752; xml: 34,360; python: 6,108; asm: 3,534; makefile: 71; sh: 53
file content (97 lines) | stat: -rw-r--r-- 3,453 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
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Author: Joyce Brum <joycebrum@google.com>

name: "CodeQL"

on:
  push:
    branches: [ "main" ]
  pull_request:
    # The branches below must be a subset of the branches above
    branches: [ "main" ]
  schedule:
    - cron: '26 7 * * 1'

permissions: {}

jobs:
  analyze:
    name: Analyze
    # Runner size impacts CodeQL analysis time. To learn more, please see:
    #   - https://gh.io/recommended-hardware-resources-for-running-codeql
    #   - https://gh.io/supported-runners-and-hardware-resources
    #   - https://gh.io/using-larger-runners
    # Consider using larger runners for possible analysis time improvements.
    runs-on: 'ubuntu-latest'
    timeout-minutes: 360
    permissions:
      actions: read
      contents: read
      security-events: write

    strategy:
      fail-fast: false
      matrix:
        language: [ 'cpp', 'python' ]

    steps:
    - name: Checkout repository
      uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1

    # Initializes the CodeQL tools for scanning.
    - name: Initialize CodeQL
      uses: github/codeql-action/init@fdbfb4d2750291e159f0156def62b853c2798ca2 # v3.29.5
      with:
        languages: ${{ matrix.language }}
    #     If you wish to specify custom queries, you can do so here or in a config file.
    #     By default, queries listed here will override any specified in a config file.
    #     Prefix the list here with "+" to use these queries and those in the config file.

    #     For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
    #     queries: security-extended,security-and-quality


    # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
    # If this step fails, then you should remove it and run the build manually
    - name: Autobuild
      if: matrix.language == 'python' 
      uses: github/codeql-action/autobuild@fdbfb4d2750291e159f0156def62b853c2798ca2 # v3.29.5

    - uses: actions/setup-python@v6
      if: matrix.language == 'cpp'
      with:
        python-version: '3.11'
    - name: Install Dependencies
      if: matrix.language == 'cpp'
      run: |
        sudo apt update
        sudo apt install --yes --no-install-recommends libwayland-dev libxrandr-dev

    - name: Generate build files
      if: matrix.language == 'cpp'
      run: cmake -S. -B build -D CMAKE_BUILD_TYPE=Release -D UPDATE_DEPS=ON
      env:
        CC: gcc
        CXX: g++

    - name: Build the loader
      if: matrix.language == 'cpp'
      run: cmake --build build
    
    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@fdbfb4d2750291e159f0156def62b853c2798ca2 # v3.29.5
      with:
        category: "/language:${{matrix.language}}"