From f79bb40e3d1425cba204c4a53d7cac09a18d3ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Sat, 11 Dec 2021 15:21:39 +0100 Subject: [PATCH] scriptcheck.yml: avoid duplicated cppcheck builds (#3611) --- .github/workflows/scriptcheck.yml | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/.github/workflows/scriptcheck.yml b/.github/workflows/scriptcheck.yml index 9bb5dec87..95ec7ae94 100644 --- a/.github/workflows/scriptcheck.yml +++ b/.github/workflows/scriptcheck.yml @@ -8,6 +8,25 @@ jobs: build: runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2 + + - name: Cache Cppcheck + uses: actions/cache@v2 + with: + path: cppcheck + key: ${{ runner.os }}-scriptcheck-cppcheck-${{ github.sha }} + + - name: build cppcheck + run: | + make -j$(nproc) -s + strip -s ./cppcheck + + scriptcheck: + + needs: build + runs-on: ubuntu-20.04 strategy: matrix: python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, '3.10'] @@ -16,6 +35,12 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Restore Cppcheck + uses: actions/cache@v2 + with: + path: cppcheck + key: ${{ runner.os }}-scriptcheck-cppcheck-${{ github.sha }} + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: @@ -83,10 +108,6 @@ jobs: run: | python tools/test_matchcompiler.py - - name: build cppcheck - run: | - make -j$(nproc) -s - - name: test addons run: | python -m pytest addons/test/test-*.py @@ -104,4 +125,3 @@ jobs: run: | make -j$(nproc) run-dmake git diff --exit-code -