Commit Graph

21 Commits

Author SHA1 Message Date
Christian Marangi 38cc09165f
CI: migrate each workflow to use reusable workflow from dedicated repo
Migrate each workflow to use reusable workflow from dedicated repo to
skip pushing CI related commits to openwrt and better track versioning
of CI workflow.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-06-25 02:08:56 +02:00
Christian Marangi f5a5ce8822
CI: ignore master branch for push events
Due to problem with migrating from master to main as the default branch
and downstream project still requiring the master branch to be present,
we currently have for push events double CI runs, one for main and one
for master. To solve this ignore any push event to the master branch for
every workflow that react on push events.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-25 13:57:17 +02:00
Petr Štetiar 71ca2a3154 ci: tools: run the job on changes in include directory as well
In order to prevent regressions like with #12617.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-05-23 17:49:57 +02:00
Rosen Penev 183bad6641
CI: tools: add gnu-getopt to macOS CI
This used to be implicit. No longer for some reason.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-23 15:48:07 +01:00
Rosen Penev 0a35d3f992
CI: remove pcre from macOS
ff02e1561f added a host version of pcre
for packages that need it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-11 22:55:43 +01:00
Rosen Penev dd357409f6
CI: remove already installed packages
The GitHub image already includes these.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-11 22:55:42 +01:00
Rosen Penev 11627f3ac1
CI: remove various tools from macOS
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>
2023-01-11 22:55:42 +01:00
Christian Marangi cb679adf18
CI: add concurrency limits for pr test
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>
2023-01-11 14:31:57 +01:00
Christian Marangi af44174187
CI: tools: reogranize and split workflow
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>
2022-12-24 12:09:23 +01:00
Christian Marangi 75550771ae
CI: tools: support per branch tools container
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>
2022-12-04 16:03:22 +01:00
Christian Marangi 77b24012db
CI: bump actions/download,upload-artifact action to v3
Bump actions/download,upload-artifact action to v3 on every workflow
to mute node deprecation warning.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-12 16:48:46 +02:00
Christian Marangi 87c69d73bb
CI: bump actions/checkout action to v3
Bump actions/checkout action to v3 on every workflow to mute node
deprecation warning.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-12 16:47:46 +02:00
Christian Marangi 2781e3839e
CI: tools: compile tools with ccache support for tools container
Enable ccache support for tools container, useful to speedup other
workflow even more.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-06 15:58:15 +02:00
Edward Chow c27b439564
CI: Add workaround for github uppercase usernames
The workflow defined in tools.yml and kernel.yml used to fail on
forked repositories of contributers whose github username contains
uppercase letters.

A workaround mentioned in
https://github.com/orgs/community/discussions/27086 and
https://stackoverflow.com/questions/70326569/ is applied.

Signed-off-by: Edward Chow <equu@openmail.cc>
2022-10-03 20:22:53 +02:00
Paul Spooren 25b65f548d
CI: create Docker container containing compiled tools
Currently each Kernel compilation takes about 30 minutes of which 20
minutes are used to compile our tools. While the toolchain is downloaded
and instantly ready the tools are missing.

This commit starts uploading a Docker container including compiled tools
which are ready to use. It is automatically updated whenever any tools
are changed.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Co-Developed-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-09-30 22:26:54 +02:00
Paul Spooren 3b23227d43
CI: use buildbot container for building
Instead of using a fresh Linux installation which is setup every time
use the Buildbot container which is used for our own Buildbot
infrastructure, too.
While at it also tidy up the workflow to make it more consistent with
other workflow.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Co-Developed-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-09-30 17:20:24 +02:00
Petr Štetiar f4ca4187cd ci: show build failures directly in job log output
Instead of waiting for complete workflow finish, then downloading the
artifacts, unpacking them and inspecting them, lets try to make the
build failure immediately visible in the log output:

  ====== Make errors from logs/target/linux/compile.txt ======
  * Legacy (non-UHI/non-FIT) Boards
  *
  Support MIPS SEAD-3 boards (LEGACY_BOARD_SEAD3) [N/y/?] (NEW)
  Error in reading or end of file.

  make[6]: *** [scripts/kconfig/Makefile:77: syncconfig] Error 1
  make[5]: *** [Makefile:616: syncconfig] Error 2
  make[4]: *** [Makefile:736: include/config/auto.conf.cmd] Error 2
  make[3]: *** [Makefile:24: build_dir/target-mipsel-openwrt-linux-musl_musl/linux-ramips_mt7620/linux-5.15.62/.modules] Error 2
  make[2]: *** [Makefile:11: compile] Error 2
  time: target/linux/compile#30.09#11.30#37.92

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-09-20 12:14:54 +02:00
Alex Low 7152599407
build: harden GitHub workflow permissions
Grant pull-requests write permission to the labeler workflow and
read-only to everything else.

Signed-off-by: Alex Low <aleksandrosansan@gmail.com>
[ wrap to 80 columns and fix wrong author as requested by author itself ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-09-19 15:02:27 +02:00
Paul Spooren 80f79beb95 CI: usability improvements for tools
* Always store build logs
* Store .config as an artifact
* Rename job to `tools-{ os }` for log archive without spaces
* Run CI job on changes to the CI file itself

Signed-off-by: Paul Spooren <mail@aparcar.org>
2022-04-05 01:27:30 +02:00
Paul Spooren a5eeac8033 CI: move logs/ to GITHUB_WORKSPACE
Artifacts can only be uploaded from inside the GITHUB_WORKSPACE. While
the Linux CI jobs run inside that per default, a special case-sensitive
mount outside the GITHUB_WORKSPACE is used for macOS builds.

To make log artifacts work for both macOS and Linux, move logs/ folder
to GITHUB_WORKSPACE on failures.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2022-03-09 14:24:49 +01:00
Paul Spooren fb830fd894 CI: build changes in tools/ on ubuntu/macos
This commits adds GitHub CI to check that all tools compile on both
Ubuntu and macOS. Since running in parrallel this should also detect
badly set depdendencies within tools/Makefile.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2022-02-25 12:49:03 +01:00