-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (70 loc) · 2.68 KB
/
Copy pathcodeql.yml
File metadata and controls
83 lines (70 loc) · 2.68 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
78
79
80
81
82
83
name: "CodeQL"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: "0 15 * * 0" # Every Sunday at 15:00 UTC
permissions:
contents: read
jobs:
analyze:
name: "Analyze (${{ matrix.language }})"
runs-on: ["oneapi-rs", "Linux"]
permissions:
actions: read
contents: read
packages: read
security-events: write
strategy:
fail-fast: false
matrix:
include:
- language: c-cpp
build-mode: manual
- language: rust
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Check if oneAPI is already installed
id: check-oneapi
run: |
if [ -f /home/test-user/intel/oneapi/setvars.sh ]; then
echo "installed=true" >> $GITHUB_OUTPUT
source /home/test-user/intel/oneapi/setvars.sh
printenv | grep -E '^(PATH|LD_LIBRARY_PATH|LIBRARY_PATH|CPATH|C_INCLUDE_PATH|CPLUS_INCLUDE_PATH)=' >> $GITHUB_ENV
else
echo "installed=false" >> $GITHUB_OUTPUT
fi
- name: Setup oneAPI
if: steps.check-oneapi.outputs.installed != 'true'
run: |
installer="intel-oneapi-toolkit-2026.1.0.192_offline.sh"
checksum="9d969de9cafbb698bf50f088c4b5174b50fc816f504049e685d6f6d198e10dbc17ef2cd4cfb0bc2b3d2179644a8d77d1"
curl --fail --location --retry 3 --silent --show-error --output "$installer" \
"https://registrationcenter-download.intel.com/akdlm/IRC_NAS/33cb2a22-ddf1-4aa9-8d68-1f5a118acaf2/intel-oneapi-toolkit-2026.1.0.192_offline.sh"
echo "$checksum $installer" | sha384sum --check
sh "./$installer" -a --silent --cli --eula accept
source /home/test-user/intel/oneapi/setvars.sh
printenv | grep -E '^(PATH|LD_LIBRARY_PATH|LIBRARY_PATH|CPATH|C_INCLUDE_PATH|CPLUS_INCLUDE_PATH)=' >> $GITHUB_ENV
- name: Initialize CodeQL
uses: github/codeql-action/init@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Build
run: cargo build --verbose
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
with:
category: "/language:${{ matrix.language }}"
output: codeql-results
- name: Upload CodeQL SARIF
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: codeql-sarif-${{ matrix.language }}
path: codeql-results/*.sarif
if-no-files-found: error
retention-days: 90