Otherwise it would use runner default, which might be unpredictable, as
for example GitLab provided public runners are using `ruby:2.5` as
default container image, but true.cz runners are using `debian:10`. So
lets fix it by using Debian 11 image by default.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Fixes following issue:
+ perl ./scripts/dump-target-info.pl architectures
+ read -r LINE
sh: 1: make: not found
As apparently `make` got removed from the upstream base Debian containers.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Fixes following issue:
+ git clone --depth 1 --branch master https://github.com/openwrt/openwrt.git
./generate_targets.sh: line 7: git: command not found
As apparently `git` got removed from the upstream base Debian containers.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
GitLab schedules use `master` as CI_COMMIT_REF_SLUG which causes
unpredictable behaviour when scheduling multiple releases at the same
time. Recently the 19.07 schedule would use 21.02 images for testing,
which succeeded even though it would fail on actual 19.07 containers.
A simple workaround is to attach the $CI_PIPELINE_ID to the test
containers. This issue won't happen to PRs since the CI_COMMIT_REF_SLUG
would then be set to the PRs branch name.
Signed-off-by: Paul Spooren <mail@aparcar.org>
The tag allows the CI to test runtime behaviour not only for snapshot
builds but also for branches like 21.02.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Node fails to compile with:
In file included from /usr/include/c++/8/memory:62,
from ../deps/v8/src/libplatform/default-foreground-task-runner.h:8,
from ../deps/v8/src/libplatform/default-foreground-task-runner.cc:5:
/usr/include/c++/8/bits/stl_algobase.h:59:10: fatal error: bits/c++config.h:
No such file or directory
#include <bits/c++config.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
Add g++-multilib to fix this.
Fixes: https://github.com/openwrt/packages/issues/17074
Signed-off-by: Nick Hainke <vincent@systemli.org>
Packages like `python3-pip` are installed within the buildbot containers
but not inside this base container. Add them to allow the CI compilation
of more packages.
Signed-off-by: Paul Spooren <mail@aparcar.org>
That special case tries to tag a sdk container with `x86/64` where th
`/` is not allowed in a name. Replace it via `tr`.
Signed-off-by: Paul Spooren <mail@aparcar.org>
THe recent changes were a bit short-sighted, not putting into
consideration all labels and different behaviour during testing. This
final commit should fix building for all versions, be it snapshot, a
release snapshot or a regular point release.
Signed-off-by: Paul Spooren <mail@aparcar.org>
GitLab CI seem to lose some variables when creating downstream jobs,
revert the changes back to use the job name for target/arch and apply
the rule to SDK testing.
Remove leading `deploy` from build jobs so they are better readable in
the GitLab UI. Use the leading build name as TYPE variable, so that SDKs
are not labeled on target base and imagebuilder/rootfs is not labeled
based on arch.
For `generate_targets.sh`, instead of exporting BRANCH as env variable,
use functions.sh to set it automatically. Export the `VERSION` one
globally instead of for each downstream job. This works after removing
the `gitlab-ci.yml` variable which would previously overwrite
(strangely) the downstream job settings.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Instead of extracting ARCH/TARGET from the build name explicitly export
the variables to simplify the code. If not, it requires extra handling
for tagging which nulls the "simplification".
Signed-off-by: Paul Spooren <mail@aparcar.org>
* add a functions.sh file containing functions used by all three
container types, ImageBuilder, SDK and rootfs.
* allow SDK branch tags for other branches than `master`. This allows
testing of release SDK versions
* Fix handling of special snapshot versions like `21.02-SNAPSHOT`
Future commits will move `docker-download.sh` and `docker-build.sh` do
`functions.sh`.
Signed-off-by: Paul Spooren <mail@aparcar.org>
This simplifies migration from one image name to another. In this case
we migrate from `openwrtorg` username to `openwrt`, so for a while both
should be available.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Right now, XDP support for OpenWrt is on the rise. New packages and
xdp loaders are written. However, the current github workflows will
fail to crosscompile kernel xdp programms, since they do not support
clang. Clang is the main tool to cross-compile xdp kernel scripts.
Clang only needs the correct endianess of the target system. This can
just be added by checking in the Makefile
ifeq ($(CONFIG_BIG_ENDIAN),y)
BPF_TARGET=bpfeb
else
BPF_TARGET=bpfel
endif
Missing clang support is one of the main reasons I currently not able
to port xdp-tools to OpenWrt. With introduction of 5.10er kernel the
XDP Support is also improved.
Signed-off-by: Nick Hainke <vincent@systemli.org>
By changing the FILE_HOST variable it is possible to switch to different
hosts like the CDN. Overall it makes the script easier to use for other
project which don't offer the full rsync server setup.
Signed-off-by: Paul Spooren <mail@aparcar.org>
This is required for luajit, which is in packages feed.
While it works fine for ARMv8 (tested by using Github Actions: aarch64_cortex-a53) and x84_x64 (tested inside Docker container, it does not work for 32-bits target and because of that we need to install gcc-multilib.
Luajit fails with the following output:
(tested against target: arm_cortex-a9+vfpv3-d16_musl_eabi inside Docker
SDK image)
/usr/include/limits.h:26:10: fatal error: bits/libc-header-start.h: No such file or directory
#include <bits/libc-header-start.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~
And once gcc-multilib is installed, it works.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Using the "latest" tag in `Dockerfile.deploy` recently updated to Docker
20.x which changed the default behaviour of `docker push`. It now
requires `--all-tags` to push all tags, unlike before in 19.x.
Signed-off-by: Paul Spooren <mail@aparcar.org>
On the website https://hub.docker.com/r/openwrtorg/rootfs/tags there are more
tags which we can use, let's mention them in README as well.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
This should provide useful information in the CI logs for bisect
purposes etc. Otherwise its not possible to find out which version was
used, just the CI job timestamp.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
The VERSION variable is still missing in downstream jobs even though the
documentation states it could be added like that. Add the VERSION to the
trigger job and also quote it, to avoid possible YAML parsing issues.
Adding a *depend* to the triggered job makes the CI report the
downstream success state instead of instantly marking the upstream job
as success. Meaning, if a downstream SDK or IB job fails, the upstream
job is marked as failed.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Neither pipeline nor global variables are passed to downstream jobs, add
them individually per job even if it is always the same version.
Signed-off-by: Paul Spooren <mail@aparcar.org>
GitLab calls dynamically created jobs "downstream". They don't seem to
inherit any env variables from the main CI job, therefore add the
VERSION variable specifically.
Signed-off-by: Paul Spooren <mail@aparcar.org>
The generate_targets.sh script requires to run on a specific branch to
only generate jobs for existing targets. The BRANCH variable was however
used for VERSION rather than the branch running on.
This changes the behaviour by automatically selecting the correct branch
and only taking the new VERSION env variable into account.
By doing so new Docker container tags include `snapshot` rather than
`master`, however for compatibility with existing setups the `master`
tag is still added.
Signed-off-by: Paul Spooren <mail@aparcar.org>
For the rootfs containers it can be of interest to run a root container
based on used architecture. Say a CI builds a specific architecture and
a container should run the specific packages. Instead of maintaining the
mapping upstream this should happen via container tags.
Signed-off-by: Paul Spooren <mail@aparcar.org>