Browse Source

Split commands to multiple lines properly

adaptive-webui-19844
Chocobo1 3 years ago
parent
commit
a23e10dff5
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 73
      .github/workflows/ci.yaml
  2. 24
      .github/workflows/coverity-scan.yml

73
.github/workflows/ci.yaml

@ -13,8 +13,7 @@ env:
LIBTORRENT_VERSION_TAG: v1.2.14 LIBTORRENT_VERSION_TAG: v1.2.14
jobs: jobs:
ubuntu:
ci_ubuntu:
name: Ubuntu name: Ubuntu
strategy: strategy:
@ -47,23 +46,31 @@ jobs:
- 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 \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-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 build
sudo cmake --install cmake-build-dir --prefix /usr/local sudo cmake --install build --prefix /usr/local
- name: build qBittorrent - name: build qBittorrent
run: | run: |
cmake -B build -G "Ninja" \ cmake \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-D${{ matrix.qbt_gui }} \ -D${{ matrix.qbt_gui }} \
-DVERBOSE_CONFIGURE=ON \ -DVERBOSE_CONFIGURE=ON \
--graphviz=build/target_graph.dot --graphviz=build/target_graph.dot
@ -85,9 +92,8 @@ jobs:
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: windows:
name: Windows + vcpkg name: Windows + vcpkg
runs-on: windows-2019 runs-on: windows-2019
defaults: defaults:
@ -113,10 +119,15 @@ jobs:
# 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 `
Copy-Item ${{ env.RUNVCPKG_VCPKG_ROOT }}/triplets/x64-windows-static.cmake ` -Path ${{ github.workspace }} `
-Name "triplets_overlay" `
-ItemType Directory
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
@ -146,8 +157,11 @@ jobs:
- name: build qBittorrent - name: build qBittorrent
shell: cmd shell: cmd
run: | run: |
cmake -B build -G "Ninja" ^ cmake ^
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ^ -B build ^
-G "Ninja" ^
-DCMAKE_BUILD_TYPE=RelWithDebInfo ^
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON ^
-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 ^
@ -166,16 +180,15 @@ jobs:
build/qbittorrent.pdb build/qbittorrent.pdb
dist/windows/qt.conf dist/windows/qt.conf
ci_macos: macos:
name: macOS + vcpkg name: macOS + vcpkg
runs-on: macos-10.15
strategy: strategy:
matrix: matrix:
qbt_gui: ["GUI=ON", "GUI=OFF"] qbt_gui: ["GUI=ON", "GUI=OFF"]
fail-fast: false fail-fast: false
runs-on: macos-10.15
defaults: defaults:
run: run:
shell: pwsh shell: pwsh
@ -200,16 +213,22 @@ jobs:
- 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 `
Copy-Item ${{ env.RUNVCPKG_VCPKG_ROOT }}/triplets/x64-osx.cmake ` -Path ${{ github.workspace }} `
-Name "triplets_overlay" `
-ItemType Directory
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
@ -235,7 +254,11 @@ jobs:
- 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_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-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 }} \

24
.github/workflows/coverity-scan.yml

@ -29,21 +29,29 @@ jobs:
- 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 build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-Ddeprecated-functions=OFF -Ddeprecated-functions=OFF
cmake --build cmake-build-dir cmake --build build
sudo cmake --install cmake-build-dir --prefix /usr/local 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 \
-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:
@ -51,7 +59,9 @@ jobs:
- 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

Loading…
Cancel
Save