Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SKIP SOF-TEST] .github: re-enable rimage workflows #8328

Merged
merged 2 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/rimage.yml
Original file line number Diff line number Diff line change
@@ -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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also have build target for windows?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be great but I have no idea what it would take and I don't have any Windows system right now.

I can help with the Github Actions aspects if you want to try to add it later. For now this PR is merely trying to restore lost functionality.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is recipe for windows:

export OPENSSL_PATH="c:/msys64/var/lib/pacman/local/openssl-1.1.1.n-1"
export CAT_PATH="c:/Program Files/Git/usr/bin"
export NINJA_PATH="c:/Program/ Files/ninja"
export MSYS_INSTALL_DIR="C:/msys64/usr/bin/"
export CMAKE_GENERATOR=Ninja

cmake -B zephyrproject/build-rimage -S zephyrproject/sof/rimage
cmake --build zephyrproject/build-rimage

Some of us are windows users and it would be nice if building would be checked for them...
Maybe open issue with that and leave it for future development?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of us are windows users and it would be nice if building would be checked for them...

Absolutely yes of course. But let's please first restore previous functionality and make sure rimage compiles without warning on ANYTHING :-)

export OPENSSL_PATH="c:/msys64/var/lib/pacman/local/openssl-1.1.1.n-1"
...

I doubt this will all work with Github's Windows image but we can probably re-use some of df1ba22

Maybe open issue with that and leave it for future development?

Depends on how long it takes, it could be quick (famous last words) and not really require a new issue.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt this will all work with Github's Windows image but we can probably re-use some of df1ba22

Wait: this commit already compiles rimage on Windows (without -Werr -Wall). It's a bit lost in the long build logs but it's there. So unless you recommend a different toolchain (which one?) with a different set of warnings maybe then adding Windows here too wouldn't give anything new?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unless it will not change in the future then I don't see any problems.


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/
25 changes: 0 additions & 25 deletions tools/rimage/.github/workflows/build.yml

This file was deleted.

30 changes: 0 additions & 30 deletions tools/rimage/.github/workflows/cppcheck.yml

This file was deleted.

42 changes: 0 additions & 42 deletions tools/rimage/.github/workflows/pull-request.yml

This file was deleted.