Branch: refs/heads/master Author: Enrico Tröger enrico.troeger@uvena.de Committer: GitHub noreply@github.com Date: Sun, 28 Apr 2024 13:58:50 UTC Commit: c2a7261f8fd3eed7a81a1473fcddca4291139571 https://github.com/geany/geany-plugins/commit/c2a7261f8fd3eed7a81a1473fcddca...
Log Message: ----------- Merge pull request #1310 from eht16/ci_use_recent_cppcheck
CI: Download, compile and use latest cppcheck version
Modified Paths: -------------- .github/workflows/build.yml
Modified: .github/workflows/build.yml 40 lines changed, 35 insertions(+), 5 deletions(-) =================================================================== @@ -36,6 +36,7 @@ jobs: env: CC: ccache gcc CXX: ccache g++ + CPPCHECK_CACHE_PATH: ${{ github.workspace }}/.cppcheck_cache GEANY_SOURCE_PATH: ${{ github.workspace }}/.geany_source GEANY_CACHE_PATH: ${{ github.workspace }}/.geany_cache GEANY_INSTALLATION_PATH: ${{ github.workspace }}/.geany_cache/_geany_install @@ -61,17 +62,28 @@ jobs: id: ccache_cache_timestamp run: echo "timestamp=$(date +%Y-%m-%d-%H-%M)" >> $GITHUB_OUTPUT
+ - name: Prepare Cppcheck Cache Key + id: prepare_cppcheck_cache_key + run: echo "cppcheck_tag=$(curl -s https://api.github.com/repos/danmar/cppcheck/releases/latest | jq .tag_name)" >> $GITHUB_OUTPUT + + - name: Prepare Geany Cache Key + id: prepare_geany_cache_key + working-directory: ${{ env.GEANY_SOURCE_PATH }} + run: echo "commit_hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT + - name: Configure ccache uses: actions/cache@v4 with: path: ${{ env.CCACHE_DIR }} key: ${{ runner.os }}-${{ github.job }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }} restore-keys: ${{ runner.os }}-${{ github.job }}-ccache-
- - name: Prepare Geany Cache Key - id: prepare_geany_cache_key - working-directory: ${{ env.GEANY_SOURCE_PATH }} - run: echo "commit_hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT + - name: Configure Cppcheck Cache + id: cppcheck_cache + uses: actions/cache@v4 + with: + path: ${{ env.CPPCHECK_CACHE_PATH }} + key: ${{ runner.os }}-${{ github.job }}-cppcheck-cache-${{ steps.prepare_cppcheck_cache_key.outputs.cppcheck_tag }}
- name: Configure Geany Cache id: geany_cache @@ -102,7 +114,6 @@ jobs: # geany-plugins intltool check - cppcheck # debugger libvte-2.91-dev # geanygendoc @@ -126,9 +137,24 @@ jobs: libxml2-dev # spellcheck libenchant-dev + # cppcheck + cmake + libpcre3-dev EOF grep -v '^[ ]*#' $RUNNER_TEMP/dependencies | xargs sudo apt-get install --assume-yes --no-install-recommends
+ - name: Build cppcheck + if: steps.cppcheck_cache.outputs.cache-hit != 'true' + run: | + mkdir -p ${{ env.CPPCHECK_CACHE_PATH }} + cd ${{ env.CPPCHECK_CACHE_PATH }} + curl -s https://api.github.com/repos/danmar/cppcheck/releases/latest | jq .tarball_url | xargs wget -O cppcheck.tar.gz + tar --strip-components=1 -xf cppcheck.tar.gz + mkdir build + cd build + cmake .. -DHAVE_RULES=ON -DUSE_MATCHCOMPILER=ON + cmake --build . + - name: Build Geany if: steps.geany_cache.outputs.cache-hit != 'true' run: | @@ -142,6 +168,10 @@ jobs:
- name: Configure run: | + # Add previously built cppcheck to $PATH, for this and for succeeding steps + export "PATH=$PATH:${{ env.CPPCHECK_CACHE_PATH }}/build/bin" + echo "PATH=$PATH" >> "$GITHUB_ENV" + NOCONFIGURE=1 ./autogen.sh mkdir _build cd _build
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).