Skip to content

Commit

Permalink
CI: fix zephyr build for v3.7 and later
Browse files Browse the repository at this point in the history
The current CI uses the latest from main for zephyr build tests.
This has been broken sometime after v3.6 and before v3.7
In Zephyr v3.7 and later, use of GNU style constructors requires a kconfig
value to be defined.  This same kconfig value will cause an error in v3.6
or earlier.

The test framework intentionally uses GNU constructors for the base level
of its framework and version.c uses this to register its test.

The test/system/zephyr/ level override the default META_ADD_TEST() macro
and creates unique functions that main.c then calls explicitly in function
metal_test_add_functions().

This right now the only constructor used if for version.c but it still
intentionally used.

Since we use the latest for CI, define the value so CI will complete.

Signed-off-by: Bill Mills <bill.mills@linaro.org>
  • Loading branch information
wmamills committed Aug 17, 2024
1 parent 5c36d6b commit c7df2df
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/actions/build_ci/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,11 @@ build_zephyr(){
cd ./zephyr &&
source zephyr-env.sh &&
cd ../.. &&
# The prj.conf is mandatory for cmake execution, create a void file.
touch prj.conf &&
# The prj.conf is mandatory for cmake execution, create a file.
# The base level of the test infrastucture intentially uses constructors so

Check warning on line 95 in .github/actions/build_ci/entrypoint.sh

View workflow job for this annotation

GitHub Actions / compliance review

TYPO_SPELLING

.github/actions/build_ci/entrypoint.sh:95 'infrastucture' may be misspelled - perhaps 'infrastructure'?
# we must define this config item in v3.7.0 or later
# HOWEVER, this define will cause cmake to fail for v3.6 or earlier
echo "CONFIG_STATIC_INIT_GNU=y" >touch prj.conf &&
# Add dummy fields in the VERSION file to fix compatibility with Zephyr
# version.cmake file
echo "PATCHLEVEL = 0" >>VERSION &&
Expand Down

0 comments on commit c7df2df

Please sign in to comment.