Commit Graph

54 Commits

Author SHA1 Message Date
Jeffery To 64380bffa5 CI: Update sdk action, always upload artifacts
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>
(cherry picked from commit aca4330c04)
2024-04-29 16:34:01 +02:00
Jeffery To 9a7637358e CI: Do package run-tests only if target packages were built
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>
(cherry picked from commit 5ce254fd8e)
2024-04-29 16:33:48 +02:00
Jeffery To 5b9bcdafb5 CI: Run "apt-get update" before installing signify-openbsd
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
(cherry picked from commit 955a90944b)
2024-04-29 16:33:44 +02:00
Jeffery To 0c595a8215 CI: Add local feed for CI-built packages
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>
(cherry picked from commit e9bb948402)
2024-04-29 16:33:36 +02:00
Paul Spooren a66846118b ci: set correct arch for rootfs tests
With the commit 01e5cfc "CI: Add target/arch tags (no suffix) for
snapshot images"[1] the os/platform is set for all images, which is usually
different from what the GitHub action runner uses (x86). The Docker
deamon still tries to fetch the x86 version and fails.

This commit explicitly sets the fitting arch.

[1]: 01e5cfccd7

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit d359fa04ed)
2024-04-29 16:31:38 +02:00
Christian Marangi a13b1a64de ci: update github actions to v3
Update checkout and upload-artifact action to v3 to mute nodejs
deprecation warning.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 52570d4242)
2023-02-03 20:11:55 +01:00
Jeffery To 7abfee2e8d ci: Use openwrt/gh-action-sdk@v5
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>
(cherry picked from commit 37f9b77b01)
2023-02-03 20:11:55 +01:00
Alois Klink 4abdc2f333
github-ci: error on any shell errors
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>
(cherry picked from commit 18d3c529fa)
2022-12-08 10:56:11 +01:00
Jeffery To 0cd609b676 ci: Look for changed packages in the PR branch only
Fixes https://github.com/openwrt/packages/issues/15267.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
(cherry picked from commit 6b2294ac37)
2022-05-16 11:20:14 +02:00
Petr Štetiar 4ac25793f9 ci: use openwrt/gh-action-sdk@v4
In order to use feeds from GH mirror for GH actions, thus saving a lot
of resources being wasted.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit b1355832a0)
2022-03-24 14:06:49 +01:00
Paul Spooren f535d77090 CI: fix runtime testing for non master branch
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>
2022-01-14 14:45:19 +01:00
Peter van Dijk b5132de5cf CI: do not crash during PKG-INFO generation if there are no packages
Signed-off-by: Peter van Dijk <peter.van.dijk@powerdns.com>
2021-11-09 07:41:16 -10:00
Peter van Dijk a40c1b3e44 CI: add PKG-INFO metadata file
Signed-off-by: Peter van Dijk <peter.van.dijk@powerdns.com>
2021-11-08 18:59:36 -10:00
Peter van Dijk bbf983721c artifacts: use git commit sha in name
Signed-off-by: Peter van Dijk <peter.van.dijk@powerdns.com>
2021-11-05 07:16:50 -10:00
Kevin David a5de3d0455 github-ci: also build mipsel_24kc / mt7621
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.
2021-10-09 14:45:59 -10:00
Paul Spooren 291d1f255a CI: update SDK action to v3
No also check mirror hashes and badly formated init files

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-10-09 10:11:11 -10:00
Michael Heimpold 05a3011b00 github-ci: fix small typo
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2021-09-28 07:42:38 +02:00
Paul Spooren a2bda4cc69 CI: revert adding of *depending* packages
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>
2021-03-25 23:28:52 -10:00
Paul Spooren c0d0c64f6c CI: test build dependent packages
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>
2021-03-23 07:23:53 -10:00
Paul Spooren 81f7461e66 CI: reformat extra long line
Better readability on split screens.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-03-23 07:23:53 -10:00
Paul Spooren 3701000051 CI: define matrix individually and add targets
This allows more specific definition per test, like on which target
packages should be compiled.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-03-23 07:23:53 -10:00
Paul Spooren b164a3aa32 CI: use new `openwrt` Docker username
We now own `openwrtorg` and `openwrt`, where the latter replaces the
former. Slowly migrate over.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-03-17 22:20:16 -10:00
Paul Spooren 13c1f2bcda CI: checkout HEAD commit rather than merge commit
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>
2021-03-04 23:42:32 -10:00
Paul Spooren 1b46af0e59 CI: migrate formal checks from CircleCI to GitHub
Run the formal checks like SoB message via the GitHub CI.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-03-04 18:21:01 -10:00
Paul Spooren a592e95dc1 CI: fix handling of release branches
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>
2021-03-01 11:41:18 -10:00
Ilya Lipnitskiy a2b08b5cbf CI: enhance package detection logic
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-23 20:17:30 -10:00
Rosen Penev 1f25c9c25f CI: switch back to ARCHS
Upstream wants to remove ARC700. That and currently, ARC700 is not
compiling with glibc.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-30 14:38:43 -10:00
Paul Spooren ce1de4c0f1 CI: use SDK depending on destination branch
Not only use snapshot SDKs for master test but whatever destination
branch is used.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-12-28 15:45:03 -10:00
Paul Spooren bd3320e8de CI: test aarch64_cortex-a53 instead of _generic
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>
2020-12-15 08:25:31 -10:00
Rosen Penev edadb7726a
github: test i386_pentium-mmx instead of pentium4
It seems the former causes more compilation failures due to not having
SSE.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-10 16:08:23 -08:00
Aaron Goodman 318dbc74e9 Revert "CI: add super-linter for pull requests"
Initial motivation for this commit was 'Just merge and see how people like it?'
https://github.com/openwrt/packages/pull/13358#issuecomment-692309158

It seems that many contributors don't like it.
https://github.com/openwrt/packages/issues/13395

So this should be reverted until issues with the linter can be
resolved.

This reverts commit 2b5de22202.
2020-11-06 07:25:42 -10:00
Josef Schlehofer b1b11e155e CI: fix CVE-2020-15228
More details:
https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2020-10-16 08:15:53 -10:00
Josef Schlehofer afca2f2a71 CI: fix grammar typo when test is succesful
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2020-10-16 08:15:53 -10:00
Michal Hrusecky 7951e29297 CI: Export few helpful variables for CI tests
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>
2020-10-10 11:16:13 -10:00
Michal Hrusecky 61c4202766 CI: Add helper functions
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>
2020-10-10 11:16:13 -10:00
Rosen Penev ba147d0d40 actions: remove arm_cortex-a9_neon
This is the second ARM NEON target that is tested. It's unlikely that
one will fail and the other succeed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-10-09 18:50:57 -10:00
Paul Spooren 014e02ab07 CI: use PKG_SOURCE instead of PKG_NAME
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>
2020-10-01 23:39:04 -10:00
Rosen Penev 527b3e2119 CI: get rid of the arc_archs buildbot
Both ARC platforms are not useful. One is enough for uClibc-ng.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-09-29 22:54:20 -10:00
Rosen Penev 836b4e1c73
github-ci: add --force-removal-of-dependent-packages
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>
2020-09-19 00:16:45 -07:00
Paul Spooren 4f4207be0c CI: pass only VERSION to test.sh
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>
2020-09-17 22:19:49 -10:00
Paul Spooren b36bb173b3 CI: run also on test.sh changes
The CI only tests packages if a Makefile changed, e.g. containing a
version or release bump. This covers package related files as at least
the package release must change whenever a file was touched.

The `test.sh` file is a runtime test used to verify working packages
within OpenWrt containers. This file can independently change and will
never be included in the package ipk files, therefore trigger the CI on
its changes as well.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-09-17 09:05:16 -10:00
Paul Spooren da111fd095 CI: add runtime tests for packages
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>
2020-09-16 10:40:16 -10:00
Paul Spooren 2b5de22202 CI: add super-linter for pull requests
This commit adds a linter which checks most common filetypes, including
Shell and Lua. Ideally this improves the quality of especially `init`
scripts written in Shell.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-09-14 11:05:33 -10:00
Paul Spooren 43f4ebb532 CI: add compile test for arc_archs
A package recently failed building exclusively for this architecture,
therefore test it as well.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-09-12 14:16:11 -10:00
Paul Spooren 69c91a23a5 CI: fix compilation of all packages
By using `feeds install -d y` the CI tries to install e.g. `libcxx`
which fails, unrelated to the tested packages. Now follow the approach
of the current CircleCI implementation.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-09-08 11:02:27 -10:00
Paul Spooren b4c70ed7dd CI: fix artifact folder and add more test SDKs
The CI adds the `packages.git` repository to the `feeds.conf`, which
makes the repository redundant. Once called `packages` including the
upstream status, once `packages_ci` (previously `action`) including the
PRs changes.

This commit changes the binary artifact folder from `packages` to
`packages_ci`, as the SDK choses packages from the modified PR branch
over the `packages` branch.

Also add additional targets to test, as each target only takes a few
minutes to test: aarch64_cortex-a53, arm_cortex-a15_neon-vfpv4 and
i386_pentium4.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-09-05 13:21:04 -10:00
Paul Spooren b787aa9c81 CI: use GitHub action for Pull Requests
Test all GitHub pull requests for multiple architectures and store build
logs and created packages. This is the first commit of a series of
patches to simplify the life of maintainers.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-09-04 15:36:07 -10:00
Daniel Engberg 31179ef2a4 repo: Add more information to the issue template
Rephrase the template a bit and add information about
older releases and forks.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
2019-04-07 20:18:55 +00:00
Yousong Zhou f552f738e2 github: adapt templates
Remove refs to LEDE and use "OpenWrt" instead of "OpenWRT"

Remove instructions on self-checking pull request content for the
following considerations

 - The checks are now enforced by travis autocheck scripts
 - Github now prompts users to refer to the contributing guide on
   submitting new issue and pull request

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-01-27 11:24:43 +08:00
Yousong Zhou 0be823dfc9 Add an issue template
So that maintainers can receive at least one notification at the issue
creation time ;)

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2016-08-25 20:32:50 +08:00