Commit Graph

72 Commits

Author SHA1 Message Date
Paul Spooren d359fa04ed 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>
2024-03-15 11:36:28 +01:00
Tianling Shen 7542362bd6 ci: bump checkout/upload-artifact to v4
Fix Node.js 16 deprecation warning.
Ref: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-01-29 09:40:40 +01:00
Paul Spooren 7e6cd98ad4
ci: no longer require real name
This goes in accordance with the Linux Kernel:

> using a known identity (sorry, no anonymous contributions.)

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=HEAD#n442

Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-01-10 17:22:54 +01:00
Yegor Yefremov 13553e6641 CI: allow PRs for CONTRIBUTING.md and README.md files
Also grep for CONTRIBUTING.md and README.md in the subject.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2023-12-01 15:13:42 -08:00
Jeffery To 562f5df67f CI: Fix CI_HELPER
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>
2023-12-01 11:23:37 -08:00
Jeffery To aca4330c04 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>
2023-11-08 09:30:59 +01:00
Jeffery To 5422bd6218
CI: Fix finding test script
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>
2023-07-17 20:17:44 +08:00
Tianling Shen bf88b371c5 CI: update build architectures
- 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>
2023-06-16 12:30:32 +08:00
Jeffery To 3b59118c4f CI: Add build test for riscv64_riscv64
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2023-06-02 18:52:45 +02:00
Jeffery To 1651f7f16d CI: Sort build architectures in alphabetical order
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2023-06-02 18:52:45 +02:00
Christian Marangi d26e21ef40
CI: add concurrency rules to skip redundant build
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>
2023-05-26 14:55:52 +02:00
Jeffery To 5ce254fd8e 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>
2023-05-10 11:52:51 +02:00
Jeffery To 955a90944b CI: Run "apt-get update" before installing signify-openbsd
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2023-05-10 11:52:51 +02:00
Van Waholtz 20a803aa03 CI: Enable runtime_test for mips_24kc
Signed-off-by: Van Waholtz <brvphoenix@gmail.com>
2023-05-01 15:11:44 +03:00
Gerard Ryan 7dd26ee760 cache-domains: added pre-test.sh CI step
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>
2023-05-01 13:38:17 +03:00
Jeffery To e9bb948402
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>
2023-04-19 13:43:24 +08:00
Jeffery To f0d5e470e1
CI: Add --autoremove, ignore removal errors
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>
2023-03-22 11:48:22 +08:00
Tianling Shen 29041e8f8e CI: update build architectures
Removed arc_archs - archs38 was marked as source-only [1].
Renamed powerpc_8540 to powerpc_8548 [2].

1. https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=c01641bcc7236d2e2de3ea65444b0cf2898df351
2. https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=2cad88b99fdae9766de84e6c1cb56f111eb53748

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-03-13 11:03:53 +01:00
Alois Klink 18d3c529fa 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>
2022-12-08 10:55:52 +01:00
Paul Spooren 75ff4ba358 ci: only comment AUTORELEASE deprecation if exists
If it doesn't exists, don't confuse the contributors.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2022-12-02 19:59:44 +01:00
Paul Spooren 61d59fd542
CI: deprecate $(AUTORELEASE) via comments
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>
2022-11-27 15:16:20 +01:00
Christian Marangi 52570d4242 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>
2022-10-25 22:13:24 +02:00
Jeffery To 37f9b77b01 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>
2022-05-31 09:47:35 +02:00
Rosen Penev 489cffadd2 Revert "ci: Use openwrt/gh-action-sdk@v5"
This reverts commit 7b7265293f.
2022-05-18 06:51:33 -07:00
Jeffery To 7b7265293f ci: Use openwrt/gh-action-sdk@v5
This version builds packages as a normal user instead of as root.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2022-05-18 11:42:18 +02:00
Jeffery To 6b2294ac37 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>
2022-05-14 21:33:21 -07:00
Sebastian Kemper ffdc2b09ea github: fix typo in issue template
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2022-05-07 11:42:09 +02:00
Petr Štetiar b1355832a0 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. While at it fix whitespace issue.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-03-24 09:17:30 +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