From 0e41691b00dd4a3294b7784c21fc4afa6dbd5ece Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Mon, 16 Oct 2023 13:40:28 -0700 Subject: [PATCH 1/2] Delete inherited rimage/.github/ workflows yamllint and checkpatch We already have these checks in sof.git so they don't need to be migrated. Signed-off-by: Marc Herbert --- .../rimage/.github/workflows/pull-request.yml | 42 ------------------- 1 file changed, 42 deletions(-) delete mode 100644 tools/rimage/.github/workflows/pull-request.yml diff --git a/tools/rimage/.github/workflows/pull-request.yml b/tools/rimage/.github/workflows/pull-request.yml deleted file mode 100644 index c0400490b276..000000000000 --- a/tools/rimage/.github/workflows/pull-request.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# SPDX-License-Identifier: BSD-3-Clause -# Tools that can save round-trips to github and a lot of time: -# -# yamllint -f parsable this.yml -# pip3 install ruamel.yaml.cmd -# yaml merge-expand this.yml exp.yml && diff -w -u this.yml exp.yml -# -# github.com also has a powerful web editor that can be used without -# committing. - -name: codestyle - -# yamllint disable-line rule:truthy -on: [pull_request] - -jobs: - yamllint: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 50 - submodules: recursive - - - name: run yamllint - run: yamllint .github/workflows/*.yml - checkpatch: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: ${{ env.PR_FETCH_DEPTH }} - - - name: install codespell - run: sudo apt update && sudo apt install -y codespell - - - name: checkpatch.pl PR review - uses: webispy/checkpatch-action@v9 - env: - CHECKPATCH_COMMAND: ./scripts/checkpatch.pl From fe2bc02f4cc39e0c8dbf0e08dcabe70e2be845c9 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Mon, 16 Oct 2023 13:59:30 -0700 Subject: [PATCH 2/2] .github: re-enable rimage workflows Migrate rimage build and cppcheck workflows from sof/tools/rimage/.github/workflows/ (where they're ignored) to sof/.github/workflows/ Signed-off-by: Marc Herbert --- .github/workflows/rimage.yml | 60 +++++++++++++++++++++ tools/rimage/.github/workflows/build.yml | 25 --------- tools/rimage/.github/workflows/cppcheck.yml | 30 ----------- 3 files changed, 60 insertions(+), 55 deletions(-) create mode 100644 .github/workflows/rimage.yml delete mode 100644 tools/rimage/.github/workflows/build.yml delete mode 100644 tools/rimage/.github/workflows/cppcheck.yml diff --git a/.github/workflows/rimage.yml b/.github/workflows/rimage.yml new file mode 100644 index 000000000000..1806fab5f0cf --- /dev/null +++ b/.github/workflows/rimage.yml @@ -0,0 +1,60 @@ +--- +# SPDX-License-Identifier: BSD-3-Clause +# Tools that can save round-trips to github and a lot of time: +# +# yamllint -f parsable this.yml +# pip3 install ruamel.yaml.cmd +# yaml merge-expand this.yml exp.yml && diff -w -u this.yml exp.yml +# +# github.com also has a powerful web editor that can be used without +# committing. + +name: rimage + +# yamllint disable-line rule:truthy +on: + workflow_dispatch: + pull_request: + paths: + - tools/rimage/** + push: + paths: + - tools/rimage/** + +jobs: + + # Basic build test + build: + runs-on: ubuntu-22.04 + env: + # FIXME: add -Wpointer-arith + _CFLGS: -Werror -Wall -Wmissing-prototypes + -Wimplicit-fallthrough=3 + + + steps: + - uses: actions/checkout@v4 + with: {submodules: recursive, fetch-depth: 0, filter: 'tree:0'} + + - run: cmake -B build-rimage/ -S tools/rimage/ -DCMAKE_C_FLAGS="${_CFLGS}" + + # VERBOSE because CFLAGS (and -Wpointer-arith) used to be ignored + # for years and no one noticed + - run: cmake --build build-rimage/ -- -j$(nproc) VERBOSE=1 + + + # cppcheck + cppcheck: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + with: {submodules: recursive, fetch-depth: 0, filter: 'tree:0'} + + - name: apt install cppcheck + run: sudo apt update && sudo apt-get -y install cppcheck + + # TODO enable more types of checks as they are fixed + - name: run cppcheck + run: cppcheck --platform=unix32 --force --max-configs=1024 + --inconclusive --inline-suppr + --error-exitcode=1 tools/rimage/ diff --git a/tools/rimage/.github/workflows/build.yml b/tools/rimage/.github/workflows/build.yml deleted file mode 100644 index 2102fae4f8f0..000000000000 --- a/tools/rimage/.github/workflows/build.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -# Basic build test - -name: build - -# yamllint disable-line rule:truthy -on: [pull_request, push, workflow_dispatch] - -env: - CMAKE_C_FLAGS: "-Werror -Wall -Wmissing-prototypes\ - -Wimplicit-fallthrough=3 -Wpointer-arith" - -jobs: - build-test: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - with: {fetch-depth: 50, submodules: recursive} - - - name: install tools - run: sudo apt update && sudo apt install -y ninja-build - - - name: build - run: cmake -B build/ -G Ninja - - run: cmake --build build/ diff --git a/tools/rimage/.github/workflows/cppcheck.yml b/tools/rimage/.github/workflows/cppcheck.yml deleted file mode 100644 index 211e4004692c..000000000000 --- a/tools/rimage/.github/workflows/cppcheck.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -# SPDX-License-Identifier: BSD-3-Clause -# Tools that can save round-trips to github and a lot of time: -# -# yamllint -f parsable this.yml -# pip3 install ruamel.yaml.cmd -# yaml merge-expand this.yml exp.yml && diff -w -u this.yml exp.yml -# -# github.com also has a powerful web editor that can be used without -# committing. - -name: cppcheck - -# yamllint disable-line rule:truthy -on: [pull_request, push] - -jobs: - cppcheck: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: {fetch-depth: 50, submodules: recursive} - - - name: apt install cppcheck - run: sudo apt update && sudo apt-get -y install cppcheck - - # TODO enable more types of checks as they are fixed - - name: run cppcheck - run: cppcheck --platform=unix32 --force --max-configs=1024 - --inconclusive --quiet --inline-suppr .