Skip to content

Conversation

@jefferyto
Copy link
Member

This is all CI changes cherry picked from the packages feed (except openwrt/packages@7b72652 and the revert openwrt/packages@489cffa), plus one change to set the fallback build packages to packages in this feed (instead of packages from the packages feed).

aparcar and others added 26 commits July 19, 2023 02:42
No also check mirror hashes and badly formated init files

Signed-off-by: Paul Spooren <[email protected]>
Signed-off-by: Kevin David <[email protected]>

This seems like a fairly popular configuration and is at least handy for me for temporary testing.
Signed-off-by: Peter van Dijk <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Update checkout and upload-artifact action to v3 to mute nodejs
deprecation warning.

Signed-off-by: Christian Marangi <[email protected]>
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 <[email protected]>
[ move check to separate workflow to handle ci limitation ]
Signed-off-by: Christian Marangi <[email protected]>
If it doesn't exists, don't confuse the contributors.

Signed-off-by: Paul Spooren <[email protected]>
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 <[email protected]>
Fixes: openwrt/packages#19953
Signed-off-by: Alois Klink <[email protected]>
836b4e1c734f9705bfd8db0da0c04214c2647932 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]: openwrt/openwrt#12241

Fixes: 836b4e1c734f ("github-ci: add --force-removal-of-dependent-packages")
Signed-off-by: Jeffery To <[email protected]>
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 <[email protected]>
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 <[email protected]>
[remove changes to cache-domains package]
Signed-off-by: Jeffery To <[email protected]>
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 <[email protected]>
Add concurrency rules to skip redundant build to skip extra build test
on force push on pull request.

Signed-off-by: Christian Marangi <[email protected]>
- armvirt target has been renamed to armsr (Arm SystemReady) [1].
- armsr-armv8 has been switched to aarch64_generic architecture [2].

1. openwrt/openwrt@40b02a2
2. openwrt/openwrt@e0f06dd

Signed-off-by: Tianling Shen <[email protected]>
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 <[email protected]>
@jefferyto
Copy link
Member Author

I believe mesa is failing to compile because mako is installed for host Python (in $(STAGING_DIR_HOSTPKG)) but meson is configured to use build host Python (in $(STAGING_DIR_HOST)), so it does not see / cannot access mako. I'm not really sure how to fix this.

jefferyto referenced this pull request in openwrt/openwrt Jul 19, 2023
Override python to use the one in host instead of hostpkg. There's no
need to use the latter.

Signed-off-by: Rosen Penev <[email protected]>
@esaaprillia
Copy link

I believe mesa is failing to compile because mako is installed for host Python (in $(STAGING_DIR_HOSTPKG)) but meson is configured to use build host Python (in $(STAGING_DIR_HOST)), so it does not see / cannot access mako. I'm not really sure how to fix this.

maybe this is the cause

https://github.com/openwrt/openwrt/blob/076f945dfbc8afa6ced7c5f67d95ab27383dd1e4/include/meson.mk#L68

https://github.com/openwrt/openwrt/blob/076f945dfbc8afa6ced7c5f67d95ab27383dd1e4/include/meson.mk#L87

@esaaprillia
Copy link

esaaprillia commented Apr 13, 2024

@jefferyto

Mesa can be built by adding this in the mesa Makefile

define Meson/CreateNativeFile
	$(STAGING_DIR_HOST)/bin/sed \
		-e "s|@CC@|$(foreach BIN,$(HOSTCC),'$(BIN)',)|" \
		-e "s|@CXX@|$(foreach BIN,$(HOSTCXX),'$(BIN)',)|" \
		-e "s|@PKGCONFIG@|$(PKG_CONFIG)|" \
		-e "s|@CMAKE@|$(STAGING_DIR_HOST)/bin/cmake|" \
		-e "s|@PYTHON@|$(STAGING_DIR_HOSTPKG)/bin/python3|" \
		-e "s|@CFLAGS@|$(foreach FLAG,$(HOST_CFLAGS) $(HOST_CPPFLAGS),'$(FLAG)',)|" \
		-e "s|@CXXFLAGS@|$(foreach FLAG,$(HOST_CXXFLAGS) $(HOST_CPPFLAGS),'$(FLAG)',)|" \
		-e "s|@LDFLAGS@|$(foreach FLAG,$(HOST_LDFLAGS),'$(FLAG)',)|" \
		-e "s|@PREFIX@|$(HOST_BUILD_PREFIX)|" \
		< $(MESON_DIR)/openwrt-native.txt.in \
		> $(1)
endef

define Meson/CreateCrossFile
	$(STAGING_DIR_HOST)/bin/sed \
		-e "s|@CC@|$(foreach BIN,$(TARGET_CC),'$(BIN)',)|" \
		-e "s|@CXX@|$(foreach BIN,$(TARGET_CXX),'$(BIN)',)|" \
		-e "s|@LD@|$(foreach FLAG,$(TARGET_LINKER),'$(FLAG)',)|" \
		-e "s|@AR@|$(TARGET_AR)|" \
		-e "s|@STRIP@|$(TARGET_CROSS)strip|" \
		-e "s|@NM@|$(TARGET_NM)|" \
		-e "s|@PKGCONFIG@|$(PKG_CONFIG)|" \
		-e "s|@CMAKE@|$(STAGING_DIR_HOST)/bin/cmake|" \
		-e "s|@PYTHON@|$(STAGING_DIR_HOSTPKG)/bin/python3|" \
		-e "s|@CFLAGS@|$(foreach FLAG,$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \
		-e "s|@CXXFLAGS@|$(foreach FLAG,$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \
		-e "s|@LDFLAGS@|$(foreach FLAG,$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS),'$(FLAG)',)|" \
		-e "s|@ARCH@|$(MESON_ARCH)|" \
		-e "s|@CPU@|$(MESON_CPU)|" \
		-e "s|@ENDIAN@|$(if $(CONFIG_BIG_ENDIAN),big,little)|" \
		< $(MESON_DIR)/openwrt-cross.txt.in \
		> $(1)
endef

@Ansuel
Copy link
Member

Ansuel commented Nov 12, 2024

@jefferyto Closing this. I migrated to a centralized place where the actions are shared. Thanks a lot for the work tho.

@Ansuel Ansuel closed this Nov 12, 2024
BKPepe referenced this pull request Dec 31, 2025
The mesa package currently can't compile as Cython dependency fails to
compile with Python >= 3.13 version.

To fix this, bump all the host pip requirements tools to latest stable
version.

Signed-off-by: Christian Marangi <[email protected]>
@jefferyto jefferyto deleted the ci-update branch January 26, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.