-
-
Notifications
You must be signed in to change notification settings - Fork 4
77 lines (67 loc) · 2.24 KB
/
codeql.yml
File metadata and controls
77 lines (67 loc) · 2.24 KB
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
name: "CodeQL"
on:
workflow_dispatch:
push:
branches: [ "main" ]
paths-ignore:
- '**.md'
- '.github/**'
- '.vscode/**'
- '.devcontainer/**'
pull_request:
branches: [ "main" ]
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
security-events: write
packages: read
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: c-cpp
build-mode: manual
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Update OS
run: sudo apt-get update -qq
- name: Install dependencies
run: |
sudo apt-get install -y build-essential cmake libgtk-3-dev \
libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev \
libxi-dev libxss-dev libxkbcommon-dev libwayland-dev libdecor-0-dev \
libdrm-dev libgbm-dev libgl1-mesa-dev libegl1-mesa-dev libdbus-1-dev libudev-dev
- name: Build and install SDL3
env:
GH_TOKEN: ${{ github.token }}
run: |
SDL3_TAG=$(gh release view --repo libsdl-org/SDL --json tagName -q '.tagName')
echo "Building SDL3 $SDL3_TAG"
git clone --depth 1 --branch "$SDL3_TAG" https://github.com/libsdl-org/SDL.git /tmp/SDL3
cmake -S /tmp/SDL3 -B /tmp/SDL3/build -DCMAKE_INSTALL_PREFIX=/usr -DSDL_TESTS=OFF -DSDL_EXAMPLES=OFF
cmake --build /tmp/SDL3/build -j$(nproc)
sudo cmake --install /tmp/SDL3/build
- name: Get build number
run: |
echo "BUILD_NUMBER=$(git describe --abbrev=7 --dirty --always --tags)" >> $GITHUB_ENV
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
config-file: ./.github/codeql/codeql-config.yml
- name: make
run: make
working-directory: platforms/linux
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"