From 793e8643bf5134576046aab47319b61422fbb7fd Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Wed, 18 Aug 2021 12:35:45 +0800 Subject: [PATCH 1/4] GHA CI: Support libtorrent v2.0.4 --- .github/workflows/ci.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ada163346..7af61bd94 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,7 +10,6 @@ env: VCPKG_COMMIT: 8dddc6c899ce6fdbeab38b525a31e7f23cb2d5bb VCPKG_DEST_MACOS: /Users/runner/qbt_tools/vcpkg VCPKG_DEST_WIN: C:\qbt_tools\vcpkg - LIBTORRENT_VERSION_TAG: v1.2.14 jobs: ubuntu: @@ -20,6 +19,7 @@ jobs: matrix: os: [ubuntu-20.04] qbt_gui: ["GUI=ON", "GUI=OFF"] + libt_version: ["v2.0.4", "v1.2.14"] fail-fast: false runs-on: ${{ matrix.os }} @@ -51,9 +51,9 @@ jobs: - name: Install libtorrent run: | - git clone https://github.com/arvidn/libtorrent + git clone --branch ${{ matrix.libt_version }} --depth 1 https://github.com/arvidn/libtorrent.git cd libtorrent - git checkout ${{ env.LIBTORRENT_VERSION_TAG }} + git submodule update --init --recursive cmake \ -B build \ -G "Ninja" \ @@ -82,7 +82,7 @@ jobs: - name: Upload build artifacts uses: actions/upload-artifact@v2 with: - name: qBittorrent-CI_${{ matrix.os }}-x64_${{ matrix.qbt_gui }} + name: qBittorrent-CI_${{ matrix.os }}-x64_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }} path: | build/compile_commands.json build/install_manifest.txt From 69f7f233fd8e268aceba6e7d78a55d0195218ac5 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Wed, 18 Aug 2021 12:40:03 +0800 Subject: [PATCH 2/4] GHA CI: Remove OS variable from build matrix It is meaningless to build on multiple linux versions as we only depend on library versions, not OS versions. Also remove redundant "shell default" section. --- .github/workflows/ci.yaml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7af61bd94..34724e4db 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,20 +14,14 @@ env: jobs: ubuntu: name: Ubuntu + runs-on: ubuntu-20.04 strategy: matrix: - os: [ubuntu-20.04] qbt_gui: ["GUI=ON", "GUI=OFF"] libt_version: ["v2.0.4", "v1.2.14"] fail-fast: false - runs-on: ${{ matrix.os }} - - defaults: - run: - shell: bash - steps: - name: Checkout repository uses: actions/checkout@v2 @@ -82,7 +76,7 @@ jobs: - name: Upload build artifacts uses: actions/upload-artifact@v2 with: - name: qBittorrent-CI_${{ matrix.os }}-x64_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }} + name: qBittorrent-CI_ubuntu-20.04-x64_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }} path: | build/compile_commands.json build/install_manifest.txt From 00d29979710f225443f7a85824251b4b09071dcf Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Wed, 18 Aug 2021 13:01:04 +0800 Subject: [PATCH 3/4] GHA CI: Move global environment variables out --- .github/workflows/ci.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 34724e4db..213c229c5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,8 +8,6 @@ on: [pull_request, push] env: VCPKG_COMMIT: 8dddc6c899ce6fdbeab38b525a31e7f23cb2d5bb - VCPKG_DEST_MACOS: /Users/runner/qbt_tools/vcpkg - VCPKG_DEST_WIN: C:\qbt_tools\vcpkg jobs: ubuntu: @@ -90,6 +88,9 @@ jobs: name: Windows runs-on: windows-2019 + env: + VCPKG_DEST_WIN: C:\qbt_tools\vcpkg + defaults: run: shell: pwsh @@ -183,6 +184,9 @@ jobs: qbt_gui: ["GUI=ON", "GUI=OFF"] fail-fast: false + env: + VCPKG_DEST_MACOS: /Users/runner/qbt_tools/vcpkg + defaults: run: shell: pwsh From 8799321312e346909f11050a0aae0e3027b0b3c1 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Wed, 18 Aug 2021 13:17:53 +0800 Subject: [PATCH 4/4] GHA CI: Use ccache --- .github/workflows/ci.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 213c229c5..ab5b603b4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,6 +24,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1 + - name: Install dependencies run: | sudo apt update @@ -46,6 +49,7 @@ jobs: git clone --branch ${{ matrix.libt_version }} --depth 1 https://github.com/arvidn/libtorrent.git cd libtorrent git submodule update --init --recursive + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" cmake \ -B build \ -G "Ninja" \ @@ -58,6 +62,7 @@ jobs: - name: Build qBittorrent run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" cmake \ -B build \ -G "Ninja" \