diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ada163346..ab5b603b4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,30 +8,25 @@ on: [pull_request, push] 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: 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 + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1 + - name: Install dependencies run: | sudo apt update @@ -51,9 +46,10 @@ 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 + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" cmake \ -B build \ -G "Ninja" \ @@ -66,6 +62,7 @@ jobs: - name: Build qBittorrent run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" cmake \ -B build \ -G "Ninja" \ @@ -82,7 +79,7 @@ jobs: - name: Upload build artifacts uses: actions/upload-artifact@v2 with: - name: qBittorrent-CI_${{ matrix.os }}-x64_${{ matrix.qbt_gui }} + name: qBittorrent-CI_ubuntu-20.04-x64_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }} path: | build/compile_commands.json build/install_manifest.txt @@ -96,6 +93,9 @@ jobs: name: Windows runs-on: windows-2019 + env: + VCPKG_DEST_WIN: C:\qbt_tools\vcpkg + defaults: run: shell: pwsh @@ -189,6 +189,9 @@ jobs: qbt_gui: ["GUI=ON", "GUI=OFF"] fail-fast: false + env: + VCPKG_DEST_MACOS: /Users/runner/qbt_tools/vcpkg + defaults: run: shell: pwsh