1- name : " CodeQL "
1+ name : scan-codeql-workflow
22
33on :
44 push :
5- branches : [ "master", " main", "dev " ]
5+ branches : [ "main" ]
66 pull_request :
7- branches : [ "master", " main", "dev " ]
7+ branches : [ "main" ]
88 schedule :
9- - cron : ' 42 8 * * 1 '
9+ - cron : ' 15 0 * * * '
1010
1111env :
12- # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
13- BUILD_TYPE : Release
14- PREFIX_DIR : /usr/local
15- DEBIAN_FRONTEND : noninteractive
12+ TZ : " Europe/Warsaw"
13+ BUILD_TYPE : " Release"
14+ DEBIAN_FRONTEND : " noninteractive"
15+ FFMPEG_COMMIT_ID : " n6.1.1"
16+ BUILD_DIR : " ${{ github.workspace }}/build"
17+ PREFIX : " ${{ github.workspace }}/_install"
18+
19+ defaults :
20+ run :
21+ shell : bash
1622
1723permissions :
1824 contents : read
1925
26+ concurrency :
27+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
28+ cancel-in-progress : true
29+
2030jobs :
2131 analyze :
22- name : Analyze
32+ name : ' scan-codeql-workflow-analyze '
2333 runs-on : ${{ matrix.runner-os }}
2434 timeout-minutes : 90
2535 strategy :
2838 runner-os : [ 'ubuntu-22.04' ]
2939 permissions :
3040 actions : read
31- contents : read
3241 security-events : write
33- defaults :
34- run :
35- shell : bash
36-
3742 steps :
3843 - name : ' Harden Runner'
3944 uses : step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
@@ -43,24 +48,58 @@ jobs:
4348 - name : ' Checkout repository'
4449 uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4550
46- - name : ' Initialize CodeQL'
51+ - name : ' Install OS level dependencies'
52+ run : |
53+ set -exo pipefail && \
54+ mkdir -p "${PREFIX}" "${BUILD_DIR}/ffmpeg" && \
55+ sudo apt-get update --fix-missing && \
56+ sudo apt-get full-upgrade -y && \
57+ sudo apt-get install --no-install-recommends -y \
58+ build-essential \
59+ ca-certificates \
60+ cmake \
61+ diffutils \
62+ gpg \
63+ libx264-dev \
64+ libx265-dev \
65+ llvm \
66+ m4 \
67+ meson \
68+ nasm \
69+ ocl-icd-opencl-dev \
70+ opencl-headers \
71+ zlib1g-dev \
72+ make curl git sudo tar unzip wget yasm
73+
74+ - name : ' Install Intel OneAPI APT repository'
75+ run : |
76+ set -exo pipefail && \
77+ curl -fsSL https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg && \
78+ echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/intel-oneAPI.list && \
79+ sudo apt-get update --fix-missing && \
80+ sudo apt-get install --no-install-recommends -y intel-oneapi-ipp-devel-2022.0
81+
82+ - name : ' Download and patch ffmpeg repository'
83+ run : |
84+ set -exo pipefail && \
85+ curl -Lf https://github.com/ffmpeg/ffmpeg/archive/${FFMPEG_COMMIT_ID}.tar.gz | tar -zx --strip-components=1 -C "${BUILD_DIR}/ffmpeg"
86+ patch -d "${BUILD_DIR}/ffmpeg" -p1 -i <(cat "${{ github.workspace }}/ffmpeg/"*.patch)
87+ cp "${{ github.workspace }}/ffmpeg/vf_raisr"*.c "${BUILD_DIR}/ffmpeg/libavfilter"
88+
89+ - name : ' Initialize CodeQL action'
4790 uses : github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
4891 with :
49- languages : ' c-cpp'
50- build-mode : autobuild
51- # config-file: ${{ github.workspace }}/.github/codeql/codeql-config.yml
92+ languages : " c-cpp"
93+ config-file : " ${{ github.workspace }}/.github/codeql/codeql-config.yml"
5294
53- - if : matrix.build-mode == 'manual'
54- shell : bash
95+ - name : ' Build RAISR from source code'
5596 run : |
56- echo 'If you are using a "manual" build mode for one or more of the' \
57- 'languages you are analyzing, replace this with the commands to build' \
58- 'your code, for example:'
59- echo ' make bootstrap'
60- echo ' make release'
61- exit 1
97+ "${{ github.workspace }}/build.sh" -DENABLE_RAISR_OPENCL=ON \
98+ -DCMAKE_LIBRARY_PATH="/opt/intel/oneapi/ipp/latest/lib;${PREFIX}/lib;" \
99+ -DCMAKE_C_FLAGS="-I/opt/intel/oneapi/ipp/latest/include -I/opt/intel/oneapi/ipp/latest/include/ipp" \
100+ -DCMAKE_CXX_FLAGS="-I/opt/intel/oneapi/ipp/latest/include -I/opt/intel/oneapi/ipp/latest/include/ipp"
62101
63- - name : Perform CodeQL Analysis
64- uses : github/codeql-action/analyze@v3
102+ - name : ' Perform CodeQL Analysis'
103+ uses : github/codeql-action/analyze@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
65104 with :
66- category : " /language:${{matrix.language}} "
105+ category : " /language:c-cpp "
0 commit comments