From 1aa0524968f351277e7a7955a6121909974fd3c9 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Thu, 26 Oct 2023 09:21:28 +0200 Subject: [PATCH 1/3] ci: add github test workflow Signed-off-by: Paul Spooren --- .github/workflows/build.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..577f11f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: OpenWrt CI testing + +on: [ push, pull_request ] +env: + CI_ENABLE_UNIT_TESTING: 0 + CI_TARGET_BUILD_DEPENDS: libubox + +jobs: + native_testing: + name: Various native checks + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2 + + - uses: ynezz/gh-actions-openwrt-ci-native@v0.0.1 + + - name: Upload build artifacts + uses: actions/upload-artifact@v2 + if: failure() + with: + name: native-build-artifacts + if-no-files-found: ignore + path: | + build/scan + tests/cram/**/*.t.err From 3adf0d615aad52f3960071c4eb855978f95d31b0 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Thu, 26 Oct 2023 09:28:11 +0200 Subject: [PATCH 2/3] test commit fixing warnings Signed-off-by: Paul Spooren --- system.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/system.c b/system.c index 93eac59..adb2c8c 100644 --- a/system.c +++ b/system.c @@ -51,9 +51,8 @@ static const char *system_rootfs_type(void) { static char fstype[16] = { 0 }; char *mountstr = NULL, *mp = "/", *pos, *tmp; FILE *mounts; - ssize_t nread; size_t len = 0; - bool found; + bool found = false; if (initramfs) return "initramfs"; @@ -65,9 +64,7 @@ static const char *system_rootfs_type(void) { if (!mounts) return NULL; - while ((nread = getline(&mountstr, &len, mounts)) != -1) { - found = false; - + while (getline(&mountstr, &len, mounts) != -1) { pos = strchr(mountstr, ' '); if (!pos) continue; From c5090b9945dda41d90f1c188332ec033d6307dd6 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Thu, 26 Oct 2023 09:31:18 +0200 Subject: [PATCH 3/3] ci: enable ujail builds Signed-off-by: Paul Spooren --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 577f11f..4d3c40d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,6 +4,7 @@ on: [ push, pull_request ] env: CI_ENABLE_UNIT_TESTING: 0 CI_TARGET_BUILD_DEPENDS: libubox + CI_CMAKE_EXTRA_BUILD_ARGS: -DJAIL_SUPPORT=1 jobs: native_testing: