Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Build OpenWrt packages in main pipeline #3967

Merged
merged 8 commits into from
Sep 12, 2021

Conversation

robaerd
Copy link
Member

@robaerd robaerd commented Jul 24, 2021

Part of #3898

Basics

These points need to be fulfilled for every PR:

  • Short descriptions of your changes are in the release notes
    (added as entry in doc/news/_preparation_next_release.md which
    contains _(my name)_)
    Please always add something to the release notes.
  • Details of what you changed are in commit messages
    (first line should have module: short statement syntax)
  • References to issues, e.g. close #X, are in the commit messages.
  • The buildservers are happy. If not, fix in this order:
    • add a line in doc/news/_preparation_next_release.md
    • reformat the code with scripts/dev/reformat-all
    • make all unit tests pass
    • fix all memleaks
  • The PR is rebased with current master.

If you have any troubles fulfilling these criteria, please write
about the trouble as comment in the PR. We will help you.
But we cannot accept PRs that do not fulfill the basics.

Checklist

Check relevant points but please do not remove entries.
For docu fixes, spell checking, and similar none of these points below
need to be checked.

  • I added unit tests for my code
  • I fully described what my PR does in the documentation
    (not in the PR description)
  • I fixed all affected documentation
  • I added code comments, logging, and assertions as appropriate (see Coding Guidelines)
  • I updated all meta data (e.g. README.md of plugins and METADATA.ini)
  • I mentioned every code not directly written by me in THIRD-PARTY-LICENSES

Review

Reviewers will usually check the following:

Labels

If you are already Elektra developer:

  • Add the "work in progress" label if you do not want the PR to be reviewed yet.
  • Add the "ready to merge" label if the basics are fulfilled and you also
    say that everything is ready to be merged.

@robaerd
Copy link
Member Author

robaerd commented Jul 24, 2021

Somehow overwriting the makefile variables of the openwrt elektra makefile was not possible, making it necessary to create a script that uses sed to remove the configuration for releases and use the current state of the master branch for the package builds.
More precisely, overwriting the variables with e.g. make PKG_SOURCE_PROTO=git <MORE VARIABLES> package/feeds/packages/elektra/ was possible, but then some make processes terminated due to too many arguments. I could not figure out the exact cause of this, but IMO the approach with the script would be even better, as unsetting a value is not possible with command line args (only setting it to an empty value).

Copy link
Contributor

@markus2330 markus2330 left a comment

Choose a reason for hiding this comment

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

Very good job! I also like the script. Thank you for adding this 💖

withDockerEnv(image, [DockerOpts.MOUNT_MIRROR]) {
checkout scm
sh "./scripts/release/prepare-openwrt-makefile.sh /home/build/openwrt/package/feeds/packages/elektra/Makefile"
sh "cd /home/build/openwrt && make package/feeds/packages/elektra/compile V=sc"
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this maybe create too many logs? What about first try as fast as possible without verbosity, if it fails without concurrency and full verbosity, e.g.:

Suggested change
sh "cd /home/build/openwrt && make package/feeds/packages/elektra/compile V=sc"
sh "cd /home/build/openwrt && make package/feeds/packages/elektra/compile || make -j1 V=sc package/feeds/packages/elektra/compile"

see also #3904

@robaerd
Copy link
Member Author

robaerd commented Aug 20, 2021

I wasn't successful in creating cross-compiled packages for ARM from an x86_64 architecture.
I believe the issue is that the other packages Elektra depends on, do not get cross-compiled in the desired architecture.

Is cross compiling from a x86_64 architecture even the right approach for such packages? We wouldn't be able to test packages for different architectures anyway.

The community maintained packages (https://github.com/openwrt/packages) also do not cross-compile packages, instead they use GitHub Actions to build and test these packages (including Elektra) on different architectures.

Maybe we should also build+test the Elektra openwrt package on GitHub Actions with the necessary architectures instead of Jenkins?

@markus2330
Copy link
Contributor

As discussed: let us merge this for x86 only.

@mpranj
Copy link
Member

mpranj commented Aug 27, 2021

Nothing regarding OpenWRT is built in the Jenkins pipeline from what I see? 👀

Is this expected or is this due to the security measures on Jenkins?

@robaerd robaerd changed the title Build OpenWrt packages in release pipeline Build OpenWrt packages in main pipeline Aug 28, 2021
@robaerd robaerd force-pushed the openwrt-build branch 2 times, most recently from 0f5a6cd to bfac71a Compare September 11, 2021 10:01
@robaerd
Copy link
Member Author

robaerd commented Sep 11, 2021

Nothing regarding OpenWRT is built in the Jenkins pipeline from what I see?

I moved the OpenWRT build from the release pipeline into the main pipeline. The OpenWRT packages should now be built on every master commit.

@markus2330 markus2330 merged commit 069dbb8 into ElektraInitiative:master Sep 12, 2021
@markus2330
Copy link
Contributor

Thank you, great work!

@mpranj mpranj added this to the 0.9.8 milestone Sep 26, 2021
@markus2330 markus2330 mentioned this pull request Oct 1, 2021
1 task
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants