Skip to content

Commit bf969b8

Browse files
committed
Try to fix codeQL
1 parent 80c9ff3 commit bf969b8

File tree

1 file changed

+19
-36
lines changed

1 file changed

+19
-36
lines changed

.github/workflows/codeql.yml

Lines changed: 19 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,13 @@ on:
44
push:
55
branches: [ "main" ]
66
pull_request:
7-
# The branches below must be a subset of the branches above
87
branches: [ "main" ]
98
schedule:
109
- cron: '22 20 * * 5'
1110

1211
jobs:
1312
analyze:
1413
name: Analyze
15-
# Runner size impacts CodeQL analysis time. To learn more, please see:
16-
# - https://gh.io/recommended-hardware-resources-for-running-codeql
17-
# - https://gh.io/supported-runners-and-hardware-resources
18-
# - https://gh.io/using-larger-runners
19-
# Consider using larger runners for possible analysis time improvements.
2014
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
2115
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
2216
permissions:
@@ -28,47 +22,36 @@ jobs:
2822
fail-fast: false
2923
matrix:
3024
language: [ 'cpp' ]
31-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
32-
# Use only 'java' to analyze code written in Java, Kotlin or both
33-
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
34-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
3525

3626
steps:
3727
- name: Checkout repository
3828
uses: actions/checkout@v4
3929

40-
# Initializes the CodeQL tools for scanning.
30+
- name: Install TBB (MacOS & Ubuntu)
31+
run: |
32+
if [[ "$RUNNER_OS" == "macOS" ]]; then
33+
brew install tbb
34+
echo "CPLUS_INCLUDE_PATH=$(brew --prefix tbb)/include" >> $GITHUB_ENV
35+
echo "LIBRARY_PATH=$(brew --prefix tbb)/lib" >> $GITHUB_ENV
36+
echo "LD_LIBRARY_PATH=$(brew --prefix tbb)/lib" >> $GITHUB_ENV
37+
elif [[ "$RUNNER_OS" == "Linux" ]]; then
38+
sudo apt update && sudo apt install -y libtbb-dev
39+
fi
40+
4141
- name: Initialize CodeQL
4242
uses: github/codeql-action/init@v2
4343
with:
4444
languages: ${{ matrix.language }}
45-
# If you wish to specify custom queries, you can do so here or in a config file.
46-
# By default, queries listed here will override any specified in a config file.
47-
# Prefix the list here with "+" to use these queries and those in the config file.
48-
49-
# 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
50-
# queries: security-extended,security-and-quality
51-
52-
53-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
54-
# If this step fails, then you should remove it and run the build manually (see below)
55-
# - name: Autobuild
56-
# uses: github/codeql-action/autobuild@v2
57-
58-
# ℹ️ Command-line programs to run using the OS shell.
59-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
60-
61-
# If the Autobuild fails above, remove it and uncomment the following three lines.
62-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
63-
64-
# - run: |
65-
# echo "Run, Build Application using script"
66-
# ./location_of_script_within_repo/buildscript.sh
6745

68-
- run: |
69-
echo "Build C++"
46+
- name: Build C++
47+
run: |
7048
mkdir -p build && cd build
71-
cmake ..
49+
if [[ "$RUNNER_OS" == "macOS" ]]; then
50+
cmake .. -DCMAKE_PREFIX_PATH=$(brew --prefix tbb)
51+
else
52+
cmake ..
53+
fi
54+
cmake --build .
7255
sudo make install
7356
7457
- name: Perform CodeQL Analysis

0 commit comments

Comments
 (0)