From d928b57829eb6401f673fe0e272d28b5a5492ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Tue, 1 Feb 2022 17:26:52 +0100 Subject: [PATCH] cache remaining Qt installations in CI (#3782) --- .github/workflows/clang-tidy.yml | 20 ++++++++++++++------ .github/workflows/selfcheck.yml | 17 ++++++++++++++--- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml index e21bb9a43..e0df49728 100644 --- a/.github/workflows/clang-tidy.yml +++ b/.github/workflows/clang-tidy.yml @@ -12,6 +12,9 @@ jobs: container: image: "ubuntu:21.10" + env: + QT_VERSION: 5.15.2 + steps: - uses: actions/checkout@v2 @@ -19,20 +22,25 @@ jobs: run: | apt-get update apt-get install -y cmake g++ make - apt-get install -y z3 libz3-dev + apt-get install -y libz3-dev apt-get install -y libpcre3-dev apt-get install -y libffi7 # work around missing dependency for Qt install step - apt-get install -y software-properties-common - add-apt-repository universe - apt-get update apt-get install -y clang-tidy-13 - - name: Install Qt + - name: Cache Qt ${{ env.QT_VERSION }} + id: cache-qt + uses: actions/cache@v1 # not v2! + with: + path: ../Qt + key: Linux-QtCache-${{ env.QT_VERSION }}-qtcharts + + - name: Install Qt ${{ env.QT_VERSION }} uses: jurplel/install-qt-action@v2 with: install-deps: 'nosudo' - version: '5.15.2' + version: ${{ env.QT_VERSION }} modules: 'qtcharts' + cached: ${{ steps.cache-qt.outputs.cache-hit }} - name: Prepare CMake run: | diff --git a/.github/workflows/selfcheck.yml b/.github/workflows/selfcheck.yml index 2ed4a2602..a3a2c1569 100644 --- a/.github/workflows/selfcheck.yml +++ b/.github/workflows/selfcheck.yml @@ -9,19 +9,30 @@ jobs: runs-on: ubuntu-20.04 + env: + QT_VERSION: 5.15.2 + steps: - uses: actions/checkout@v2 - name: Install missing software run: | sudo apt-get update - sudo apt-get install z3 libz3-dev + sudo apt-get install libz3-dev - - name: Install Qt + - name: Cache Qt ${{ env.QT_VERSION }} + id: cache-qt + uses: actions/cache@v1 # not v2! + with: + path: ../Qt + key: Linux-QtCache-${{ env.QT_VERSION }}-qtcharts + + - name: Install Qt ${{ env.QT_VERSION }} uses: jurplel/install-qt-action@v2 with: - version: '5.15.2' + version: ${{ env.QT_VERSION }} modules: 'qtcharts' + cached: ${{ steps.cache-qt.outputs.cache-hit }} # TODO: cache this - perform same build as for the other self check - name: Self check (build)