Repository navigation
80 lines (77 loc) · 2.59 KB
/
Copy pathcodeql-analysis.yml
File metadata and controls
80 lines (77 loc) · 2.59 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
name: "CodeQL"
on:
push:
branches:
- main
- release/*
pull_request:
branches:
- main
- release/*
types:
- opened
- synchronize
- reopened
- ready_for_review
- converted_to_draft
- closed
schedule:
- cron: "30 1 * * 1"
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || format('{0}-{1}', github.event_name, github.ref) }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
analyze:
if: ${{ !github.event.pull_request.draft && github.event.action != 'closed' }}
name: CodeQL analyze ${{ matrix.language }}
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language:
- python
- javascript
steps:
- name: Checkout
uses: actions/checkout@a37ce9120846195fa4ece8f58b268e6043cb2f26 # v3.7.0
- name: Initialize CodeQL
uses: github/codeql-action/init@1190a975f95ce23525efb6a3fc21ea29567c1b52 # v3.38.2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@1190a975f95ce23525efb6a3fc21ea29567c1b52 # v3.38.2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@1190a975f95ce23525efb6a3fc21ea29567c1b52 # v3.38.2
analyze-cpp:
if: ${{ !github.event.pull_request.draft && github.event.action != 'closed' }}
name: CodeQL analyze cpp
runs-on: ubuntu-latest
container:
image: nvcr.io/nvidia/pytorch:20.12-py3
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout
uses: actions/checkout@a37ce9120846195fa4ece8f58b268e6043cb2f26 # v3.7.0
- name: Install Dependency
run: |
DEBIAN_FRONTEND=noninteractive apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y ffmpeg libavcodec-dev libavformat-dev libavutil-dev libswresample-dev sudo build-essential
- name: Setup CMake
uses: lukka/get-cmake@fffaaafeea488556c2c12dad60690008bc1caacb # v4.4.2
with:
cmakeVersion: '3.20.0'
- name: Initialize CodeQL
uses: github/codeql-action/init@1190a975f95ce23525efb6a3fc21ea29567c1b52 # v3.38.2
with:
languages: cpp
- name: Build
run: make cppbuild -j
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@1190a975f95ce23525efb6a3fc21ea29567c1b52 # v3.38.2