summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorSebastian Kemper <sebastian_ml@gmx.net>2022-05-30 18:45:58 +0200
committerSebastian Kemper <sebastian_ml@gmx.net>2022-05-31 21:29:41 +0200
commitff8addfd97e2e000ffc454e258cb9c03b55ca8bc (patch)
tree6b1bc4756c0167ef2a02d1d5b03540bc55efc5e4 /.github/workflows
parent056e93c1ad0c3030dfdce310a7c33a0653ea3a16 (diff)
CI: sync up with changes in packages repo
Catch up with the changes in the packages repository. All changes are manual cherry picks from the packages repo and listed below. github: adapt templates Remove refs to LEDE and use "OpenWrt" instead of "OpenWRT" Remove instructions on self-checking pull request content for the following considerations - The checks are now enforced by travis autocheck scripts - Github now prompts users to refer to the contributing guide on submitting new issue and pull request Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> (cherry picked from commit f552f738e2d4bb1fc15acde8b7410e3d37586e2f) repo: Add more information to the issue template Rephrase the template a bit and add information about older releases and forks. Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net> (cherry picked from commit 31179ef2a414412871c1c23a9b3e506a5eab1ef8) CI: use new `openwrt` Docker username We now own `openwrtorg` and `openwrt`, where the latter replaces the former. Slowly migrate over. Signed-off-by: Paul Spooren <mail@aparcar.org> (cherry picked from commit b164a3aa32caa181feff8074ecce3a42b052b060) CI: define matrix individually and add targets This allows more specific definition per test, like on which target packages should be compiled. Signed-off-by: Paul Spooren <mail@aparcar.org> (cherry picked from commit 3701000051afe81c0f6c166a924828706cf21b05) CI: reformat extra long line Better readability on split screens. Signed-off-by: Paul Spooren <mail@aparcar.org> (cherry picked from commit 81f7461e66c877a9d1f6c751fd92252e950370c3) CI: test build dependent packages By using OPKGs `whatdepends` all packages dependent on a library are printed. Use that feature to obtain packages which a version change may break and build them as well. Change "default" packages to contain a lib on which other packages depend, instead of compiling `tmux` compile `attendedsysupgrade-common` on which other packages depend. Ignore any LuCI packages which only contains translations. Signed-off-by: Paul Spooren <mail@aparcar.org> (cherry picked from commit c0d0c64f6ca1cbed2586812cad9d7da7b6e5e542) CI: revert adding of *depending* packages While the idea may make sense the current implementation is faulty. Problem is that OpenWrt uses the folder name of packages within the build system while `opkg` spits out the actual packages names. An example, compiling the packages of folder `vim` (`make package/vim/compile`) creates a package called `xxd`, where `make package/xxd/compile` would fail. The current implementation uses `opkg` to figure out dependent packages, but the resulting names do not match the above mentioned folders. Revert this for now until we come up with a better implementation to avoid false positive CI failures. Signed-off-by: Paul Spooren <mail@aparcar.org> (cherry picked from commit a2bda4cc69e4121dccba097578bbd0bd40d0675d) github-ci: fix small typo Signed-off-by: Michael Heimpold <mhei@heimpold.de> (cherry picked from commit 05a3011b00f7128c5f46c2d05999937fc01dc2ca) CI: update SDK action to v3 No also check mirror hashes and badly formated init files Signed-off-by: Paul Spooren <mail@aparcar.org> (cherry picked from commit 291d1f255abefbc05e53bb3019ed7a13e1826ef2) github-ci: also build mipsel_24kc / mt7621 Signed-off-by: Kevin David <kevin.p.david@gmail.com> This seems like a fairly popular configuration and is at least handy for me for temporary testing. (cherry picked from commit a5de3d04557eccd1db58a35ab9f76b38eab4bfb4) artifacts: use git commit sha in name Signed-off-by: Peter van Dijk <peter.van.dijk@powerdns.com> (cherry picked from commit bbf983721cf41fd94388b16ce90f018d6c0496f5) CI: add PKG-INFO metadata file Signed-off-by: Peter van Dijk <peter.van.dijk@powerdns.com> (cherry picked from commit a40c1b3e442eccbf0619f06b473705f4a4a0ac6d) CI: do not crash during PKG-INFO generation if there are no packages Signed-off-by: Peter van Dijk <peter.van.dijk@powerdns.com> (cherry picked from commit b5132de5cf4f7d0562445cf3c65f9f1a4bcb1bbf) CI: fix runtime testing for non master branch 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 <mail@aparcar.org> (cherry picked from commit f535d770901674d7d9f3d8cd9abe566d9db63ebe) ci: use openwrt/gh-action-sdk@v4 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 <ynezz@true.cz> (cherry picked from commit b1355832a05f96d96081044a90b4c9137eb15fad) github: fix typo in issue template Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net> (cherry picked from commit ffdc2b09eada82dd563f23a9a51e4ef8e233920f) ci: Look for changed packages in the PR branch only Signed-off-by: Jeffery To <jeffery.to@gmail.com> (cherry picked from commit 6b2294ac379ecae55993a8faa583910423f620e7) ci: Use openwrt/gh-action-sdk@v5 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 <jeffery.to@gmail.com> (cherry picked from commit 37f9b77b01fd148c946dc313869602fb8203eaea) Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/Dockerfile2
-rwxr-xr-x.github/workflows/entrypoint.sh2
-rw-r--r--.github/workflows/multi-arch-test-build.yml98
3 files changed, 84 insertions, 18 deletions
diff --git a/.github/workflows/Dockerfile b/.github/workflows/Dockerfile
index aa269b7..fbd17fc 100644
--- a/.github/workflows/Dockerfile
+++ b/.github/workflows/Dockerfile
@@ -1,5 +1,5 @@
ARG ARCH=x86-64
-FROM openwrtorg/rootfs:$ARCH
+FROM openwrt/rootfs:$ARCH
ADD entrypoint.sh /entrypoint.sh
diff --git a/.github/workflows/entrypoint.sh b/.github/workflows/entrypoint.sh
index d7d4ecd..7604105 100755
--- a/.github/workflows/entrypoint.sh
+++ b/.github/workflows/entrypoint.sh
@@ -26,7 +26,7 @@ for PKG in /ci/*.ipk; do
if [ -f "$TEST_SCRIPT" ]; then
echo "Use package specific test.sh"
if sh "$TEST_SCRIPT" "$PKG_NAME" "$PKG_VERSION"; then
- echo "Test succesful"
+ echo "Test successful"
else
echo "Test failed"
exit 1
diff --git a/.github/workflows/multi-arch-test-build.yml b/.github/workflows/multi-arch-test-build.yml
index cbd9663..f8a907b 100644
--- a/.github/workflows/multi-arch-test-build.yml
+++ b/.github/workflows/multi-arch-test-build.yml
@@ -10,21 +10,45 @@ jobs:
strategy:
fail-fast: false
matrix:
- arch:
- - arc_archs
- - arm_cortex-a9_vfpv3-d16
- - mips_24kc
- - powerpc_464fp
- - powerpc_8540
- runtime_test: [false]
include:
+ - arch: arc_archs
+ target: archs38-generic
+ runtime_test: false
+
+ - arch: arm_cortex-a9_vfpv3-d16
+ target: mvebu-cortexa9
+ runtime_test: false
+
+ - arch: mips_24kc
+ target: ath79-generic
+ runtime_test: false
+
+ - arch: mipsel_24kc
+ target: mt7621
+ runtime_test: false
+
+ - arch: powerpc_464fp
+ target: apm821xx-nand
+ runtime_test: false
+
+ - arch: powerpc_8540
+ 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: x86_64
+ target: x86-64
runtime_test: true
steps:
@@ -41,8 +65,10 @@ jobs:
- name: Determine changed packages
run: |
# 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)
+ 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
@@ -55,13 +81,13 @@ jobs:
# fallback to test packages if nothing explicitly changes this is
# should run if other mechanics in packages.git changed
- PACKAGES="${PACKAGES:-vim tmux bmon}"
+ PACKAGES="${PACKAGES:-vim attendedsysupgrade-common bmon}"
echo "Building $PACKAGES"
echo "PACKAGES=$PACKAGES" >> $GITHUB_ENV
- name: Build
- uses: openwrt/gh-action-sdk@v1
+ uses: openwrt/gh-action-sdk@v5
env:
ARCH: ${{ matrix.arch }}-${{ env.BRANCH }}
FEEDNAME: packages_ci
@@ -69,17 +95,57 @@ jobs:
- name: Move created packages to project dir
run: cp bin/packages/${{ matrix.arch }}/packages_ci/*.ipk . || true
+ - name: Collect metadata
+ run: |
+ MERGE_ID=$(git rev-parse --short HEAD)
+ echo "MERGE_ID=$MERGE_ID" >> $GITHUB_ENV
+ echo "BASE_ID=$(git rev-parse --short HEAD^1)" >> $GITHUB_ENV
+ echo "HEAD_ID=$(git rev-parse --short HEAD^2)" >> $GITHUB_ENV
+ PRNUMBER=${GITHUB_REF_NAME%/merge}
+ echo "PRNUMBER=$PRNUMBER" >> $GITHUB_ENV
+ echo "ARCHIVE_NAME=${{matrix.arch}}-PR$PRNUMBER-$MERGE_ID" >> $GITHUB_ENV
+
+ - name: Generate metadata
+ run: |
+ cat << _EOF_ > PKG-INFO
+ Metadata-Version: 2.1
+ Name: ${{env.ARCHIVE_NAME}}
+ Version: $BRANCH
+ Author: $GITHUB_ACTOR
+ Home-page: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pull/$PRNUMBER
+ Download-URL: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID
+ Summary: $PACKAGES
+ Platform: ${{ matrix.arch }}
+
+ Packages for OpenWrt $BRANCH running on ${{matrix.arch}}, built from PR $PRNUMBER
+ at commit $HEAD_ID, against $BRANCH at commit $BASE_ID, with merge SHA $MERGE_ID.
+
+ Modified packages:
+ _EOF_
+ for p in $PACKAGES
+ do
+ echo " "$p >> PKG-INFO
+ done
+ echo >> PKG-INFO
+ echo Full file listing: >> PKG-INFO
+ ls -al *.ipk >> PKG-INFO || true
+ cat PKG-INFO
+
- name: Store packages
uses: actions/upload-artifact@v2
with:
- name: ${{ matrix.arch}}-packages
- path: "*.ipk"
+ name: ${{env.ARCHIVE_NAME}}-packages
+ path: |
+ *.ipk
+ PKG-INFO
- name: Store logs
uses: actions/upload-artifact@v2
with:
- name: ${{ matrix.arch}}-logs
- path: logs/
+ name: ${{env.ARCHIVE_NAME}}-logs
+ path: |
+ logs/
+ PKG-INFO
- name: Remove logs
run: sudo rm -rf logs/ || true
@@ -94,7 +160,7 @@ jobs:
run: |
docker build -t test-container --build-arg ARCH .github/workflows/
env:
- ARCH: ${{ matrix.arch }}
+ ARCH: ${{ matrix.arch }}-${{ env.BRANCH }}
- name: Test via Docker container
if: ${{ matrix.runtime_test }}