From 36a6e22f27d3cb238c5b838320f9b4b11d819788 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Wed, 17 Nov 2021 12:27:38 +0800 Subject: [PATCH 1/2] Appveyor CI: Setup build environment directly vcvars64.bat is just a link to vcvarsall.bat with parameter `x64`. --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index b3c8bfd8c..5f465ac7d 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -42,7 +42,7 @@ install: before_build: # setup env - - CALL "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" + - CALL "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 - SET PATH=%PATH%;C:\Qt\5.15.2\msvc2019_64\bin;%CACHE_DIR%\jom # setup project - COPY /Y "%CACHE_DIR%\conf.pri" "%REPO_DIR%" From 7150d05399784386025860a6324704f214b7018e Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Wed, 17 Nov 2021 15:53:27 +0800 Subject: [PATCH 2/2] GHA CI: Simplify commands --- .github/workflows/ci_macos.yaml | 9 +++++---- .github/workflows/ci_ubuntu.yaml | 9 +++++---- .github/workflows/ci_windows.yaml | 7 +++++-- .github/workflows/coverity-scan.yml | 19 +++++++++++++------ 4 files changed, 28 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci_macos.yaml b/.github/workflows/ci_macos.yaml index 5e7ed0d4a..662509b7b 100644 --- a/.github/workflows/ci_macos.yaml +++ b/.github/workflows/ci_macos.yaml @@ -42,9 +42,12 @@ jobs: - name: Install libtorrent run: | - git clone --branch v${{ matrix.libt_version }} --depth 1 https://github.com/arvidn/libtorrent.git + git clone \ + --branch v${{ matrix.libt_version }} \ + --depth 1 \ + --recurse-submodules \ + https://github.com/arvidn/libtorrent.git cd libtorrent - git submodule update --init --recursive cmake \ -B build \ -G "Ninja" \ @@ -65,7 +68,6 @@ jobs: -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ -DOPENSSL_ROOT_DIR="${{ env.openssl_root }}" \ - -DQt5_DIR="$Qt5_DIR" \ -DVERBOSE_CONFIGURE=ON \ -D${{ matrix.qbt_gui }} cmake --build build @@ -80,7 +82,6 @@ jobs: -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ -DOPENSSL_ROOT_DIR="${{ env.openssl_root }}" \ -DQT6=ON \ - -DQt6_DIR="$Qt6_DIR" \ -DVERBOSE_CONFIGURE=ON \ -D${{ matrix.qbt_gui }} cmake --build build diff --git a/.github/workflows/ci_ubuntu.yaml b/.github/workflows/ci_ubuntu.yaml index 2f39f5035..f4be31438 100644 --- a/.github/workflows/ci_ubuntu.yaml +++ b/.github/workflows/ci_ubuntu.yaml @@ -41,9 +41,12 @@ jobs: - name: Install libtorrent run: | - git clone --branch v${{ matrix.libt_version }} --depth 1 https://github.com/arvidn/libtorrent.git + git clone \ + --branch v${{ matrix.libt_version }} \ + --depth 1 \ + --recurse-submodules \ + https://github.com/arvidn/libtorrent.git cd libtorrent - git submodule update --init --recursive cmake \ -B build \ -G "Ninja" \ @@ -62,7 +65,6 @@ jobs: -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ -DCMAKE_INSTALL_PREFIX="/usr" \ - -DQt5_DIR="$Qt5_DIR" \ -DVERBOSE_CONFIGURE=ON \ -D${{ matrix.qbt_gui }} cmake --build build @@ -78,7 +80,6 @@ jobs: -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ -DCMAKE_INSTALL_PREFIX="/usr" \ -DQT6=ON \ - -DQt6_DIR="$Qt6_DIR" \ -DVERBOSE_CONFIGURE=ON \ -D${{ matrix.qbt_gui }} cmake --build build diff --git a/.github/workflows/ci_windows.yaml b/.github/workflows/ci_windows.yaml index a09218ee0..ffec868af 100644 --- a/.github/workflows/ci_windows.yaml +++ b/.github/workflows/ci_windows.yaml @@ -78,9 +78,12 @@ jobs: - name: Install libtorrent run: | - git clone --branch v${{ matrix.libt_version }} --depth 1 https://github.com/arvidn/libtorrent.git + git clone ` + --branch v${{ matrix.libt_version }} ` + --depth 1 ` + --recurse-submodules ` + https://github.com/arvidn/libtorrent.git cd libtorrent - git submodule update --init --recursive cmake ` -B build ` -G "Ninja" ` diff --git a/.github/workflows/coverity-scan.yml b/.github/workflows/coverity-scan.yml index 5a58b994b..01acc5258 100644 --- a/.github/workflows/coverity-scan.yml +++ b/.github/workflows/coverity-scan.yml @@ -15,21 +15,28 @@ jobs: - name: Install dependencies run: | - sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-focal sudo apt update sudo apt install \ build-essential cmake ninja-build pkg-config \ - libboost-dev libssl-dev qt515base qt515svg qt515tools zlib1g-dev + libboost-dev libssl-dev zlib1g-dev + + - name: Install Qt + uses: jurplel/install-qt-action@v2 + with: + version: "5.15.2" - name: Install libtorrent run: | - git clone --branch v2.0.4 --depth 1 https://github.com/arvidn/libtorrent.git + git clone \ + --branch "v2.0.4" \ + --depth 1 \ + --recurse-submodules \ + https://github.com/arvidn/libtorrent.git cd libtorrent - git submodule update --init --recursive cmake \ -B build \ -G "Ninja" \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -Ddeprecated-functions=OFF cmake --build build sudo cmake --install build @@ -49,7 +56,7 @@ jobs: cmake \ -B build \ -G "Ninja" \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DGUI=ON \ -DVERBOSE_CONFIGURE=ON export PATH="$(pwd)/coverity_tool/bin:$PATH"