-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (59 loc) · 1.79 KB
/
Copy pathcodeql.yml
File metadata and controls
68 lines (59 loc) · 1.79 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
# CodeQL Advanced analysis for engine-sim-bridge
# C++ analysis requires macOS (CoreAudio dependency) and manual CMake build.
name: "CodeQL Advanced"
on:
push:
branches: [ "master", "sonar_integration" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: '29 6 * * 5'
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ${{ (matrix.language == 'c-cpp' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
security-events: write
packages: read
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: c-cpp
build-mode: manual
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies (macOS)
if: matrix.language == 'c-cpp'
env:
HOMEBREW_NO_AUTO_UPDATE: "1"
HOMEBREW_NO_INSTALL_CLEANUP: "1"
run: |
brew bundle --file Brewfile
# bison is keg-only (macOS ships 2.3, Piranha needs 3.2+).
echo "/opt/homebrew/opt/bison/bin" >> $GITHUB_PATH
echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Configure (macOS)
if: matrix.language == 'c-cpp'
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release
- name: Build (macOS)
if: matrix.language == 'c-cpp'
run: cmake --build build -- -j$(sysctl -n hw.logicalcpu)
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"