From 140b2d8872a15c427c0fcebf6c84ac8d7eaa7220 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 7 Nov 2023 18:20:57 +0100 Subject: [PATCH] try and factor-out build deps and cppcheck run --- .github/workflows/build.yml | 93 +++++++++++++++++++++++-------------- 1 file changed, 57 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eb7deda02..99c4ad998 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,6 +18,46 @@ env: CFLAGS: -g -O2 -Werror=pointer-arith -Werror=implicit-function-declaration JOBS: 2 DEBUG: 1 + LIBRARY_DEPS: | + libatk1.0-dev + libcairo2-dev + libdconf-dev + libgirepository1.0-dev + libglib2.0-dev + libgtk-3-dev + libgtk-layer-shell-dev + libice-dev + libmate-desktop-dev + libmate-menu-dev + libmateweather-dev + libpango1.0-dev + libsm-dev + libsoup2.4-dev + libwnck-3-dev + libx11-dev + libxrandr-dev + libgirepository1.0-dev + BUILD_DEPS: | + ccache + autoconf-archive + autopoint + cppcheck + gir1.2-freedesktop + git + gobject-introspection + gtk-doc-tools + lsb-release + make + mate-common + meson + yelp-tools + iso-codes + gobject-introspection + ${{env.LIBRARY_DEPS}} + SCAN_BUILD_DEPS: | + clang + clang-tools + ${{env.BUILD_DEPS}} jobs: build: @@ -56,41 +96,7 @@ jobs: run: | sudo apt-get update -qq sudo apt-get install --assume-yes --no-install-recommends \ - ccache \ - autoconf-archive \ - autopoint \ - clang \ - clang-tools \ - cppcheck \ - gir1.2-freedesktop \ - git \ - gobject-introspection \ - gtk-doc-tools \ - libatk1.0-dev \ - libcairo2-dev \ - libdconf-dev \ - libgirepository1.0-dev \ - libglib2.0-dev \ - libgtk-3-dev \ - libgtk-layer-shell-dev \ - libice-dev \ - libmate-desktop-dev \ - libmate-menu-dev \ - libmateweather-dev \ - libpango1.0-dev \ - libsm-dev \ - libsoup2.4-dev \ - libwnck-3-dev \ - libx11-dev \ - libxrandr-dev \ - lsb-release \ - make \ - mate-common \ - meson \ - yelp-tools \ - iso-codes \ - gobject-introspection \ - libgirepository1.0-dev + ${BUILD_DEPS} - name: ccache uses: hendrikmuhs/ccache-action@v1.2 @@ -122,5 +128,20 @@ jobs: - name: Run distcheck run: make -C mate-panel -j ${{ env.JOBS }} distcheck + cppcheck: + name: Run cppcheck + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + submodules: true + + - name: Install dependencies + run: | + sudo apt-get update -qq + sudo apt-get install --assume-yes --no-install-recommends \ + ${LIBRARY_DEPS} + - name: cppcheck - run: cppcheck --enable=warning,style,performance,portability,information,missingInclude -i'gtk-layer-shell-build' mate-panel + run: cppcheck --enable=warning,style,performance,portability,information,missingInclude -i'gtk-layer-shell-build' .