5 - cron: '0 0 1 * *' # Monthly (1st day of month at midnight)
6 workflow_dispatch: # Mainly for testing. Don't forget the Coverity usage limits.
13 runs-on: ubuntu-latest
17 libt_version: ["2.0.10"]
22 boost_path: "${{ github.workspace }}/../boost"
23 coverity_path: "${{ github.workspace }}/../coverity"
24 libtorrent_path: "${{ github.workspace }}/../libtorrent"
27 - name: Checkout repository
28 uses: actions/checkout@v4
30 - name: Install dependencies
34 build-essential cmake ninja-build \
35 libssl-dev libxkbcommon-x11-dev libxcb-cursor-dev zlib1g-dev
39 BOOST_MAJOR_VERSION: "1"
40 BOOST_MINOR_VERSION: "86"
41 BOOST_PATCH_VERSION: "0"
43 boost_url="https://boostorg.jfrog.io/artifactory/main/release/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/source/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
44 boost_url2="https://sourceforge.net/projects/boost/files/boost/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
46 curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url"
47 tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
48 if [ "$_exitCode" -ne "0" ]; then
49 curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url2"
50 tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
52 mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}"
55 uses: jurplel/install-qt-action@v4
57 version: ${{ matrix.qt_version }}
58 archives: icu qtbase qtdeclarative qtsvg qttools
61 - name: Install libtorrent
64 --branch v${{ matrix.libt_version }} \
66 --recurse-submodules \
67 https://github.com/arvidn/libtorrent.git \
68 ${{ env.libtorrent_path }}
69 cd ${{ env.libtorrent_path }}
73 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
74 -DBOOST_ROOT="${{ env.boost_path }}" \
75 -Ddeprecated-functions=OFF
77 sudo cmake --install build
79 - name: Download Coverity Build Tool
83 -d "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=qbittorrent%2FqBittorrent" \
84 -o "${{ runner.temp }}/coverity_tool.tgz" \
85 "https://scan.coverity.com/download/linux64"
86 mkdir -p ${{ env.coverity_path }}
88 -xf "${{ runner.temp }}/coverity_tool.tgz" \
89 -C "${{ env.coverity_path }}" \
92 - name: Build qBittorrent
97 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
98 -DBOOST_ROOT="${{ env.boost_path }}" \
99 -DVERBOSE_CONFIGURE=ON \
100 -D${{ matrix.qbt_gui }}
101 PATH="${{ env.coverity_path }}/bin:$PATH" \
106 - name: Submit the result to Coverity Scan
108 tar -caf qbittorrent.xz cov-int
110 --form token="${{ secrets.COVERITY_SCAN_TOKEN }}" \
111 --form email=sledgehammer999@qbittorrent.org \
112 --form file=@qbittorrent.xz \
113 --form version="$(git rev-parse --short HEAD)" \
114 --form description="master" \
115 https://scan.coverity.com/builds?project=qbittorrent%2FqBittorrent