Skip to content

Commit 65f385d

Browse files
committed
ci: update codeql-analysis and fix build error
Signed-off-by: pingkai <pingkai010@gmail.com>
1 parent 7754ef0 commit 65f385d

File tree

5 files changed

+60
-33
lines changed

5 files changed

+60
-33
lines changed

.github/workflows/Linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
build:
1414

15-
runs-on: ubuntu-18.04
15+
runs-on: ubuntu-20.04
1616
steps:
1717
- uses: actions/checkout@v2
1818

.github/workflows/codeql-analysis.yml

Lines changed: 45 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
jobs:
2424
analyze:
2525
name: Analyze
26-
runs-on: ubuntu-latest
26+
runs-on: ubuntu-20.04
2727
permissions:
2828
actions: read
2929
contents: read
@@ -32,39 +32,56 @@ jobs:
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
language: [ 'cpp', 'java', 'python', 'ruby' ]
35+
language: [ 'cpp' ]
3636
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
3737
# Learn more about CodeQL language support at https://git.io/codeql-language-support
3838

3939
steps:
40-
- name: Checkout repository
41-
uses: actions/checkout@v2
40+
- name: Checkout repository
41+
uses: actions/checkout@v2
4242

43-
# Initializes the CodeQL tools for scanning.
44-
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v1
46-
with:
47-
languages: ${{ matrix.language }}
48-
# If you wish to specify custom queries, you can do so here or in a config file.
49-
# By default, queries listed here will override any specified in a config file.
50-
# Prefix the list here with "+" to use these queries and those in the config file.
51-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v1
46+
with:
47+
languages: ${{ matrix.language }}
48+
# If you wish to specify custom queries, you can do so here or in a config file.
49+
# By default, queries listed here will override any specified in a config file.
50+
# Prefix the list here with "+" to use these queries and those in the config file.
51+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5252

53-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54-
# If this step fails, then you should remove it and run the build manually (see below)
55-
- name: Autobuild
56-
uses: github/codeql-action/autobuild@v1
53+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54+
# If this step fails, then you should remove it and run the build manually (see below)
55+
# - name: Autobuild
56+
# uses: github/codeql-action/autobuild@v1
5757

58-
# ℹ️ Command-line programs to run using the OS shell.
59-
# 📚 https://git.io/JvXDl
58+
# ℹ️ Command-line programs to run using the OS shell.
59+
# 📚 https://git.io/JvXDl
6060

61-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62-
# and modify them (or add more) to build your code if your project
63-
# uses a compiled language
61+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62+
# and modify them (or add more) to build your code if your project
63+
# uses a compiled language
64+
- run: |
65+
sudo apt-get install -y yasm
66+
sudo apt-get install -y libsdl2-dev
67+
sudo apt-get install git make gcc autoconf libtool yasm cmake g++ libsdl2-dev
68+
wget "https://github.com/Kitware/CMake/releases/download/v3.16.2/cmake-3.16.2-Linux-x86_64.tar.gz"
69+
tar zxf cmake-3.16.2-Linux-x86_64.tar.gz
70+
export PATH=`pwd`/cmake-3.16.2-Linux-x86_64/bin:$PATH
71+
sudo apt-get install clang llvm
72+
echo 1 | sudo update-alternatives --config c++
73+
echo 1 | sudo update-alternatives --config cc
74+
git config --global user.email "you@example.com"
75+
git config --global user.name "Your Name"
76+
. setup.env
77+
cd external/
78+
./build_external.sh Linux
79+
cd ..
80+
cd cmdline/
81+
mkdir build
82+
cd build
83+
cmake ../
84+
make cicadaPlayer -j8
6485
65-
#- run: |
66-
# make bootstrap
67-
# make release
68-
69-
- name: Perform CodeQL Analysis
70-
uses: github/codeql-action/analyze@v1
86+
- name: Perform CodeQL Analysis
87+
uses: github/codeql-action/analyze@v1

cmdline/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ else ()
123123
)
124124
endif ()
125125
target_link_libraries(cicadaPlayer PUBLIC coverage_config)
126-
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
127-
else ()
128-
add_subdirectory(example)
129-
endif ()
126+
#if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
127+
#else ()
128+
# add_subdirectory(example)
129+
#endif ()
130130

131131
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
132132
target_link_libraries(cicadaPlayer PUBLIC X11)

framework/demuxer/dash/SidxParser.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#endif
1111
#include "utils/frame_work_log.h"
1212
#include <string>
13+
#include <cstring>
1314

1415
using namespace Cicada::Dash;
1516

framework/render/audio/CheaterAudioRender.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ namespace Cicada {
4545
{
4646
return 0;
4747
}
48+
bool device_require_format(const IAFFrame::audioInfo &info) override
49+
{
50+
mInputInfo = info;
51+
return true;
52+
}
53+
void device_mute(bool bMute)
54+
{
55+
return;
56+
}
4857

4958
private:
5059
af_clock mClock{};

0 commit comments

Comments
 (0)