Chocobo1
3 years ago
committed by
GitHub
4 changed files with 317 additions and 289 deletions
@ -1,78 +1,85 @@ |
|||||||
name: Coverity Scan |
name: Coverity Scan |
||||||
|
|
||||||
on: |
on: |
||||||
schedule: |
schedule: |
||||||
- cron: '0 0 1 * *' # Monthly (1st day of month at midnight) |
- cron: '0 0 1 * *' # Monthly (1st day of month at midnight) |
||||||
|
|
||||||
workflow_dispatch: # Mainly for testing. Don't forget the Coverity usage limits. |
workflow_dispatch: # Mainly for testing. Don't forget the Coverity usage limits. |
||||||
|
|
||||||
env: |
env: |
||||||
LIBTORRENT_VERSION_TAG: v1.2.14 |
LIBTORRENT_VERSION_TAG: v1.2.14 |
||||||
|
|
||||||
jobs: |
jobs: |
||||||
|
|
||||||
coverity_scan: |
coverity_scan: |
||||||
name: Scan |
name: Scan |
||||||
|
|
||||||
runs-on: ubuntu-20.04 |
runs-on: ubuntu-20.04 |
||||||
|
|
||||||
steps: |
steps: |
||||||
- name: checkout repository |
- name: Checkout repository |
||||||
uses: actions/checkout@v2 |
uses: actions/checkout@v2 |
||||||
|
|
||||||
- name: install all build dependencies except libtorrent from Ubuntu repos |
- name: Install dependencies |
||||||
run: | |
run: | |
||||||
sudo apt update |
sudo apt update |
||||||
sudo apt install \ |
sudo apt install \ |
||||||
build-essential cmake git ninja-build pkg-config \ |
build-essential cmake git ninja-build pkg-config \ |
||||||
libssl-dev zlib1g-dev libboost-dev libboost-system-dev |
libssl-dev zlib1g-dev libboost-dev libboost-system-dev |
||||||
# sudo apt install libqt5svg5-dev qtbase5-dev qttools5-dev # the Qt version in the standard repositories is too old... |
# sudo apt install libqt5svg5-dev qtbase5-dev qttools5-dev # the Qt version in the standard repositories is too old... |
||||||
|
|
||||||
# this will be installed under /opt/qt515. CMake will still find it automatically without additional hints |
# 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 |
# to speed up the process, only the required components are installed rather than the full qt515-meta-full metapackage |
||||||
- name: install Qt 5.15.2 from an external PPA |
- name: Install Qt |
||||||
run: | |
run: | |
||||||
sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-focal |
sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-focal |
||||||
sudo apt install qt515base qt515svg qt515tools |
sudo apt install \ |
||||||
|
qt515base qt515svg qt515tools |
||||||
|
|
||||||
- name: install libtorrent from source |
- name: Install libtorrent |
||||||
run: | |
run: | |
||||||
git clone https://github.com/arvidn/libtorrent && cd libtorrent |
git clone https://github.com/arvidn/libtorrent |
||||||
git checkout ${{ env.LIBTORRENT_VERSION_TAG }} |
cd libtorrent |
||||||
cmake -B cmake-build-dir -G "Ninja" \ |
git checkout ${{ env.LIBTORRENT_VERSION_TAG }} |
||||||
-DCMAKE_BUILD_TYPE=Release \ |
cmake \ |
||||||
-Ddeprecated-functions=OFF |
-B build \ |
||||||
cmake --build cmake-build-dir |
-G "Ninja" \ |
||||||
sudo cmake --install cmake-build-dir --prefix /usr/local |
-DCMAKE_BUILD_TYPE=Release \ |
||||||
|
-Ddeprecated-functions=OFF |
||||||
|
cmake --build build |
||||||
|
sudo cmake --install build --prefix /usr/local |
||||||
|
|
||||||
- name: Download Coverity Build Tool |
- name: Download Coverity Build Tool |
||||||
run: | |
run: | |
||||||
wget -q https://scan.coverity.com/download/linux64 --post-data "token=$TOKEN&project=qbittorrent%2FqBittorrent" -O coverity_tool.tgz |
wget \ |
||||||
mkdir coverity_tool |
-q \ |
||||||
tar xzf coverity_tool.tgz --strip 1 -C coverity_tool |
https://scan.coverity.com/download/linux64 \ |
||||||
env: |
--post-data "token=$TOKEN&project=qbittorrent%2FqBittorrent" \ |
||||||
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} |
-O coverity_tool.tgz |
||||||
|
mkdir coverity_tool |
||||||
|
tar xzf coverity_tool.tgz --strip 1 -C coverity_tool |
||||||
|
env: |
||||||
|
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} |
||||||
|
|
||||||
- name: Configure qBittorrent |
- name: Configure qBittorrent |
||||||
run: | |
run: | |
||||||
cmake -B build -G "Ninja" \ |
cmake \ |
||||||
-DCMAKE_BUILD_TYPE=Release \ |
-B build \ |
||||||
-DGUI=ON \ |
-G "Ninja" \ |
||||||
-DVERBOSE_CONFIGURE=ON |
-DCMAKE_BUILD_TYPE=Release \ |
||||||
|
-DGUI=ON \ |
||||||
|
-DVERBOSE_CONFIGURE=ON |
||||||
|
|
||||||
- name: Build with cov-build |
- name: Build qBittorrent |
||||||
run: | |
run: | |
||||||
export PATH=`pwd`/coverity_tool/bin:$PATH |
export PATH="$(pwd)/coverity_tool/bin:$PATH" |
||||||
cov-build --dir cov-int cmake --build build |
cov-build --dir cov-int cmake --build build |
||||||
|
|
||||||
- name: Submit the result to Coverity Scan |
- name: Submit the result to Coverity Scan |
||||||
run: | |
run: | |
||||||
tar caf qbittorrent.xz cov-int |
tar caf qbittorrent.xz cov-int |
||||||
curl \ |
curl \ |
||||||
--form token=$TOKEN \ |
--form token=$TOKEN \ |
||||||
--form email=sledgehammer999@qbittorrent.org \ |
--form email=sledgehammer999@qbittorrent.org \ |
||||||
--form file=@qbittorrent.tgz \ |
--form file=@qbittorrent.tgz \ |
||||||
--form version="`git rev-parse --short HEAD`" \ |
--form version="$(git rev-parse --short HEAD)" \ |
||||||
--form description="master" \ |
--form description="master" \ |
||||||
https://scan.coverity.com/builds?project=qbittorrent%2FqBittorrent |
https://scan.coverity.com/builds?project=qbittorrent%2FqBittorrent |
||||||
env: |
env: |
||||||
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} |
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} |
||||||
|
@ -1,22 +1,20 @@ |
|||||||
name: GitHub Actions file health check |
name: CI - File health |
||||||
|
|
||||||
on: [pull_request, push] |
on: [pull_request, push] |
||||||
|
|
||||||
jobs: |
jobs: |
||||||
check_file_health: |
check_file_health: |
||||||
name: Check file health |
name: Check file health |
||||||
|
runs-on: ubuntu-latest |
||||||
runs-on: ubuntu-20.04 |
|
||||||
|
|
||||||
steps: |
steps: |
||||||
- name: checkout repository |
- name: Checkout repository |
||||||
uses: actions/checkout@v2 |
uses: actions/checkout@v2 |
||||||
|
|
||||||
- name: install zsh |
- name: Install tools |
||||||
run: | |
run: | |
||||||
sudo apt update |
sudo apt update |
||||||
sudo apt install zsh |
sudo apt install zsh |
||||||
|
|
||||||
- name: run check file health script |
- name: Run script |
||||||
run: | |
run: | |
||||||
./.github/workflows/file_health.sh |
./.github/workflows/file_health.sh |
||||||
|
@ -1,31 +1,31 @@ |
|||||||
name: WebUI CI |
name: CI - WebUI |
||||||
|
|
||||||
on: [pull_request, push] |
on: [pull_request, push] |
||||||
|
|
||||||
jobs: |
jobs: |
||||||
check_webui: |
check_webui: |
||||||
name: Check WebUI |
name: Check WebUI |
||||||
runs-on: ubuntu-20.04 |
runs-on: ubuntu-latest |
||||||
defaults: |
defaults: |
||||||
run: |
run: |
||||||
working-directory: src/webui/www |
working-directory: src/webui/www |
||||||
|
|
||||||
steps: |
steps: |
||||||
- name: checkout repository |
- name: Checkout repository |
||||||
uses: actions/checkout@v2 |
uses: actions/checkout@v2 |
||||||
|
|
||||||
- name: setup nodejs |
- name: Setup nodejs |
||||||
uses: actions/setup-node@v2 |
uses: actions/setup-node@v2 |
||||||
with: |
with: |
||||||
node-version: '14' |
node-version: 'lts/*' |
||||||
|
|
||||||
- name: install tools |
- name: Install tools |
||||||
run: npm install |
run: npm install |
||||||
|
|
||||||
- name: lint code |
- name: Lint code |
||||||
run: npm run lint |
run: npm run lint |
||||||
|
|
||||||
- name: format code |
- name: Format code |
||||||
run: | |
run: | |
||||||
npm run format |
npm run format |
||||||
git diff --exit-code |
git diff --exit-code |
||||||
|
Loading…
Reference in new issue