@@ -20,18 +20,21 @@ jobs:
2020 fail-fast : false
2121 matrix :
2222 libtorrent :
23- - version : " 2.1.0-rc1 "
23+ - version : " 2.1.0"
2424 boost_major_version : " 1"
2525 boost_minor_version : " 77"
2626 boost_patch_version : " 0"
27- - version : " 2.0.12"
27+ libt_build_flags : " -Dwebtorrent=ON"
28+ - version : " 2.0.13"
2829 boost_major_version : " 1"
2930 boost_minor_version : " 77"
3031 boost_patch_version : " 0"
32+ libt_build_flags : " "
3133 - version : " 1.2.20"
3234 boost_major_version : " 1"
3335 boost_minor_version : " 77"
3436 boost_patch_version : " 0"
37+ libt_build_flags : " "
3538 qbt_gui : ["GUI=ON", "GUI=OFF"]
3639 qt_version : ["6.6.3"]
3740
4245
4346 steps :
4447 - name : Checkout repository
45- uses : actions/checkout@v6
48+ uses : actions/checkout@v7
4649 with :
4750 persist-credentials : false
4851
9497 https://github.com/arvidn/libtorrent.git \
9598 ${{ env.libtorrent_path }}
9699 cd ${{ env.libtorrent_path }}
100+ CFLAGS="$CFLAGS ${{ env.harden_flags }}" \
97101 CXXFLAGS="$CXXFLAGS ${{ env.harden_flags }}" \
98102 cmake \
99103 -B build \
@@ -103,20 +107,22 @@ jobs:
103107 -DCMAKE_CXX_STANDARD=20 \
104108 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
105109 -DBOOST_ROOT="${{ env.boost_path }}/lib/cmake" \
106- -Ddeprecated-functions=OFF
110+ -Ddeprecated-functions=OFF \
111+ ${{ matrix.libtorrent.libt_build_flags }}
107112 cmake --build build
108113 sudo cmake --install build
109114
110115 # to avoid scanning 3rdparty codebases, initialize it just before building qbt
111116 - name : Initialize CodeQL
112117 uses : github/codeql-action/init@v4
113- if : startsWith(matrix.libtorrent.version, 2 ) && (matrix.qbt_gui == 'GUI=ON')
118+ if : startsWith(matrix.libtorrent.version, '2.0' ) && (matrix.qbt_gui == 'GUI=ON')
114119 with :
115120 config-file : ./.github/workflows/helper/codeql/cpp.yaml
116121 languages : cpp
117122
118123 - name : Build qBittorrent
119124 run : |
125+ CFLAGS="$CFLAGS ${{ env.harden_flags }}" \
120126 CXXFLAGS="$CXXFLAGS ${{ env.harden_flags }} -DQT_FORCE_ASSERTS -Werror" \
121127 LDFLAGS="$LDFLAGS -gz" \
122128 cmake \
@@ -141,9 +147,27 @@ jobs:
141147
142148 - name : Run CodeQL analysis
143149 uses : github/codeql-action/analyze@v4
144- if : startsWith(matrix.libtorrent.version, 2 ) && (matrix.qbt_gui == 'GUI=ON')
150+ if : startsWith(matrix.libtorrent.version, '2.0' ) && (matrix.qbt_gui == 'GUI=ON')
145151 with :
146152 category : ${{ github.base_ref || github.ref_name }}
153+ output : sarif-results
154+ upload : failure-only
155+
156+ # Filter out results from 3rdparty codebases
157+ - name : Filter CodeQL results
158+ uses : advanced-security/filter-sarif@2da736ff05ef065cb2894ac6892e47b5eac2c3c0 # v1.1
159+ if : startsWith(matrix.libtorrent.version, '2.0') && (matrix.qbt_gui == 'GUI=ON')
160+ with :
161+ patterns : |
162+ -src/base/3rdparty/**
163+ input : sarif-results/cpp.sarif
164+ output : sarif-results/cpp.sarif
165+
166+ - name : Upload CodeQL SARIF
167+ uses : github/codeql-action/upload-sarif@v4
168+ if : startsWith(matrix.libtorrent.version, '2.0') && (matrix.qbt_gui == 'GUI=ON')
169+ with :
170+ sarif_file : sarif-results/cpp.sarif
147171
148172 - name : Prepare build artifacts
149173 run : |
0 commit comments