Skip to content

Commit 99facb4

Browse files
authored
compile the project before code scan
1 parent f7615e7 commit 99facb4

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

.github/workflows/sonarqube.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,45 @@ on:
99
jobs:
1010
sonarqube:
1111
name: SonarQube Scan
12-
runs-on: ubuntu-latest
12+
runs-on: ubuntu-20.04
13+
env:
14+
BUILD_WRAPPER_OUT_DIR: build
1315

1416
steps:
1517
- name: Checkout code
1618
uses: actions/checkout@v3
1719

20+
- name: Checkout BMF repository (specific branch)
21+
run: |
22+
sudo apt update
23+
sudo apt install -y make git pkg-config libssl-dev cmake binutils-dev libgoogle-glog-dev gcc g++ golang wget libgl1
24+
sudo apt install -y python3.9 python3-dev python3-pip libsndfile1 libsndfile1-dev
25+
# sudo python3 -m pip install timeout_decorator numpy onnxruntime pytest opencv-python librosa
26+
27+
git clone https://github.com/JackLau1222/bmf.git
28+
(cd bmf && git checkout fork_by_oc && sudo scripts/build_ffmpeg.sh nasm yasm x264 x265 opus && ./build.sh )
29+
# setup bmf root path
30+
# echo "BMF_ROOT_PATH=${BMF_ROOT_PATH}:$(pwd)/bmf/output/bmf" >> $GITHUB_ENV
31+
# export BMF_ROOT_PATH=${BMF_ROOT_PATH}:$(pwd)/bmf/output/bmf
32+
cd bmf
33+
echo "C_INCLUDE_PATH=${C_INCLUDE_PATH}:$(pwd)/output/bmf/include" >> $GITHUB_ENV
34+
echo "CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:$(pwd)/output/bmf/include" >> $GITHUB_ENV
35+
echo "LIBRARY_PATH=${LIBRARY_PATH}:$(pwd)/output/bmf/lib" >> $GITHUB_ENV
36+
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(pwd)/output/bmf/lib" >> $GITHUB_ENV
37+
38+
39+
- name: Set up Qt
40+
run: |
41+
sudo apt-get install -y qt5-qmake qtbase5-dev qtchooser qtbase5-dev-tools cmake build-essential
42+
43+
- name: Install Build Wrapper
44+
uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v4
45+
- name: Run Build Wrapper
46+
run: |
47+
cd src && mkdir build
48+
cmake -S . -B build
49+
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build/ --config Release
50+
1851
- name: SonarQube Scan
1952
uses: SonarSource/sonarqube-scan-action@v4
2053
env:

0 commit comments

Comments
 (0)