Commit 18d3c529fa caused CI_HELPER to be
set to "''" (two single quotes), leading to an error when test.sh tries
to source $CI_HELPER.
CI_HELPER is not set anywhere else and not passed into the container
environment, so there is no need to test if it has a value.
This fixes the value of CI_HELPER.
Fixes: 18d3c529fa ("github-ci: error on any shell errors")
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
The updated version of gh-action-sdk will return compiled packages and
build logs for both build success and build errors.
This ensures these artifacts are always uploaded. This also sets the V
environment variable to enable verbose build output.
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Currently, the run-test code tries to find the package source directory
based on the directory name only. This fails for the Go compiler package
because there is more than one directory named "golang".
This uses the full path listed in the "Source:" line of the control file
to find the package source directory.
This also:
* Checks for the test script earlier, to avoid installing and removing
ipk files when there is no test script to be run
* Makes PKG_VERSION parsing more lenient, as the package may not have a
PKG_RELEASE, e.g. attendedsysupgrade-common
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
- armvirt target has been renamed to armsr (Arm SystemReady) [1].
- armsr-armv8 has been switched to aarch64_generic architecture [2].
1. 40b02a2301
2. e0f06ddc23
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Add concurrency rules to skip redundant build to skip extra build test
on force push on pull request.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Currently, the package run-test phase will fail for PRs that only
add/update host-only packages, as no target packages (*.ipk) are built.
This checks if any target packages are built before attempting the
run-tests.
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Some packages variants have conflicting dependencies with the
base packages and the CI test will fail to install before anything
can be done by the packages to setup the system for install.
This change adds a pre-test.sh that runs before the install so things
like the default libustream variant can be swapped out as shown in the
updated cache-domains.
Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
To test each package, the CI-built target package (ipk) file is
installed, but currently the target package's dependencies are installed
from the standard opkg feeds.
There are cases when the CI-built target packages should be
installed/tested together:
* If a pull request contains several new packages that depend on each
other, the test step will fail as the new dependencies cannot be found
in the current packages feed.
* If a pull request upgrades a source package that builds several target
packages that depend on each other, the test step may fail due to the
version/ABI mismatch between a newer target package and the older
dependencies installed from the packages feed.
This sets up a local feed for the CI-built packages so that dependencies
are also installed from the same set of packages.
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
836b4e1c73 added
--force-removal-of-dependent-packages but it does not do what the commit
message says it does.
When package A depends on package B (package B is a dependency of
package A; package A is a dependent of package B), trying to remove
package B while package A is installed will result in an error. Adding
--force-removal-of-dependent-packages in this case will cause the
removal of package B and package A (package B's dependent).
But in the case of the CI testing step, it is package A that is being
installed and removed. Removing package A with
--force-removal-of-dependent-packages will not cause package B (package
A's dependency) to be removed.
This adds --autoremove to actually remove the package's dependencies.
This also ignores any errors returned by opkg remove as --autoremove can
sometimes falsely return an error[1].
[1]: https://github.com/openwrt/openwrt/issues/12241
Fixes: 836b4e1c73 ("github-ci: add --force-removal-of-dependent-packages")
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Autorelease causes some issues like heavy bandwidth usage as well as
non-deterministic package releases whenever someone doesn't use the full
git log.
With this comment all modified packages are checked and if they use
the autorelease feature, kindly comment to the user to change that.
Signed-off-by: Paul Spooren <paul.spooren@rhebo.com>
[ move check to separate workflow to handle ci limitation ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
The previous build errors with v5 have been fixed. This version builds
packages as a normal user instead of as root.
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
In order to use feeds from GH mirror for GH actions, thus saving a lot
of resources being wasted. While at it fix whitespace issue.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
The runtime testing always ran on master branch aka snapshots since the
branch wasn't passed over to the container execution!
Signed-off-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Kevin David <kevin.p.david@gmail.com>
This seems like a fairly popular configuration and is at least handy for me for temporary testing.
While the idea may make sense the current implementation is faulty.
Problem is that OpenWrt uses the folder name of packages within the
build system while `opkg` spits out the actual packages names.
An example, compiling the packages of folder `vim` (`make
package/vim/compile`) creates a package called `xxd`, where `make
package/xxd/compile` would fail.
The current implementation uses `opkg` to figure out dependent packages,
but the resulting names do not match the above mentioned folders.
Revert this for now until we come up with a better implementation to
avoid false positive CI failures.
Signed-off-by: Paul Spooren <mail@aparcar.org>
By using OPKGs `whatdepends` all packages dependent on a library are
printed. Use that feature to obtain packages which a version change may
break and build them as well.
Change "default" packages to contain a lib on which other packages
depend, instead of compiling `tmux` compile `attendedsysupgrade-common`
on which other packages depend.
Ignore any LuCI packages which only contains translations.
Signed-off-by: Paul Spooren <mail@aparcar.org>
GitHub CI actions/checkout uses a merge commit which isn't compatible
with our formality checks. Instead checkout the pull request HEAD.
Signed-off-by: Paul Spooren <mail@aparcar.org>
The "changed package" logic triggers all packages changed since
`origin/master` while for releases branches all changes since e.g.
`origin/openwrt-21.02` should be considered.
First figure out the active branch, then find changed packages.
Signed-off-by: Paul Spooren <mail@aparcar.org>
The aarch64_cortex-a53 architecture is used by more targets and should
therefore be tested rather than the relatively rare _generic one.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Export PKG_NAME and PKG_VERSION to make test scripts better readable
and also export a path to the helper script providing colorful output.
Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
Add a shell script that can produce colorfull output to help to identify
problems during CI runs.
Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>