From 9a3d560d9e2e917d41043b50a842eafb964493f8 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sun, 3 Oct 2021 16:09:09 +0800 Subject: [PATCH] GHA CI: use larger cache for compiling Previous default was 500MB and it couldn't fit all compile results in it, enlarge it to 2GB. Note that 2GB isn't the actual size stored on the server, it will be compressed again by zstd and will be a lot smaller. --- .github/workflows/ci_ubuntu.yaml | 18 +++++------------- .github/workflows/coverity-scan.yml | 17 +++-------------- 2 files changed, 8 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yaml b/.github/workflows/ci_ubuntu.yaml index d00c976ac..d6856b317 100644 --- a/.github/workflows/ci_ubuntu.yaml +++ b/.github/workflows/ci_ubuntu.yaml @@ -18,24 +18,18 @@ 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 zlib1g-dev - # sudo apt install libqt5svg5-dev qtbase5-dev qttools5-dev # the Qt version in the standard repositories is too old... + libboost-dev libssl-dev qt515base qt515svg qt515tools zlib1g-dev - name: Setup ccache uses: Chocobo1/setup-ccache-action@v1 with: update_packager_index: false - - # 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 - - name: Install Qt - run: | - sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-focal - sudo apt install \ - qt515base qt515svg qt515tools + ccache_options: | + max_size=2G - name: Install libtorrent run: | @@ -63,9 +57,7 @@ jobs: -DVERBOSE_CONFIGURE=ON \ --graphviz=build/target_graph.dot cmake --build build - - - name: Install qBittorrent - run: sudo cmake --install build + sudo cmake --install build - name: Upload build artifacts uses: actions/upload-artifact@v2 diff --git a/.github/workflows/coverity-scan.yml b/.github/workflows/coverity-scan.yml index 015ab7b4a..5a58b994b 100644 --- a/.github/workflows/coverity-scan.yml +++ b/.github/workflows/coverity-scan.yml @@ -15,19 +15,11 @@ 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 zlib1g-dev - # 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 - # to speed up the process, only the required components are installed rather than the full qt515-meta-full metapackage - - name: Install Qt - run: | - sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-focal - sudo apt install \ - qt515base qt515svg qt515tools + libboost-dev libssl-dev qt515base qt515svg qt515tools zlib1g-dev - name: Install libtorrent run: | @@ -52,7 +44,7 @@ jobs: mkdir coverity_tool tar xzf coverity_tool.tgz --strip 1 -C coverity_tool - - name: Configure qBittorrent + - name: Build qBittorrent run: | cmake \ -B build \ @@ -60,9 +52,6 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -DGUI=ON \ -DVERBOSE_CONFIGURE=ON - - - name: Build qBittorrent - run: | export PATH="$(pwd)/coverity_tool/bin:$PATH" cov-build --dir cov-int cmake --build build