diff --git a/.github/workflows/rimage.yml b/.github/workflows/rimage.yml new file mode 100644 index 000000000000..f9a24020e6d0 --- /dev/null +++ b/.github/workflows/rimage.yml @@ -0,0 +1,59 @@ +--- +# 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: + CMAKE_C_FLAGS: -Werror -Wall -Wmissing-prototypes -Wimplicit-fallthrough=3 + -Wpointer-arith + + steps: + - uses: actions/checkout@v4 + with: {submodules: recursive, fetch-depth: 0, filter: 'tree:0'} + + - name: install tools + run: sudo apt update && sudo apt install -y ninja-build + + - name: build + run: cmake -B build-rimage/ -S tools/rimage/ + - run: cmake --build build-rimage/ + + + # 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 .