1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-02-08 21:04:26 +00:00

Add proper indention to steps section

Following the style from the examples in https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idsteps
This commit is contained in:
Chocobo1 2021-08-13 01:49:47 +08:00
parent 23766cd01d
commit fb6282da57
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
4 changed files with 252 additions and 257 deletions

View File

@ -30,60 +30,60 @@ jobs:
shell: bash shell: bash
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 all build dependencies except libtorrent from Ubuntu repos
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 libgeoip-dev zlib1g-dev \ libssl-dev libgeoip-dev zlib1g-dev \
libboost-dev libboost-chrono-dev libboost-random-dev libboost-system-dev libboost-dev libboost-chrono-dev libboost-random-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 5.15.2 from an external PPA
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 from source
run: | run: |
git clone https://github.com/arvidn/libtorrent && cd libtorrent git clone https://github.com/arvidn/libtorrent && cd libtorrent
git checkout ${{ env.LIBTORRENT_VERSION_TAG }} git checkout ${{ env.LIBTORRENT_VERSION_TAG }}
cmake -B cmake-build-dir -G "Ninja" \ cmake -B cmake-build-dir -G "Ninja" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-Ddeprecated-functions=OFF \ -Ddeprecated-functions=OFF \
--graphviz=cmake-build-dir/target_graph.dot --graphviz=cmake-build-dir/target_graph.dot
cmake --build cmake-build-dir cmake --build cmake-build-dir
sudo cmake --install cmake-build-dir --prefix /usr/local sudo cmake --install cmake-build-dir --prefix /usr/local
- name: build qBittorrent - name: build qBittorrent
run: | run: |
cmake -B build -G "Ninja" \ cmake -B build -G "Ninja" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-D${{ matrix.qbt_gui }} \ -D${{ matrix.qbt_gui }} \
-DVERBOSE_CONFIGURE=ON \ -DVERBOSE_CONFIGURE=ON \
--graphviz=build/target_graph.dot --graphviz=build/target_graph.dot
cmake --build build cmake --build build
- name: install qBittorrent - name: install qBittorrent
run: sudo cmake --install build --prefix /usr/local run: sudo cmake --install build --prefix /usr/local
- name: upload artifact as zip - name: upload artifact as zip
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: qBittorrent-CI_${{ matrix.os }}-x64_${{ matrix.qbt_gui }} name: qBittorrent-CI_${{ matrix.os }}-x64_${{ matrix.qbt_gui }}
path: | path: |
build/compile_commands.json build/compile_commands.json
build/install_manifest.txt build/install_manifest.txt
build/target_graph.dot build/target_graph.dot
build/qbittorrent build/qbittorrent
build/qbittorrent-nox build/qbittorrent-nox
libtorrent/cmake-build-dir/compile_commands.json libtorrent/cmake-build-dir/compile_commands.json
libtorrent/cmake-build-dir/target_graph.dot libtorrent/cmake-build-dir/target_graph.dot
ci_windows: ci_windows:
name: Windows + vcpkg name: Windows + vcpkg
@ -95,76 +95,76 @@ jobs:
shell: pwsh shell: pwsh
steps: steps:
- name: checkout repository - name: checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
# - ninja is needed for building qBittorrent (because it's preferable, not a hard requirement) # - ninja is needed for building qBittorrent (because it's preferable, not a hard requirement)
- name: install additional required packages with chocolatey - name: install additional required packages with chocolatey
run: | run: |
choco install ninja choco install ninja
- name: setup vcpkg (cached, if possible) - name: setup vcpkg (cached, if possible)
uses: lukka/run-vcpkg@v7 uses: lukka/run-vcpkg@v7
with: with:
vcpkgDirectory: ${{ env.VCPKG_DEST_WIN }} vcpkgDirectory: ${{ env.VCPKG_DEST_WIN }}
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT }} vcpkgGitCommitId: ${{ env.VCPKG_COMMIT }}
setupOnly: true setupOnly: true
# Tell vcpkg to only build Release variants of the dependencies # Tell vcpkg to only build Release variants of the dependencies
- name: configure vcpkg triplet overlay for release builds only - name: configure vcpkg triplet overlay for release builds only
run: | run: |
New-Item -Path ${{ github.workspace }} -Name "triplets_overlay" -ItemType Directory New-Item -Path ${{ github.workspace }} -Name "triplets_overlay" -ItemType Directory
Copy-Item ${{ env.RUNVCPKG_VCPKG_ROOT }}/triplets/x64-windows-static.cmake ` Copy-Item ${{ env.RUNVCPKG_VCPKG_ROOT }}/triplets/x64-windows-static.cmake `
${{ github.workspace }}/triplets_overlay/x64-windows-static-release.cmake ${{ github.workspace }}/triplets_overlay/x64-windows-static-release.cmake
Add-Content ${{ github.workspace }}/triplets_overlay/x64-windows-static-release.cmake ` Add-Content ${{ github.workspace }}/triplets_overlay/x64-windows-static-release.cmake `
-Value "set(VCPKG_BUILD_TYPE release)" -Value "set(VCPKG_BUILD_TYPE release)"
# clear buildtrees after each package installation to reduce disk space requirements # clear buildtrees after each package installation to reduce disk space requirements
- name: install dependencies via vcpkg - name: install dependencies via vcpkg
run: | run: |
$packages = ` $packages = `
"boost-circular-buffer:x64-windows-static-release", "boost-circular-buffer:x64-windows-static-release",
"libtorrent:x64-windows-static-release", "libtorrent:x64-windows-static-release",
"qt5-base:x64-windows-static-release", "qt5-base:x64-windows-static-release",
"qt5-svg:x64-windows-static-release", "qt5-svg:x64-windows-static-release",
"qt5-tools:x64-windows-static-release", "qt5-tools:x64-windows-static-release",
"qt5-winextras:x64-windows-static-release" "qt5-winextras:x64-windows-static-release"
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe upgrade ` ${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe upgrade `
--overlay-triplets=${{ github.workspace }}/triplets_overlay ` --overlay-triplets=${{ github.workspace }}/triplets_overlay `
--no-dry-run --no-dry-run
foreach($package in $packages) foreach($package in $packages)
{ {
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe install $package ` ${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe install $package `
--overlay-triplets=${{ github.workspace }}/triplets_overlay ` --overlay-triplets=${{ github.workspace }}/triplets_overlay `
--clean-after-build --clean-after-build
} }
# NOTE: this is necessary to correctly find and use cl.exe with the Ninja generator for now # NOTE: this is necessary to correctly find and use cl.exe with the Ninja generator for now
- name: setup devcmd - name: setup devcmd
uses: ilammy/msvc-dev-cmd@v1 uses: ilammy/msvc-dev-cmd@v1
- name: build qBittorrent - name: build qBittorrent
shell: cmd shell: cmd
run: | run: |
cmake -B build -G "Ninja" ^ cmake -B build -G "Ninja" ^
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ^ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ^
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_DEST_WIN }}\scripts\buildsystems\vcpkg.cmake ^ -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_DEST_WIN }}\scripts\buildsystems\vcpkg.cmake ^
-DVCPKG_TARGET_TRIPLET=x64-windows-static-release ^ -DVCPKG_TARGET_TRIPLET=x64-windows-static-release ^
-DVERBOSE_CONFIGURE=ON ^ -DVERBOSE_CONFIGURE=ON ^
-DMSVC_RUNTIME_DYNAMIC=OFF ^ -DMSVC_RUNTIME_DYNAMIC=OFF ^
--graphviz=build\target_graph.dot --graphviz=build\target_graph.dot
cmake --build build cmake --build build
- name: upload artifact as zip - name: upload artifact as zip
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: qBittorrent-CI_Windows-x64 name: qBittorrent-CI_Windows-x64
path: | path: |
build/compile_commands.json build/compile_commands.json
build/target_graph.dot build/target_graph.dot
build/qbittorrent.exe build/qbittorrent.exe
build/qbittorrent.pdb build/qbittorrent.pdb
dist/windows/qt.conf dist/windows/qt.conf
ci_macos: ci_macos:
name: macOS + vcpkg name: macOS + vcpkg
@ -181,74 +181,74 @@ jobs:
shell: pwsh shell: pwsh
steps: steps:
- name: checkout repository - name: checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
# - ninja is needed for building qBittorrent (because it's preferable, not a hard requirement) # - ninja is needed for building qBittorrent (because it's preferable, not a hard requirement)
# - automake is needed for the installation the vcpkg installation of fontconfig, a dependency of qt5-base # - automake is needed for the installation the vcpkg installation of fontconfig, a dependency of qt5-base
- name: install additional required packages with homebrew - name: install additional required packages with homebrew
shell: bash shell: bash
run: | run: |
brew install automake ninja brew install automake ninja
- name: setup vcpkg (cached, if possible) - name: setup vcpkg (cached, if possible)
uses: lukka/run-vcpkg@v7 uses: lukka/run-vcpkg@v7
with: with:
vcpkgDirectory: ${{ env.VCPKG_DEST_MACOS }} vcpkgDirectory: ${{ env.VCPKG_DEST_MACOS }}
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT }} vcpkgGitCommitId: ${{ env.VCPKG_COMMIT }}
setupOnly: true setupOnly: true
- name: configure vcpkg triplet overlay for release builds only - name: configure vcpkg triplet overlay for release builds only
run: | run: |
New-Item -Path ${{ github.workspace }} -Name "triplets_overlay" -ItemType Directory New-Item -Path ${{ github.workspace }} -Name "triplets_overlay" -ItemType Directory
Copy-Item ${{ env.RUNVCPKG_VCPKG_ROOT }}/triplets/x64-osx.cmake ` Copy-Item ${{ env.RUNVCPKG_VCPKG_ROOT }}/triplets/x64-osx.cmake `
${{ github.workspace }}/triplets_overlay/x64-osx-release.cmake ${{ github.workspace }}/triplets_overlay/x64-osx-release.cmake
Add-Content ${{ github.workspace }}/triplets_overlay/x64-osx-release.cmake ` Add-Content ${{ github.workspace }}/triplets_overlay/x64-osx-release.cmake `
-Value "set(VCPKG_BUILD_TYPE release)","set(VCPKG_OSX_DEPLOYMENT_TARGET 10.15)" -Value "set(VCPKG_BUILD_TYPE release)","set(VCPKG_OSX_DEPLOYMENT_TARGET 10.15)"
# NOTE: Avoids a libtorrent ABI issue. See https://github.com/arvidn/libtorrent/issues/4965 # NOTE: Avoids a libtorrent ABI issue. See https://github.com/arvidn/libtorrent/issues/4965
- name: force AppleClang to compile libtorrent with the same C++ standard as qBittorrent - name: force AppleClang to compile libtorrent with the same C++ standard as qBittorrent
run: | run: |
(Get-Content -path ${{ env.RUNVCPKG_VCPKG_ROOT }}/ports/libtorrent/portfile.cmake).Replace( ` (Get-Content -path ${{ env.RUNVCPKG_VCPKG_ROOT }}/ports/libtorrent/portfile.cmake).Replace( `
'${FEATURE_OPTIONS}', '${FEATURE_OPTIONS} -DCMAKE_CXX_STANDARD=17') ` '${FEATURE_OPTIONS}', '${FEATURE_OPTIONS} -DCMAKE_CXX_STANDARD=17') `
| Set-Content -Path ${{ env.RUNVCPKG_VCPKG_ROOT }}/ports/libtorrent/portfile.cmake | Set-Content -Path ${{ env.RUNVCPKG_VCPKG_ROOT }}/ports/libtorrent/portfile.cmake
- name: install dependencies via vcpkg - name: install dependencies via vcpkg
run: | run: |
$packages = ` $packages = `
"boost-circular-buffer:x64-osx-release", "boost-circular-buffer:x64-osx-release",
"libtorrent:x64-osx-release", "libtorrent:x64-osx-release",
"qt5-base:x64-osx-release", "qt5-base:x64-osx-release",
"qt5-svg:x64-osx-release", "qt5-svg:x64-osx-release",
"qt5-tools:x64-osx-release", "qt5-tools:x64-osx-release",
"qt5-macextras:x64-osx-release" "qt5-macextras:x64-osx-release"
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg upgrade ` ${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg upgrade `
--overlay-triplets=${{ github.workspace }}/triplets_overlay ` --overlay-triplets=${{ github.workspace }}/triplets_overlay `
--no-dry-run --no-dry-run
foreach($package in $packages) foreach($package in $packages)
{ {
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg install $package ` ${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg install $package `
--overlay-triplets=${{ github.workspace }}/triplets_overlay ` --overlay-triplets=${{ github.workspace }}/triplets_overlay `
--clean-after-build --clean-after-build
} }
- name: build qBittorrent - name: build qBittorrent
shell: bash shell: bash
run: | run: |
cmake -B build -G "Ninja" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo \ cmake -B build -G "Ninja" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_DEST_MACOS }}/scripts/buildsystems/vcpkg.cmake \ -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_DEST_MACOS }}/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_TARGET_TRIPLET=x64-osx-release \ -DVCPKG_TARGET_TRIPLET=x64-osx-release \
-D${{ matrix.qbt_gui }} \ -D${{ matrix.qbt_gui }} \
-DVERBOSE_CONFIGURE=ON \ -DVERBOSE_CONFIGURE=ON \
--graphviz=build/target_graph.dot --graphviz=build/target_graph.dot
cmake --build build cmake --build build
- name: upload artifact as zip - name: upload artifact as zip
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: qBittorrent-CI_macOS_${{ matrix.qbt_gui }} name: qBittorrent-CI_macOS_${{ matrix.qbt_gui }}
path: | path: |
build/compile_commands.json build/compile_commands.json
build/target_graph.dot build/target_graph.dot
build/qbittorrent.app build/qbittorrent.app
build/qbittorrent-nox.app build/qbittorrent-nox.app

View File

@ -1,78 +1,75 @@
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 all build dependencies except libtorrent from Ubuntu repos
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 5.15.2 from an external PPA
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 from source
run: | run: |
git clone https://github.com/arvidn/libtorrent && cd libtorrent git clone https://github.com/arvidn/libtorrent && cd libtorrent
git checkout ${{ env.LIBTORRENT_VERSION_TAG }} git checkout ${{ env.LIBTORRENT_VERSION_TAG }}
cmake -B cmake-build-dir -G "Ninja" \ cmake -B cmake-build-dir -G "Ninja" \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-Ddeprecated-functions=OFF -Ddeprecated-functions=OFF
cmake --build cmake-build-dir cmake --build cmake-build-dir
sudo cmake --install cmake-build-dir --prefix /usr/local sudo cmake --install cmake-build-dir --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 -q https://scan.coverity.com/download/linux64 --post-data "token=$TOKEN&project=qbittorrent%2FqBittorrent" -O coverity_tool.tgz
mkdir coverity_tool mkdir coverity_tool
tar xzf coverity_tool.tgz --strip 1 -C coverity_tool tar xzf coverity_tool.tgz --strip 1 -C coverity_tool
env: env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
- name: Configure qBittorrent - name: Configure qBittorrent
run: | run: |
cmake -B build -G "Ninja" \ cmake -B build -G "Ninja" \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DGUI=ON \ -DGUI=ON \
-DVERBOSE_CONFIGURE=ON -DVERBOSE_CONFIGURE=ON
- name: Build with cov-build - name: Build with cov-build
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 }}

View File

@ -5,18 +5,16 @@ on: [pull_request, push]
jobs: jobs:
check_file_health: check_file_health:
name: Check file health name: Check file health
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 zsh - name: install zsh
run: | run: |
sudo apt update sudo apt update
sudo apt install zsh sudo apt install zsh
- name: run check file health script - name: run check file health script
run: | run: |
./.github/workflows/file_health.sh ./.github/workflows/file_health.sh

View File

@ -11,21 +11,21 @@ jobs:
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: '14'
- 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