From 5747b3e3dd10a4efbd73a783aa4d2c76cc3a6e9f 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 --- .../workflows/rimage.yml | 38 ++++++++++++++++--- tools/rimage/.github/workflows/build.yml | 25 ------------ 2 files changed, 33 insertions(+), 30 deletions(-) rename tools/rimage/.github/workflows/cppcheck.yml => .github/workflows/rimage.yml (50%) delete mode 100644 tools/rimage/.github/workflows/build.yml diff --git a/tools/rimage/.github/workflows/cppcheck.yml b/.github/workflows/rimage.yml similarity index 50% rename from tools/rimage/.github/workflows/cppcheck.yml rename to .github/workflows/rimage.yml index 211e4004692c..569af20a45ba 100644 --- a/tools/rimage/.github/workflows/cppcheck.yml +++ b/.github/workflows/rimage.yml @@ -9,17 +9,45 @@ # github.com also has a powerful web editor that can be used without # committing. -name: cppcheck +name: rimage # yamllint disable-line rule:truthy -on: [pull_request, push] +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/ -G Ninja + - run: cmake --build build/ + + + # cppcheck cppcheck: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 - with: {fetch-depth: 50, submodules: recursive} + - 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 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/