aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/entrypoint.sh
Commit message (Collapse)AuthorAge
* CI: Fix CI_HELPERJeffery To2023-12-01
| | | | | | | | | | | | | | | Commit 18d3c529fa4ab8dafcf6c147cf3cb55792d8ca10 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: 18d3c529fa4a ("github-ci: error on any shell errors") Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* CI: Fix finding test scriptJeffery To2023-07-17
| | | | | | | | | | | | | | | | | | | 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>
* cache-domains: added pre-test.sh CI stepGerard Ryan2023-05-01
| | | | | | | | | | | | 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>
* CI: Add local feed for CI-built packagesJeffery To2023-04-19
| | | | | | | | | | | | | | | | | | | | | | | 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>
* CI: Add --autoremove, ignore removal errorsJeffery To2023-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | 836b4e1c734f9705bfd8db0da0c04214c2647932 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: 836b4e1c734f ("github-ci: add --force-removal-of-dependent-packages") Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* github-ci: error on any shell errorsAlois Klink2022-12-08
| | | | | | | | | | | | Enable `errexit` and `nounset` [POSIX shell options][1] in `.github/workflows/entrypoint.sh` so that the script fails if any command within the script fails. [1]: https://pubs.opengroup.org/onlinepubs/9699919799//utilities/V3_chap02.html#set Reported-by: Marius Dinu <m95d+git@psihoexpert.ro> Fixes: https://github.com/openwrt/packages/issues/19953 Signed-off-by: Alois Klink <alois@aloisklink.com>
* github-ci: fix small typoMichael Heimpold2021-09-28
| | | | Signed-off-by: Michael Heimpold <mhei@heimpold.de>
* CI: fix grammar typo when test is succesfulJosef Schlehofer2020-10-16
| | | | Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
* CI: Export few helpful variables for CI testsMichal Hrusecky2020-10-10
| | | | | | | 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>
* CI: use PKG_SOURCE instead of PKG_NAMEPaul Spooren2020-10-01
| | | | | | | | | | | | | | The PKG_NAME is the installable name of a package while PKG_SOURCE is the folder containig both `Makefile` and possibliy `test.sh` This approach previously worked for packages where both NAME and SOURCE are the same, e.g. `vim`, however fore more complex packages like `mariadb` (SOURCE) the NAMES are partly *mariadb-server-plugin-handlersocket*, which is no existing folder. With this commit the `PKG_SOURCE` is used to find the `test.sh` script. Signed-off-by: Paul Spooren <mail@aparcar.org>
* github-ci: add --force-removal-of-dependent-packagesRosen Penev2020-09-19
| | | | | | | | Without this option, a package gets installed with its dependencies but those do not get removed, causing issues later on with other packages. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* CI: pass only VERSION to test.shPaul Spooren2020-09-17
| | | | | | | | Currently the passed VERSION includes the release, which is usually not part of the compiled binary. Removing it simplifies the `grep` command to check for correct package output during runtime tests. Signed-off-by: Paul Spooren <mail@aparcar.org>
* CI: add runtime tests for packagesPaul Spooren2020-09-16
Additional to manual runtime tests this CI addition runs a custom test script per package. Ideally this lowers the errors of package bumps, something which is time consuming when done manually for multiple architectures. This CI uses the official OpenWrt containers and tries to install and run compiled packages. The run depends on the content of `test.sh`, which is an `ash` script. It's called with the *packge name* and *package version* as arguments. This allows different behaviour if a single package generates multiple IPK files. The version is usable for the most trivial runtime check, e.g. `tmux -V | grep "$2"`. The current approach uses the qus project[1] which contains multiple QEMU binaries to run various architectures. [1]: https://github.com/dbhi/qus Signed-off-by: Paul Spooren <mail@aparcar.org>