...
 
Commits (14)
    https://gitcode.net/mirror/openwrt/routing/-/commit/0348b1b2e5b51398475496737a1aabf1dad7af5c ci: only comment AUTORELEASE deprecation if exists 2023-06-26T11:47:57+02:00 Paul Spooren mail@aparcar.org If it doesn't exists, don't confuse the contributors. Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:mail@aparcar.org" title="mail@aparcar.org"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg5" style="text-decoration: none">N</a><a href="mailto:mail@aparcar.org" title="mail@aparcar.org">Paul Spooren</a> &lt;<a href="mailto:mail@aparcar.org" title="mail@aparcar.org">mail@aparcar.org</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/b3b01af314ec675b0b2ee0497a7b9c90d2e9e631" data-original="b3b01af314ec675b0b2ee0497a7b9c90d2e9e631" data-link="false" data-link-reference="false" data-project="28801" data-commit="b3b01af314ec675b0b2ee0497a7b9c90d2e9e631" data-reference-type="commit" data-container="body" data-placement="top" title="ci: only comment AUTORELEASE deprecation if exists" class="gfm gfm-commit has-tooltip">b3b01af3</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/fa213a15a70279248b86079d93b7f2f1834a543a CI: update build architectures 2023-06-26T11:48:02+02:00 Tianling Shen cnsztl@immortalwrt.org Removed arc_archs - archs38 was marked as source-only [1]. Renamed powerpc_8540 to powerpc_8548 [2]. 1. <a href="https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=c01641bcc7236d2e2de3ea65444b0cf2898df351" rel="nofollow noreferrer noopener" target="_blank">https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=c01641bcc7236d2e2de3ea65444b0cf2898df351</a> 2. <a href="https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=2cad88b99fdae9766de84e6c1cb56f111eb53748" rel="nofollow noreferrer noopener" target="_blank">https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=2cad88b99fdae9766de84e6c1cb56f111eb53748</a>Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:cnsztl@immortalwrt.org" title="cnsztl@immortalwrt.org"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg4" style="text-decoration: none">N</a><a href="mailto:cnsztl@immortalwrt.org" title="cnsztl@immortalwrt.org">Tianling Shen</a> &lt;<a href="mailto:cnsztl@immortalwrt.org" title="cnsztl@immortalwrt.org">cnsztl@immortalwrt.org</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/7928f7d3990c7bae097224d90c28590a45405686" data-original="7928f7d3990c7bae097224d90c28590a45405686" data-link="false" data-link-reference="false" data-project="28801" data-commit="7928f7d3990c7bae097224d90c28590a45405686" data-reference-type="commit" data-container="body" data-placement="top" title="CI: update build architectures" class="gfm gfm-commit has-tooltip">7928f7d3</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/9934454586faa749af79f45a9cab1807ff963128 CI: Add --autoremove, ignore removal errors 2023-06-26T11:48:02+02:00 Jeffery To jeffery.to@gmail.com 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]: <a href="https://github.com/openwrt/openwrt/issues/12241" rel="nofollow noreferrer noopener" target="_blank">https://github.com/openwrt/openwrt/issues/12241</a> Fixes: 836b4e1c734f ("github-ci: add --force-removal-of-dependent-packages") Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg6" style="text-decoration: none">N</a><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">Jeffery To</a> &lt;<a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">jeffery.to@gmail.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/53a53b8ee38d79083ff59e656798948f9b0a7e68" data-original="53a53b8ee38d79083ff59e656798948f9b0a7e68" data-link="false" data-link-reference="false" data-project="28801" data-commit="53a53b8ee38d79083ff59e656798948f9b0a7e68" data-reference-type="commit" data-container="body" data-placement="top" title="CI: Add --autoremove, ignore removal errors" class="gfm gfm-commit has-tooltip">53a53b8e</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/2ae05f5841af1b5117ad3327033df38c0db5e510 CI: Add local feed for CI-built packages 2023-06-26T11:48:02+02:00 Jeffery To jeffery.to@gmail.com 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: <span data-trailer="Signed-off-by:"><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg5" style="text-decoration: none">N</a><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">Jeffery To</a> &lt;<a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">jeffery.to@gmail.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/f818fe716ea126dd8240c9600f92e5b412d59060" data-original="f818fe716ea126dd8240c9600f92e5b412d59060" data-link="false" data-link-reference="false" data-project="28801" data-commit="f818fe716ea126dd8240c9600f92e5b412d59060" data-reference-type="commit" data-container="body" data-placement="top" title="CI: Add local feed for CI-built packages" class="gfm gfm-commit has-tooltip">f818fe71</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/c960329d0e5d2cc43c5a8082c919c8e3bf5b61c9 cache-domains: added pre-test.sh CI step 2023-06-26T11:48:02+02:00 Gerard Ryan G.M0N3Y.2503@gmail.com 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: <span data-trailer="Signed-off-by:"><a href="mailto:G.M0N3Y.2503@gmail.com" title="G.M0N3Y.2503@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg2" style="text-decoration: none">N</a><a href="mailto:G.M0N3Y.2503@gmail.com" title="G.M0N3Y.2503@gmail.com">Gerard Ryan</a> &lt;<a href="mailto:G.M0N3Y.2503@gmail.com" title="G.M0N3Y.2503@gmail.com">G.M0N3Y.2503@gmail.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/61997c86b01c83320a2cbb1b490941a8af741253" data-original="61997c86b01c83320a2cbb1b490941a8af741253" data-link="false" data-link-reference="false" data-project="28801" data-commit="61997c86b01c83320a2cbb1b490941a8af741253" data-reference-type="commit" data-container="body" data-placement="top" title="cache-domains: added pre-test.sh CI step" class="gfm gfm-commit has-tooltip">61997c86</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/68987a112f07d6e64b45966806febe2a4dfa6d50 CI: Enable runtime_test for mips_24kc 2023-06-26T11:48:02+02:00 Van Waholtz brvphoenix@gmail.com Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:brvphoenix@gmail.com" title="brvphoenix@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg3" style="text-decoration: none">N</a><a href="mailto:brvphoenix@gmail.com" title="brvphoenix@gmail.com">Van Waholtz</a> &lt;<a href="mailto:brvphoenix@gmail.com" title="brvphoenix@gmail.com">brvphoenix@gmail.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/28d204148a7cad8f1ee903bf6af4dae234b28119" data-original="28d204148a7cad8f1ee903bf6af4dae234b28119" data-link="false" data-link-reference="false" data-project="28801" data-commit="28d204148a7cad8f1ee903bf6af4dae234b28119" data-reference-type="commit" data-container="body" data-placement="top" title="CI: Enable runtime_test for mips_24kc" class="gfm gfm-commit has-tooltip">28d20414</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/6ed96f5be10da3476b5641353cfb661be6061a2d CI: Run "apt-get update" before installing signify-openbsd 2023-06-26T11:48:02+02:00 Jeffery To jeffery.to@gmail.com Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg3" style="text-decoration: none">N</a><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">Jeffery To</a> &lt;<a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">jeffery.to@gmail.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/89cf0d561977c028b45e5ab6db1b34dab27b9a11" data-original="89cf0d561977c028b45e5ab6db1b34dab27b9a11" data-link="false" data-link-reference="false" data-project="28801" data-commit="89cf0d561977c028b45e5ab6db1b34dab27b9a11" data-reference-type="commit" data-container="body" data-placement="top" title='CI: Run "apt-get update" before installing signify-openbsd' class="gfm gfm-commit has-tooltip">89cf0d56</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/30b11070ade2c7d0273b50f85253c7a662da0371 CI: Do package run-tests only if target packages were built 2023-06-26T11:48:02+02:00 Jeffery To jeffery.to@gmail.com 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: <span data-trailer="Signed-off-by:"><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg1" style="text-decoration: none">N</a><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">Jeffery To</a> &lt;<a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">jeffery.to@gmail.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/299ee2b1cfd20a7c9d31e8024b4333e8da035af3" data-original="299ee2b1cfd20a7c9d31e8024b4333e8da035af3" data-link="false" data-link-reference="false" data-project="28801" data-commit="299ee2b1cfd20a7c9d31e8024b4333e8da035af3" data-reference-type="commit" data-container="body" data-placement="top" title="CI: Do package run-tests only if target packages were built" class="gfm gfm-commit has-tooltip">299ee2b1</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/ad46bbb4a663721e89061d99f41ed7228101dc8f CI: add concurrency rules to skip redundant build 2023-06-26T11:48:02+02:00 Christian Marangi ansuelsmth@gmail.com Add concurrency rules to skip redundant build to skip extra build test on force push on pull request. Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:ansuelsmth@gmail.com" title="ansuelsmth@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg1" style="text-decoration: none">N</a><a href="mailto:ansuelsmth@gmail.com" title="ansuelsmth@gmail.com">Christian Marangi</a> &lt;<a href="mailto:ansuelsmth@gmail.com" title="ansuelsmth@gmail.com">ansuelsmth@gmail.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/5aa683be13c9b1f4a2bdb09ec0481b7cd546dd77" data-original="5aa683be13c9b1f4a2bdb09ec0481b7cd546dd77" data-link="false" data-link-reference="false" data-project="28801" data-commit="5aa683be13c9b1f4a2bdb09ec0481b7cd546dd77" data-reference-type="commit" data-container="body" data-placement="top" title="CI: add concurrency rules to skip redundant build" class="gfm gfm-commit has-tooltip">5aa683be</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/0de5679741a84a60a1ef44e02ebb1a27ecc730a9 CI: Sort build architectures in alphabetical order 2023-06-26T11:48:02+02:00 Jeffery To jeffery.to@gmail.com Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg6" style="text-decoration: none">N</a><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">Jeffery To</a> &lt;<a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">jeffery.to@gmail.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/06b7d9b665d6299571a305b49e1bc159290d16cd" data-original="06b7d9b665d6299571a305b49e1bc159290d16cd" data-link="false" data-link-reference="false" data-project="28801" data-commit="06b7d9b665d6299571a305b49e1bc159290d16cd" data-reference-type="commit" data-container="body" data-placement="top" title="CI: Sort build architectures in alphabetical order" class="gfm gfm-commit has-tooltip">06b7d9b6</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/565e1cbdd99cac3a0f6c4ab46067c6a088618680 CI: Add build test for riscv64_riscv64 2023-06-26T11:48:02+02:00 Jeffery To jeffery.to@gmail.com Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg2" style="text-decoration: none">N</a><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">Jeffery To</a> &lt;<a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">jeffery.to@gmail.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/f165789cedad0b17fcfed4422a82d769159a46f1" data-original="f165789cedad0b17fcfed4422a82d769159a46f1" data-link="false" data-link-reference="false" data-project="28801" data-commit="f165789cedad0b17fcfed4422a82d769159a46f1" data-reference-type="commit" data-container="body" data-placement="top" title="CI: Add build test for riscv64_riscv64" class="gfm gfm-commit has-tooltip">f165789c</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/ea8de65fb7095d77e40863fb1f75f667b98b2018 CI: update build architectures 2023-06-26T11:48:02+02:00 Tianling Shen cnsztl@immortalwrt.org - armvirt target has been renamed to armsr (Arm SystemReady) [1]. - armsr-armv8 has been switched to aarch64_generic architecture [2]. 1. <a href="https://github.com/openwrt/openwrt/commit/40b02a230167626def69389452f19b7109aaeac1" rel="nofollow noreferrer noopener" target="_blank">https://github.com/openwrt/openwrt/commit/40b02a230167626def69389452f19b7109aaeac1</a> 2. <a href="https://github.com/openwrt/openwrt/commit/e0f06ddc23b2503a1791ae7e97b02e2647e8a70d" rel="nofollow noreferrer noopener" target="_blank">https://github.com/openwrt/openwrt/commit/e0f06ddc23b2503a1791ae7e97b02e2647e8a70d</a>Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:cnsztl@immortalwrt.org" title="cnsztl@immortalwrt.org"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg6" style="text-decoration: none">N</a><a href="mailto:cnsztl@immortalwrt.org" title="cnsztl@immortalwrt.org">Tianling Shen</a> &lt;<a href="mailto:cnsztl@immortalwrt.org" title="cnsztl@immortalwrt.org">cnsztl@immortalwrt.org</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/04a287eea05b066fc198836d7ada431887497436" data-original="04a287eea05b066fc198836d7ada431887497436" data-link="false" data-link-reference="false" data-project="28801" data-commit="04a287eea05b066fc198836d7ada431887497436" data-reference-type="commit" data-container="body" data-placement="top" title="CI: update build architectures" class="gfm gfm-commit has-tooltip">04a287ee</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/1b720129f7928d7a22ac9e7d27a700789dc851b1 Merge pull request #982 from PolynomialDivision/23-05-ci-backports 2023-07-05T20:03:49+02:00 Josef Schlehofer pepe.schlehofer@gmail.com [23.05] CI - GitHub actions sync with the latest changes from OpenWrt packages repository https://gitcode.net/mirror/openwrt/routing/-/commit/ff834a87c0f73f11706ecee2273649a3137c2126 oonf-olsrd2: add support to check if service is running 2023-07-06T14:31:47+02:00 Maciej Krüger mkg20001@gmail.com Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:mkg20001@gmail.com" title="mkg20001@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg3" style="text-decoration: none">N</a><a href="mailto:mkg20001@gmail.com" title="mkg20001@gmail.com">Maciej Krüger</a> &lt;<a href="mailto:mkg20001@gmail.com" title="mkg20001@gmail.com">mkg20001@gmail.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/618e80a06a6c032d09bc9cfa333fde893ec9f8d1" data-original="618e80a06a6c032d09bc9cfa333fde893ec9f8d1" data-link="false" data-link-reference="false" data-project="28801" data-commit="618e80a06a6c032d09bc9cfa333fde893ec9f8d1" data-reference-type="commit" data-container="body" data-placement="top" title="oonf-olsrd2: add support to check if service is running" class="gfm gfm-commit has-tooltip">618e80a0</a>)
name: Check autorelease deprecation
on:
pull_request_target:
types: [opened, synchronize, converted_to_draft, ready_for_review, edited]
jobs:
build:
name: Check autorelease deprecation
runs-on: ubuntu-latest
strategy:
fail-fast: false
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Determine branch name
run: |
BRANCH="${GITHUB_BASE_REF#refs/heads/}"
echo "Building for $BRANCH"
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
- name: Determine changed packages
run: |
RET=0
# only detect packages with changes
PKG_ROOTS=$(find . -name Makefile | \
grep -v ".*/src/Makefile" | \
sed -e 's@./\(.*\)/Makefile@\1/@')
CHANGES=$(git diff --diff-filter=d --name-only origin/$BRANCH...)
for ROOT in $PKG_ROOTS; do
for CHANGE in $CHANGES; do
if [[ "$CHANGE" == "$ROOT"* ]]; then
if grep -q '$(AUTORELEASE)' "$ROOT/Makefile"; then
CONTAINS_AUTORELEASE+="$ROOT"
fi
break
fi
done
done
if [ -n "$CONTAINS_AUTORELEASE" ]; then
RET=1
cat > "$GITHUB_WORKSPACE/pr_comment.md" << EOF
Please do no longer set *PKG_RELEASE* to *AUTORELEASE* as the
feature is deprecated. Please use an integer instead. Below is a
list of affected packages including correct *PKG_RELEASE*:
EOF
fi
for ROOT in $CONTAINS_AUTORELEASE; do
echo -n " - ${ROOT}Makefile: PKG_RELEASE:=" >> "$GITHUB_WORKSPACE/pr_comment.md"
last_bump="$(git log --pretty=format:'%h %s' "$ROOT" |
grep --max-count=1 -e ': [uU]pdate to ' -e ': [bB]ump to ' |
cut -f 1 -d ' ')"
if [ -n "$last_bump" ]; then
echo -n $(($(git rev-list --count "$last_bump..HEAD" "$ROOT") + 2)) >> "$GITHUB_WORKSPACE/pr_comment.md"
else
echo -n $(($(git rev-list --count HEAD "$ROOT") + 2)) >> "$GITHUB_WORKSPACE/pr_comment.md"
fi
echo >> "$GITHUB_WORKSPACE/pr_comment.md"
done
exit $RET
- name: Find Comment
uses: peter-evans/find-comment@v2
if: ${{ failure() }}
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v2
if: ${{ failure() }}
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body-file: 'pr_comment.md'
edit-mode: replace
......@@ -2,7 +2,12 @@
# not enabling `errtrace` and `pipefail` since those are bash specific
set -o errexit # failing commands causes script to fail
set -o nounset # undefined variables causes script to fail
set -o nounset # undefined variables causes script to fail
echo "src/gz packages_ci file:///ci" >> /etc/opkg/distfeeds.conf
FINGERPRINT="$(usign -F -p /ci/packages_ci.pub)"
cp /ci/packages_ci.pub "/etc/opkg/keys/$FINGERPRINT"
mkdir -p /var/lock/
......@@ -11,7 +16,7 @@ opkg update
[ -n "${CI_HELPER:=''}" ] || CI_HELPER="/ci/.github/workflows/ci_helpers.sh"
for PKG in /ci/*.ipk; do
tar -xzOf "$PKG" ./control.tar.gz | tar xzf - ./control
tar -xzOf "$PKG" ./control.tar.gz | tar xzf - ./control
# package name including variant
PKG_NAME=$(sed -ne 's#^Package: \(.*\)$#\1#p' ./control)
# package version without release
......@@ -21,10 +26,24 @@ for PKG in /ci/*.ipk; do
echo "Testing package $PKG_NAME in version $PKG_VERSION from $PKG_SOURCE"
opkg install "$PKG"
export PKG_NAME PKG_VERSION CI_HELPER
PRE_TEST_SCRIPT=$(find /ci/ -name "$PKG_SOURCE" -type d)/pre-test.sh
if [ -f "$PRE_TEST_SCRIPT" ]; then
echo "Use package specific pre-test.sh"
if sh "$PRE_TEST_SCRIPT" "$PKG_NAME" "$PKG_VERSION"; then
echo "Pre-test successful"
else
echo "Pre-test failed"
exit 1
fi
else
echo "No pre-test.sh script available"
fi
opkg install "$PKG"
TEST_SCRIPT=$(find /ci/ -name "$PKG_SOURCE" -type d)/test.sh
if [ -f "$TEST_SCRIPT" ]; then
......@@ -39,5 +58,5 @@ for PKG in /ci/*.ipk; do
echo "No test.sh script available"
fi
opkg remove "$PKG_NAME" --force-removal-of-dependent-packages --force-remove
opkg remove "$PKG_NAME" --force-removal-of-dependent-packages --force-remove --autoremove || true
done
......@@ -3,6 +3,10 @@ name: Test Build
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
name: Test ${{ matrix.arch }}
......@@ -11,37 +15,37 @@ jobs:
fail-fast: false
matrix:
include:
- arch: arc_archs
target: archs38-generic
runtime_test: false
- arch: aarch64_generic
target: armsr-armv8
runtime_test: true
- arch: arm_cortex-a15_neon-vfpv4
target: armsr-armv7
runtime_test: true
- arch: arm_cortex-a9_vfpv3-d16
target: mvebu-cortexa9
runtime_test: false
- arch: i386_pentium-mmx
target: x86-geode
runtime_test: true
- arch: mips_24kc
target: ath79-generic
runtime_test: false
runtime_test: true
- arch: powerpc_464fp
target: apm821xx-nand
runtime_test: false
- arch: powerpc_8540
- arch: powerpc_8548
target: mpc85xx-p1010
runtime_test: false
- arch: aarch64_cortex-a53
target: mvebu-cortexa53
runtime_test: true
- arch: arm_cortex-a15_neon-vfpv4
target: armvirt-32
runtime_test: true
- arch: i386_pentium-mmx
target: x86-geode
runtime_test: true
- arch: riscv64_riscv64
target: sifiveu-generic
runtime_test: false
- arch: x86_64
target: x86-64
......@@ -82,20 +86,36 @@ jobs:
echo "Building $PACKAGES"
echo "PACKAGES=$PACKAGES" >> $GITHUB_ENV
- name: Generate build keys
run: |
sudo apt-get update
sudo apt-get install -y signify-openbsd
signify-openbsd -G -n -c 'DO NOT USE - OpenWrt packages feed CI' -p packages_ci.pub -s packages_ci.sec
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "KEY_BUILD<<$EOF" >> $GITHUB_ENV
cat packages_ci.sec >> $GITHUB_ENV
echo "$EOF" >> $GITHUB_ENV
- name: Build
uses: openwrt/gh-action-sdk@v5
env:
ARCH: ${{ matrix.arch }}-${{ env.BRANCH }}
FEEDNAME: packages_ci
INDEX: 1
KEY_BUILD: ${{ env.KEY_BUILD }}
- name: Move created packages to project dir
run: cp bin/packages/${{ matrix.arch }}/packages_ci/*.ipk . || true
run: cp bin/packages/${{ matrix.arch }}/packages_ci/* . || true
- name: Store packages
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.arch}}-packages
path: "*.ipk"
name: ${{env.ARCHIVE_NAME}}-packages
path: |
Packages
Packages.*
*.ipk
PKG-INFO
- name: Store logs
uses: actions/upload-artifact@v3
......@@ -106,19 +126,32 @@ jobs:
- name: Remove logs
run: sudo rm -rf logs/ || true
- name: Check if any packages were built
run: |
if [ -n "$(find . -maxdepth 1 -type f -name '*.ipk' -print -quit)" ]; then
echo "Found *.ipk files"
HAVE_IPKS=true
else
echo "No *.ipk files found"
HAVE_IPKS=false
fi
echo "HAVE_IPKS=$HAVE_IPKS" >> $GITHUB_ENV
- name: Register QEMU
if: ${{ matrix.runtime_test }}
if: ${{ matrix.runtime_test && fromJSON(env.HAVE_IPKS) }}
run: |
sudo docker run --rm --privileged aptman/qus -s -- -p
sudo apt-get update
sudo apt-get install -y qemu-user-static binfmt-support
sudo update-binfmts --import
- name: Build Docker container
if: ${{ matrix.runtime_test }}
if: ${{ matrix.runtime_test && fromJSON(env.HAVE_IPKS) }}
run: |
docker build -t test-container --build-arg ARCH .github/workflows/
env:
ARCH: ${{ matrix.arch }}-${{ env.BRANCH }}
- name: Test via Docker container
if: ${{ matrix.runtime_test }}
if: ${{ matrix.runtime_test && fromJSON(env.HAVE_IPKS) }}
run: |
docker run --rm -v $GITHUB_WORKSPACE:/ci test-container
......@@ -118,3 +118,20 @@ reload()
oonf_add_devices_to_configuration
oonf_reread_config
}
running()
{
# check if we have a pidfile and then check if that pid still exists.
# since we don't use -e this has to be explicitly returned. exit would stop the process.
test -e "/tmp/run/olsrd2.pid" && test -e "/proc/$(cat "/tmp/run/olsrd2.pid")" && return 0
return 1
}
status()
{
if running; then
echo "running"
else
echo "stopped"
fi
}
include $(TOPDIR)/rules.mk
PKG_NAME:=oonf-olsrd2
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/OLSR/OONF.git
......
......@@ -5,4 +5,7 @@ DAEMON='olsrd2'
[ -n "$IPKG_INSTROOT" ] || {
. /lib/functions/oonf_init.sh
extra_command "running" "Check if service is running"
extra_command "status" "Service status"
}