Skip to content

Commit 0f86721

Browse files
authored
Create build-baremetal-coverity.yml (#27)
Create build-baremetal-coverity.yml Signed-off-by: Miłosz Linkiewicz <[email protected]>
1 parent e788475 commit 0f86721

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: scan-coverity-baremetal
2+
3+
on:
4+
schedule:
5+
- cron: '0 18 * * *'
6+
workflow_dispatch:
7+
inputs:
8+
branch:
9+
description: 'Branch to run scans on'
10+
default: 'main'
11+
type: string
12+
13+
env:
14+
TZ: "Europe/Warsaw"
15+
BUILD_TYPE: "Release"
16+
DEBIAN_FRONTEND: "noninteractive"
17+
FFMPEG_COMMIT_ID: "n6.1.1"
18+
BUILD_DIR: "${{ github.workspace }}/build"
19+
BUILD_FFMPEG_DIR: "${{ github.workspace }}/build-ffmpeg"
20+
PREFIX: "${{ github.workspace }}/_install"
21+
22+
defaults:
23+
run:
24+
shell: bash
25+
26+
permissions:
27+
contents: read
28+
29+
concurrency:
30+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
31+
cancel-in-progress: true
32+
33+
jobs:
34+
coverity:
35+
runs-on: 'ubuntu-22.04'
36+
timeout-minutes: 90
37+
steps:
38+
- name: 'Harden Runner'
39+
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
40+
with:
41+
egress-policy: audit
42+
43+
- name: 'Checkout repository'
44+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
45+
with:
46+
ref: ${{ inputs.branch }}
47+
48+
- name: 'Install OS level dependencies'
49+
run: |
50+
set -exo pipefail && \
51+
mkdir -p "${PREFIX}" "${BUILD_DIR}" "${BUILD_FFMPEG_DIR}" && \
52+
sudo apt-get update --fix-missing && \
53+
sudo apt-get full-upgrade -y && \
54+
sudo apt-get install --no-install-recommends -y \
55+
build-essential \
56+
ca-certificates \
57+
cmake \
58+
curl \
59+
diffutils \
60+
git \
61+
gpg \
62+
libx264-dev \
63+
libx265-dev \
64+
nasm \
65+
ocl-icd-opencl-dev \
66+
opencl-headers \
67+
tar \
68+
unzip \
69+
wget \
70+
zlib1g-dev
71+
72+
- name: 'Install Intel OneAPI APT repository'
73+
run: |
74+
set -exo pipefail && \
75+
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 && \
76+
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 && \
77+
sudo apt-get update --fix-missing && \
78+
sudo apt-get install --no-install-recommends -y intel-oneapi-ipp-devel-2022.0
79+
80+
- name: 'Run coverity'
81+
uses: vapier/coverity-scan-action@2068473c7bdf8c2fb984a6a40ae76ee7facd7a85 # v1.8.0
82+
with:
83+
project: 'Video-Super-Resolution-Library'
84+
email: ${{ secrets.COVERITY_SCAN_EMAIL }}
85+
token: ${{ secrets.COVERITY_SCAN_TOKEN }}
86+
build_language: 'cxx'
87+
build_platform: 'linux64'
88+
command: ${{ github.workspace }}/./build.sh -DENABLE_RAISR_OPENCL=ON -DCMAKE_LIBRARY_PATH="/opt/intel/oneapi/ipp/latest/lib;${PREFIX}/lib;" -DCMAKE_C_FLAGS="-I/opt/intel/oneapi/ipp/latest/include -I/opt/intel/oneapi/ipp/latest/include/ipp" -DCMAKE_CXX_FLAGS="-I/opt/intel/oneapi/ipp/latest/include -I/opt/intel/oneapi/ipp/latest/include/ipp"
89+
90+
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
91+
with:
92+
name: coverity-reports
93+
path: '${{ github.workspace }}/cov-int'

0 commit comments

Comments
 (0)