From 437acecd0667ad5981ba033b61ecef88feb2d9b4 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Mon, 16 Oct 2023 13:59:30 -0700 Subject: [PATCH] .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 | 58 +++++++++++++++++++++ tools/rimage/.github/workflows/build.yml | 25 --------- tools/rimage/.github/workflows/cppcheck.yml | 30 ----------- 3 files changed, 58 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..c8eae215ad0a --- /dev/null +++ b/.github/workflows/rimage.yml @@ -0,0 +1,58 @@ +--- +# 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: {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: {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 --quiet --inline-suppr 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 .