qBittorrent/.github/workflows/coverity-scan.yml

79 lines
2.7 KiB
YAML
Raw Normal View History

2021-08-07 18:07:27 +03:00
name: Coverity Scan
2021-08-07 18:07:27 +03:00
on:
schedule:
- cron: '0 0 1 * *' # Monthly (1st day of month at midnight)
workflow_dispatch: # Mainly for testing. Don't forget the Coverity usage limits.
jobs:
coverity_scan:
name: Scan
runs-on: ubuntu-20.04
steps:
2021-08-14 09:54:15 +03:00
- name: Checkout repository
uses: actions/checkout@v2
2021-08-07 18:07:27 +03:00
2021-08-14 09:56:37 +03:00
- name: Install dependencies
run: |
sudo apt update
sudo apt install \
build-essential cmake ninja-build pkg-config \
libboost-dev libssl-dev zlib1g-dev
# sudo apt install libqt5svg5-dev qtbase5-dev qttools5-dev # the Qt version in the standard repositories is too old...
2021-08-07 18:07:27 +03:00
# this will be installed under /opt/qt515. CMake will still find it automatically without additional hints
# to speed up the process, only the required components are installed rather than the full qt515-meta-full metapackage
2021-08-14 09:56:37 +03:00
- name: Install Qt
run: |
sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-focal
sudo apt install \
qt515base qt515svg qt515tools
2021-08-07 18:07:27 +03:00
2021-08-14 09:56:37 +03:00
- name: Install libtorrent
run: |
git clone --branch v2.0.4 --depth 1 https://github.com/arvidn/libtorrent.git
cd libtorrent
git submodule update --init --recursive
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=Release \
-Ddeprecated-functions=OFF
cmake --build build
sudo cmake --install build
2021-08-07 18:07:27 +03:00
- name: Download Coverity Build Tool
run: |
wget \
-q \
https://scan.coverity.com/download/linux64 \
--post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=qbittorrent%2FqBittorrent" \
-O coverity_tool.tgz
mkdir coverity_tool
tar xzf coverity_tool.tgz --strip 1 -C coverity_tool
2021-08-07 18:07:27 +03:00
- name: Configure qBittorrent
run: |
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=Release \
-DGUI=ON \
-DVERBOSE_CONFIGURE=ON
2021-08-07 18:07:27 +03:00
2021-08-14 09:56:37 +03:00
- name: Build qBittorrent
run: |
export PATH="$(pwd)/coverity_tool/bin:$PATH"
cov-build --dir cov-int cmake --build build
2021-08-07 18:07:27 +03:00
- name: Submit the result to Coverity Scan
run: |
tar caf qbittorrent.xz cov-int
curl \
--form token="${{ secrets.COVERITY_SCAN_TOKEN }}" \
--form email=sledgehammer999@qbittorrent.org \
2021-09-11 07:07:52 +03:00
--form file=@qbittorrent.xz \
--form version="$(git rev-parse --short HEAD)" \
--form description="master" \
https://scan.coverity.com/builds?project=qbittorrent%2FqBittorrent