summaryrefslogtreecommitdiff
path: root/.github/workflows
Commit message (Collapse)AuthorAgeFilesLines
* ci: use new buildbot worker images with Debian 11Petr Štetiar2023-05-152-2/+2
| | | | | | | | | Debian 10 LTS support ends on 6/2024, so it makes no sense to use it as a base for 23.05 release, so lets switch to Debian 11 which should've LTS support till 6/2026. References: https://github.com/openwrt/buildbot/commit/f2744543fa8027117b254ba2f4fa4366149d5bfb Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ci: add Coverity Scan scheduled workflowPetr Štetiar2023-04-262-0/+134
| | | | | | | | Coverity Scan is a static code analysis service focused on open source software quality and security, so lets scan various OpenWrt components every Friday for the start. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* CI: check-kernel-patches: upload proposed refreshed patchesChristian Marangi2023-04-221-2/+16
| | | | | | | | | | | Upload proposed refreshed patches if the check fails. This should help devs refresh the patches if they don't have access to a buildroot. Devs should ALWAYS refresh the patches before submitting and merging commits. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: build: disable cache of external toolchain/sdkChristian Marangi2023-03-221-13/+2
| | | | | | | | | | | Our buildbot build a different external toolchain/sdk for each build. This cause the idea of using the tar hash to cache it broken and wrong. This makes the github cache bloated and remove space for ccache cache. Drop cache for external toolchain/sdk as the feature is broken and cause problems to ccache cache. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: kernel: skip subtarget test on non-specific target testChristian Marangi2023-03-221-0/+6
| | | | | | | Reduce testing time by skipping subtarget test on non-specific target test. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: use openwrt official tools container by defaultChristian Marangi2023-01-313-0/+18
| | | | | | | | | | | | | Use openwrt official tools container by default. Fork will use openwrt tools container by default. This can be disabled by setting the option use_openwrt_container to false for the build.yml and check-kernel-patches.yml. The push-containers workflow is disabled on forks. The workflow can be reenabled by commenting the condition in push-containers.yml. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ci: allow custom kernel and target jobs based on labelsPetr Štetiar2023-01-272-0/+82
| | | | | | | | | | | | | | Current job triggers based on matching of changed paths is quite limited, so lets make it possible to additionally trigger manual CI jobs by adding CI specific pull request build labels: * `ci:target:x86:64` label is going to trigger CI target check jobs for x86/64 (sub)target. * `ci:kernel:x86:64` label is going to trigger CI kernel check jobs for x86/64 (sub)target. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* CI: push-containers: limit to one concurrent runChristian Marangi2023-01-241-0/+4
| | | | | | | | | | | We may find in a situation where due the queue an old run finish after the last run, resulting in the containers getting overwritten with an old version. Limit the push-containers workflow to one concurrent run and cancel any run in progress. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: tools: directly copy prebuilt tools in containerChristian Marangi2023-01-235-9/+24
| | | | | | | | | Directly copy prebuilt tools in container instead of creating an archieve and extracting it later in other workflows. Update build workflow to support this new implementation. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: tools: skip including dl dir in prebuilt tools tarChristian Marangi2023-01-231-1/+1
| | | | | | | We can now drop the dl dir in the prebuilt tools tar as package archieve is not a requirement anymore and won't trigger a package recompile. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: tools: add gnu-getopt to macOS CIRosen Penev2023-01-231-0/+1
| | | | | | This used to be implicit. No longer for some reason. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* CI: kernel: enable target testing also for pull request eventChristian Marangi2023-01-201-1/+1
| | | | | | | | | Testing target changes was only set for push events. Enable this also for pull request events to enable testing pr making specific target changes. Fixes: 57a02cbbff5b ("CI: kernel: test each target with additional changes than target/linux") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: remove pcre from macOSRosen Penev2023-01-111-2/+1
| | | | | | | ff02e1561f2073b39814f2d73205a5209471b115 added a host version of pcre for packages that need it. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* CI: remove already installed packagesRosen Penev2023-01-111-11/+1
| | | | | | The GitHub image already includes these. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* CI: remove various tools from macOSRosen Penev2023-01-111-7/+1
| | | | | | | | | zstd, openssl, and quilt are already built in tools/. No need to install them. The rest are unused. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* CI: kernel: test each target with additional changes than target/linuxChristian Marangi2023-01-111-12/+10
| | | | | | | | | | | | Test each target if there are additional changes than target/linux. This is needed to do wide test with changes to kmods, include/kernel and changes to the workflow files. While at it also cleanup and rework the code to drop duplication. Also drop since_last_remote_commit to better track changes. Fixes: 04ada8bc4118 ("CI: kernel: build only changed targets") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: add concurrency limits for pr testChristian Marangi2023-01-114-0/+16
| | | | | | | | | | | Add concurrency limits for pull request test so that on pull request refresh old jobs are cancelled. The group is created based on the github ref + workflow name and the workflow is cancelled only it it comes from a pull_request event. Push events are not affected by this limit. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: kernel: build only changed targetsChristian Marangi2023-01-111-13/+46
| | | | | | | | | | Detect changes in commit and build only changed targets. If a change is related to the generic target, build test each target. The matrix json is split. For target check patch only the first subtarget is selected, for build test each target subtarget is built. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: build: fallback to compile toolchain if external toolchain failChristian Marangi2023-01-111-3/+5
| | | | | | | | | | If for whatever reason external toolchain can't be found or downloaded, fallback to internal toolchain build. This can be useful when new target are introduced and external toolchain are not present in openwrt fileserver. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ci: show_build_failures: fix missing output for configure failuresPetr Štetiar2023-01-091-2/+2
| | | | | | | | | | | We're currently missing log output in cases where `configure` fails which returns 77 as its error code: make[3]: *** [Makefile:118: elfutils-0.188/.configured_889556d2f423f99e091beece9c8d870a] Error 77 So lets adjust the regexps so they can handle multiple digits. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* CI: build: fix external toolchain use with release tag testsChristian Marangi2023-01-041-1/+1
| | | | | | | | | | | | | | When a new tag for a release is created, the just checkout repo from github actions will already have such tag locally created. This will result in git fetch --tags failing with error rejecting the remote tag with (would clobber existing tag). Add -f option to overwrite any local tags and always fetch them from remote. Fixes: e24a1e6f6d7f ("CI: build: add support for external toolchains from stable branch") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: tools: reogranize and split workflowChristian Marangi2022-12-243-128/+163
| | | | | | | | | | | Generilize tools workflow for future usage in shared workflow for tools build. Split tools workflow to tools and push-containers: - tools just execute build test - push-containers build and push prebuilt containers Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: introduce target toolchain testChristian Marangi2022-12-161-0/+64
| | | | | | Add test to build test toolchain for each target. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: build: make kernel build configurableChristian Marangi2022-12-163-0/+6
| | | | | | Make kernel build configurable to permit to introduce toolchain testing. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: improve build naming for shared workflowChristian Marangi2022-12-162-2/+3
| | | | | | | Impove build naming for build shared workflow to better understand what is being test. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: kernel: don't checkout and install feedsChristian Marangi2022-12-071-1/+0
| | | | | | | We don't need to checkout feed and install feeds for kernel tests. This saves up to 2 minutes for each target kernel build test. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: build: skip sdk adapt to external toolchain on cache hitChristian Marangi2022-12-071-1/+1
| | | | | | | | | | | | On cache hit, skip sdk adapt to external toolchain. This is needed because we cache the already extracted sdk and that is already adapted to be used as external toolchain. Rerunning the adap step will result in the test to fail for missing file as the file are already got wrapped to the external toolchain format. Fixes: 42f0ab028e2e ("CI: build: fix use of sdk as toolchain") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: build: fix use of sdk as toolchainChristian Marangi2022-12-061-0/+28
| | | | | | | | | | | | | | | | | | | | | | The toolchain included in a sdk have a different format than an external toolchain tar. Since sdk is a more integrated setup doesn't use and include wrapper bin that use the external toolchain config and use an alternative and more standard way to include all the toolchain headers. External toolchain use wrapper.sh to append the configured include header when each tool is called. Fix the sdk toolchain by reverting their own sdk wrapper scripts and to simulate an external toolchain build copying what is done in the toolchain target makefile. This handle compilation error and warning caused by not using fortify header on building packages. Fixes: 006e52545d14 ("CI: build: add support to fallback to sdk for external toolchain") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: trigger check also on build and check-kernel-patches workflow changeChristian Marangi2022-12-042-0/+6
| | | | | | | | | Since kernel and packages workflow now use a shared build workflow, they also need to react on changes on these shared workflow. Fix this and add these shared workflow to the event paths to check. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: build: fix matching for openwrt release branch for toolchain parsingChristian Marangi2022-12-041-6/+8
| | | | | | | | | | | | | The current match logic doesn't handle test for push events related to stable release (example openwrt-22.03) but only fork with the related prefix (example openwrt-22.03-fixup) Fix wrong matching and while at it also add extra checks to other matching (check if the branch name actually start with the requested prefix) Fixes: e24a1e6f6d7f ("CI: build: add support for external toolchains from stable branch") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: fix matching for openwrt release branch for container selectionChristian Marangi2022-12-042-8/+12
| | | | | | | | | | | | | The current match logic doesn't handle test for push events related to stable release (example openwrt-22.03) but only fork with the related prefix (example openwrt-22.03-fixup) Fix wrong matching and while at it also add extra checks to other matching (check if the branch name actually start with the requested prefix) Fixes: abe8a4824210 ("CI: build: add support for per branch tools container") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: build: add support to fallback to sdk for external toolchainChristian Marangi2022-12-041-8/+33
| | | | | | | Add support to use sdk as external toolchain if the packaged external toolchain tar is not found on openwrt servers for build shared workflow. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: build: add support for external toolchains from stable branchChristian Marangi2022-12-041-2/+27
| | | | | | | | | | | | | Add support to use external toolchains from stable branch if we are testing commit targeting stable openwrt branch in kernel and packages workflow. With pr the target branch is parsed and the right toolchain is used. To use the stable toolchain for local testing the branch needs to have the prefix openwrt-[0-9][0-9].[0-9][0-9]- (example openwrt-21.02-fixup) Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: build: add support for per branch tools containerChristian Marangi2022-12-042-2/+56
| | | | | | | | | | | Add support in build shared workflow for per branch tools container. With pr the target branch is parsed and the right container is used. To use the stable container for local testing the branch needs to have the prefix openwrt-[0-9][0-9].[0-9][0-9]- (example openwrt-21.02-fixup) Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: tools: support per branch tools containerChristian Marangi2022-12-041-1/+26
| | | | | | | | | | | | | | | | | | | Add support to push per branch container tools. For anything not official stick to latest tag that correspond to test run from master. If we are testing something for one of the openwrt stable branch, parse the branch name or the tag and push dedicated tools containers. To use the stable container for local testing the branch needs to have the prefix openwrt-[0-9][0-9].[0-9][0-9] (example openwrt-21.02-fixup) Any branch that will match this pattern openwrt-[0-9][0-9].[0-9][0-9] will refresh the tools container with the matching tag. (example branch openwrt-22.03 -> tools:openwrt-22.03) (example branch openwrt-22.03-test -> tools:openwrt-22.03) Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: Build all boards and testing kernelHauke Mehrtens2022-12-032-0/+29
| | | | | | | | This adds options to build all boards of a selected target and an additional option to build the testing kernel instead of the normal kernel. This can be used by other trigger work flows. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* CI: Allow building with internal toolchainHauke Mehrtens2022-12-031-1/+20
| | | | | | | | | | | This adds an option to build with internal toolchain. This can be used to build targets which are currently not build by the OpenWrt build bots and which needs their own toolchain build for every build. Building the toolchain takes about 30 minutes compared to using the external toolchain which takes some seconds. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* CI: Extract the OpenWrt building to own sub workflowHauke Mehrtens2022-12-034-341/+331
| | | | | | | | Extract the building of OpenWrt into an own workflow which is then triggered by the kernel.yml and packages.yml workflow with different inputs. This allows us to share much of the code of the workflow. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* CI: Simplify if conditionsHauke Mehrtens2022-12-032-2/+2
| | | | | | There is no need to put a ${{ }} around the if conditions. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* CI: labeler: fix wrong label for pr targeting stable branchChristian Marangi2022-12-011-3/+3
| | | | | | | | | The label used for stable branch is in the form of release/[0-9][0-9].[0-9][0-9] Currently we apply the name of the target branch as the label, fix this and correctly use the current label. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: add support to tag pr targeting stable branchChristian Marangi2022-12-011-0/+14
| | | | | | | | Add support to tag pr targeting stable branch matching the simple regex of openwrt-[0-9][0-9].[0-9][0-9]. The tag that will be added will match the pr target branch. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: packages.yml: Fix usage of pre-build toolsHauke Mehrtens2022-11-061-0/+2
| | | | | | | | | | Activate CONFIG_AUTOREMOVE to match the settings used to build the pre-build tools. This has to match the pre-build tools to not rebuild them. This prevents the tools being rebuild in packages.yml. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* CI: packages: Add github CI job to build all packagesHauke Mehrtens2022-10-311-0/+151
| | | | | | | | | | | | | | | | | | | | This will build OpenWrt for MIPS malta BE and x86 64 Bit with all packages and kernel modules activated. It is triggered when something changes in the build system or when a package definition is changed. This task probably needs 90 minutes to execute, but I hope that it will find build problems in pull requests early. This intentionally does not activate the feeds, because building them too would take too long. We only build x86/64 and malta/be to save resources. I would like to detect build problems when a package is changed. We often had build breaks when a package version was increased sometime even in other packages which used it as a dependency. This is based on the .github/workflows/packages.yml workflow. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* CI: kernel: fix deprecation of set-outputChristian Marangi2022-10-211-3/+3
| | | | | | | | | From [0], github deprecated set-output with a better approach of appending variables to $GITHUB_OUTPUT [0] https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ci: kernel: trigger build check on changes in kernel.mk as wellPetr Štetiar2022-10-201-2/+2
| | | | | | So we can QA more parts of kernel build process. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* CI: kernel: check if patch are refreshed for each targetChristian Marangi2022-10-171-0/+71
| | | | | | Enforce refreshed patch for each target with kernel pr tests. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: labeler: target major version of labeler actionChristian Marangi2022-10-121-1/+1
| | | | | | | Target major version of labeler to include minor fixes and use always the latest major version with included fixes. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: bump actions/download,upload-artifact action to v3Christian Marangi2022-10-122-7/+7
| | | | | | | Bump actions/download,upload-artifact action to v3 on every workflow to mute node deprecation warning. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: bump actions/checkout action to v3Christian Marangi2022-10-123-10/+10
| | | | | | | Bump actions/checkout action to v3 on every workflow to mute node deprecation warning. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* CI: kernel: generate ccache cache on kernel pushChristian Marangi2022-10-111-0/+6
| | | | | | | | | | | To actually use ccache cache on kernel test from pr, the kernel workflow has to be run first from a push action. This will permit as a side effect to test merged commits and catch commit that may cause regression in kernel compilation even outside the github system. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>