From e9512a584162605fa8a3e5c6742a48bbddee0a69 Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Mon, 29 Sep 2025 09:42:49 -0500 Subject: [PATCH 01/18] [WIP] github workflow no space workaround --- .github/workflows/zephyr-samples.yml | 33 +++++++--------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/.github/workflows/zephyr-samples.yml b/.github/workflows/zephyr-samples.yml index efcf8bb..af0d3d2 100644 --- a/.github/workflows/zephyr-samples.yml +++ b/.github/workflows/zephyr-samples.yml @@ -16,32 +16,15 @@ jobs: test: name: Twister Samples runs-on: ubuntu-22.04 - container: ghcr.io/zephyrproject-rtos/ci:v0.26-branch - env: - CMAKE_PREFIX_PATH: /opt/toolchains steps: - - name: Clean /tmp + - name: Free file system space run: | - df -h - sudo rm -rf /tmp/* - df -h - - name: Checkout - uses: actions/checkout@v4 - with: - path: bacnet - - name: Initialize - working-directory: bacnet - run: | - west init -l . - west update - - name: Twister Tests samples - working-directory: bacnet - run: | - pwd - ./samples.sh + rm -rf /opt/hostedtoolcache + docker system prune -a --volumes - - name: Archive Test Results - uses: actions/upload-artifact@v4 + - uses: actions/checkout@v3 + - name: Run Zephyr Container + uses: docker://ghcr.io/zephyrproject-rtos/ci:v0.26-branch with: - name: samples - path: bacnet/twister-out.samples + args: ./samples.sh + From 8f9a8759c569f1bb13be9f588ddedff2755845e2 Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Mon, 29 Sep 2025 10:04:48 -0500 Subject: [PATCH 02/18] [WIP] github workflow no space workaround --- .github/workflows/zephyr-samples.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/zephyr-samples.yml b/.github/workflows/zephyr-samples.yml index af0d3d2..a68f815 100644 --- a/.github/workflows/zephyr-samples.yml +++ b/.github/workflows/zephyr-samples.yml @@ -23,8 +23,10 @@ jobs: docker system prune -a --volumes - uses: actions/checkout@v3 + - name: Run Zephyr Container uses: docker://ghcr.io/zephyrproject-rtos/ci:v0.26-branch with: - args: ./samples.sh + entrypoint: /bin/sh + args: -c ./samples.sh From 863389799ff40460dd905a766e85f88fd89113d5 Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Wed, 1 Oct 2025 11:29:01 -0500 Subject: [PATCH 03/18] Update zephyr-samples.yml --- .github/workflows/zephyr-samples.yml | 31 ++++++++++++++++------------ 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/workflows/zephyr-samples.yml b/.github/workflows/zephyr-samples.yml index a68f815..e5484fd 100644 --- a/.github/workflows/zephyr-samples.yml +++ b/.github/workflows/zephyr-samples.yml @@ -13,20 +13,25 @@ on: workflow_dispatch: jobs: - test: - name: Twister Samples + run-image: runs-on: ubuntu-22.04 + permissions: + packages: read # Required to pull private images from GHCR steps: + - name: Show File System Info + run: | + docker version + docker system info + docker system df + docker images + docker ps --all - name: Free file system space run: | - rm -rf /opt/hostedtoolcache - docker system prune -a --volumes - - - uses: actions/checkout@v3 - - - name: Run Zephyr Container - uses: docker://ghcr.io/zephyrproject-rtos/ci:v0.26-branch - with: - entrypoint: /bin/sh - args: -c ./samples.sh - + echo "== Remove all unused containers, networks, images" + echo "== (both dangling and unused), and optionally, volumes." + set -e + sudo docker system prune --all --filter "until=720h" --force + - name: Log in to GHCR + run: echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + - name: Run Docker image from GHCR + run: docker run --rm ghcr.io/zephyrproject-rtos/ci:v0.26-branch samples.sh From 3c47c7a7a7f0b26ee58383fe40ea1b546128464d Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Wed, 1 Oct 2025 11:34:59 -0500 Subject: [PATCH 04/18] Update zephyr-samples.yml --- .github/workflows/zephyr-samples.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/zephyr-samples.yml b/.github/workflows/zephyr-samples.yml index e5484fd..5d71537 100644 --- a/.github/workflows/zephyr-samples.yml +++ b/.github/workflows/zephyr-samples.yml @@ -20,18 +20,15 @@ jobs: steps: - name: Show File System Info run: | - docker version - docker system info docker system df docker images - docker ps --all - name: Free file system space run: | echo "== Remove all unused containers, networks, images" echo "== (both dangling and unused), and optionally, volumes." set -e sudo docker system prune --all --filter "until=720h" --force - - name: Log in to GHCR - run: echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + - name: Pull Docker image from GHCR + run: docker pull ghcr.io/zephyrproject-rtos/ci:v0.26-branch - name: Run Docker image from GHCR run: docker run --rm ghcr.io/zephyrproject-rtos/ci:v0.26-branch samples.sh From 10700c79b04349042af0114d5596f356f6808024 Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Wed, 1 Oct 2025 11:42:10 -0500 Subject: [PATCH 05/18] Update zephyr-samples.yml --- .github/workflows/zephyr-samples.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/zephyr-samples.yml b/.github/workflows/zephyr-samples.yml index 5d71537..040c4bc 100644 --- a/.github/workflows/zephyr-samples.yml +++ b/.github/workflows/zephyr-samples.yml @@ -28,7 +28,10 @@ jobs: echo "== (both dangling and unused), and optionally, volumes." set -e sudo docker system prune --all --filter "until=720h" --force + docker system df + - name: Delete unnecessary tools folder + run: rm -rf /opt/hostedtoolcache - name: Pull Docker image from GHCR run: docker pull ghcr.io/zephyrproject-rtos/ci:v0.26-branch - name: Run Docker image from GHCR - run: docker run --rm ghcr.io/zephyrproject-rtos/ci:v0.26-branch samples.sh + run: docker run --rm --rm -v "$(pwd):/workspace" ghcr.io/zephyrproject-rtos/ci:v0.26-branch /bin/bash /workspace/samples.sh From 2c5283c29c06c005d9faa5930e28d93ede5025a5 Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Wed, 1 Oct 2025 11:48:48 -0500 Subject: [PATCH 06/18] Update zephyr-samples.yml --- .github/workflows/zephyr-samples.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/zephyr-samples.yml b/.github/workflows/zephyr-samples.yml index 040c4bc..bdee144 100644 --- a/.github/workflows/zephyr-samples.yml +++ b/.github/workflows/zephyr-samples.yml @@ -31,6 +31,10 @@ jobs: docker system df - name: Delete unnecessary tools folder run: rm -rf /opt/hostedtoolcache + - name: Show Present Working Directory + run: | + echo $(pwd) + ls -al - name: Pull Docker image from GHCR run: docker pull ghcr.io/zephyrproject-rtos/ci:v0.26-branch - name: Run Docker image from GHCR From 3075c437d19611a0a9e4348710a508c2e2597087 Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Wed, 1 Oct 2025 13:08:42 -0500 Subject: [PATCH 07/18] Update zephyr-samples.yml --- .github/workflows/zephyr-samples.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/zephyr-samples.yml b/.github/workflows/zephyr-samples.yml index bdee144..d06aee4 100644 --- a/.github/workflows/zephyr-samples.yml +++ b/.github/workflows/zephyr-samples.yml @@ -31,6 +31,7 @@ jobs: docker system df - name: Delete unnecessary tools folder run: rm -rf /opt/hostedtoolcache + - uses: actions/checkout@v3 - name: Show Present Working Directory run: | echo $(pwd) From f2b20d7d5aee0726ba8d9ea56c653adc7891f7a6 Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Wed, 1 Oct 2025 13:19:39 -0500 Subject: [PATCH 08/18] Substitute west twister for zephyr/twister --- samples.sh | 2 +- unittest.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples.sh b/samples.sh index d426137..3443b52 100755 --- a/samples.sh +++ b/samples.sh @@ -1,7 +1,7 @@ #!/bin/bash # Set the path to the twister executable -TWISTER_EXE="../zephyr/scripts/twister" +TWISTER_EXE="west twister" # Set the path to the test cases directory TEST_CASES_DIR="zephyr/samples" diff --git a/unittest.sh b/unittest.sh index 074ecc6..07d6651 100755 --- a/unittest.sh +++ b/unittest.sh @@ -1,7 +1,7 @@ #!/bin/bash # Set the path to the twister executable -TWISTER_EXE="../zephyr/scripts/twister" +TWISTER_EXE="west twister" # Set the path to the test cases directory TEST_CASES_DIR="zephyr/tests" From 592aee217a7aff550955540228a9d86d709efc81 Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Wed, 1 Oct 2025 13:51:29 -0500 Subject: [PATCH 09/18] Update zephyr-samples.yml --- .github/workflows/zephyr-samples.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/zephyr-samples.yml b/.github/workflows/zephyr-samples.yml index d06aee4..854d160 100644 --- a/.github/workflows/zephyr-samples.yml +++ b/.github/workflows/zephyr-samples.yml @@ -32,6 +32,10 @@ jobs: - name: Delete unnecessary tools folder run: rm -rf /opt/hostedtoolcache - uses: actions/checkout@v3 + - name: West Update + run: | + west init -l . + west update - name: Show Present Working Directory run: | echo $(pwd) From 2b485b78a623bf28c391ad7c6ee8837224e0bbf6 Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Wed, 1 Oct 2025 14:16:52 -0500 Subject: [PATCH 10/18] Added westinit.sh script to init the docker environment. --- .github/workflows/zephyr-samples.yml | 11 +++++------ westinit.sh | 10 ++++++++++ 2 files changed, 15 insertions(+), 6 deletions(-) create mode 100755 westinit.sh diff --git a/.github/workflows/zephyr-samples.yml b/.github/workflows/zephyr-samples.yml index 854d160..3aebf0e 100644 --- a/.github/workflows/zephyr-samples.yml +++ b/.github/workflows/zephyr-samples.yml @@ -32,15 +32,14 @@ jobs: - name: Delete unnecessary tools folder run: rm -rf /opt/hostedtoolcache - uses: actions/checkout@v3 - - name: West Update - run: | - west init -l . - west update - name: Show Present Working Directory - run: | + run: | echo $(pwd) ls -al - name: Pull Docker image from GHCR run: docker pull ghcr.io/zephyrproject-rtos/ci:v0.26-branch - name: Run Docker image from GHCR - run: docker run --rm --rm -v "$(pwd):/workspace" ghcr.io/zephyrproject-rtos/ci:v0.26-branch /bin/bash /workspace/samples.sh + env: + DOCKER_RUN_TARGET: "/workspace/westinit.sh && /workspace/samples.sh" + ZEPHYR_CONTAINER: "ghcr.io/zephyrproject-rtos/ci:v0.26-branch" + run: docker run --rm --rm -v "$(pwd):/workspace" "$ZEPHYR_CONTAINER" /bin/bash -c "$DOCKER_RUN_TARGET" diff --git a/westinit.sh b/westinit.sh new file mode 100755 index 0000000..205aa39 --- /dev/null +++ b/westinit.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# projects are expecting a 'bacnet' folder here +ln -s "$PWD" "${PWD%/*}/bacnet" +cd -P . +# setup our build environment +pip3 install --upgrade west>=1.2.0 +west init -l . +west update > /dev/null 2>&1 +west zephyr-export From dfa4a092fe11bbf52361f186e9c021bb72fbfc0b Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Wed, 1 Oct 2025 14:32:17 -0500 Subject: [PATCH 11/18] Added westinit.sh script to init the docker environment. --- .github/workflows/zephyr-samples.yml | 6 +----- westinit.sh | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/zephyr-samples.yml b/.github/workflows/zephyr-samples.yml index 3aebf0e..3941bfd 100644 --- a/.github/workflows/zephyr-samples.yml +++ b/.github/workflows/zephyr-samples.yml @@ -31,13 +31,9 @@ jobs: docker system df - name: Delete unnecessary tools folder run: rm -rf /opt/hostedtoolcache - - uses: actions/checkout@v3 - - name: Show Present Working Directory - run: | - echo $(pwd) - ls -al - name: Pull Docker image from GHCR run: docker pull ghcr.io/zephyrproject-rtos/ci:v0.26-branch + - uses: actions/checkout@v3 - name: Run Docker image from GHCR env: DOCKER_RUN_TARGET: "/workspace/westinit.sh && /workspace/samples.sh" diff --git a/westinit.sh b/westinit.sh index 205aa39..f2d894a 100755 --- a/westinit.sh +++ b/westinit.sh @@ -4,7 +4,7 @@ ln -s "$PWD" "${PWD%/*}/bacnet" cd -P . # setup our build environment -pip3 install --upgrade west>=1.2.0 +echo $PWD +ls -al west init -l . west update > /dev/null 2>&1 -west zephyr-export From 85193a631b815006d72b52f05eb6a6ab8de85abf Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Wed, 1 Oct 2025 14:48:03 -0500 Subject: [PATCH 12/18] changed workspace to bacnet --- .github/workflows/zephyr-samples.yml | 7 +++++-- westinit.sh | 5 ----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/zephyr-samples.yml b/.github/workflows/zephyr-samples.yml index 3941bfd..2d883ae 100644 --- a/.github/workflows/zephyr-samples.yml +++ b/.github/workflows/zephyr-samples.yml @@ -36,6 +36,9 @@ jobs: - uses: actions/checkout@v3 - name: Run Docker image from GHCR env: - DOCKER_RUN_TARGET: "/workspace/westinit.sh && /workspace/samples.sh" + DOCKER_RUN_TARGET: "/bacnet/westinit.sh && /bacnet/samples.sh" ZEPHYR_CONTAINER: "ghcr.io/zephyrproject-rtos/ci:v0.26-branch" - run: docker run --rm --rm -v "$(pwd):/workspace" "$ZEPHYR_CONTAINER" /bin/bash -c "$DOCKER_RUN_TARGET" + run: | + ls -alh + echo "== Run Docker image from GHCR" + docker run --rm --rm -v "$(pwd):/bacnet" "$ZEPHYR_CONTAINER" /bin/bash -c "$DOCKER_RUN_TARGET" diff --git a/westinit.sh b/westinit.sh index f2d894a..fe3a6b1 100755 --- a/westinit.sh +++ b/westinit.sh @@ -1,10 +1,5 @@ #!/bin/bash -# projects are expecting a 'bacnet' folder here -ln -s "$PWD" "${PWD%/*}/bacnet" -cd -P . # setup our build environment -echo $PWD -ls -al west init -l . west update > /dev/null 2>&1 From 0b3ef0c16f3adb96e9470a9ec75ae03823d10e40 Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Wed, 1 Oct 2025 15:01:08 -0500 Subject: [PATCH 13/18] Use smaller west for CI --- .github/workflows/zephyr-samples.yml | 4 +-- westinit.sh => west-ci.sh | 3 +- west-ci.yml | 51 ++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 3 deletions(-) rename westinit.sh => west-ci.sh (59%) create mode 100644 west-ci.yml diff --git a/.github/workflows/zephyr-samples.yml b/.github/workflows/zephyr-samples.yml index 2d883ae..1d70d4e 100644 --- a/.github/workflows/zephyr-samples.yml +++ b/.github/workflows/zephyr-samples.yml @@ -36,9 +36,9 @@ jobs: - uses: actions/checkout@v3 - name: Run Docker image from GHCR env: - DOCKER_RUN_TARGET: "/bacnet/westinit.sh && /bacnet/samples.sh" + DOCKER_RUN_TARGET: "/bacnet/west-ci.sh && /bacnet/samples.sh" ZEPHYR_CONTAINER: "ghcr.io/zephyrproject-rtos/ci:v0.26-branch" run: | ls -alh echo "== Run Docker image from GHCR" - docker run --rm --rm -v "$(pwd):/bacnet" "$ZEPHYR_CONTAINER" /bin/bash -c "$DOCKER_RUN_TARGET" + docker run --rm -v "$(pwd):/bacnet" "$ZEPHYR_CONTAINER" /bin/bash -c "$DOCKER_RUN_TARGET" diff --git a/westinit.sh b/west-ci.sh similarity index 59% rename from westinit.sh rename to west-ci.sh index fe3a6b1..d704768 100755 --- a/westinit.sh +++ b/west-ci.sh @@ -1,5 +1,6 @@ #!/bin/bash # setup our build environment -west init -l . +west --version +west init -l --mf ./west-ci.yml . west update > /dev/null 2>&1 diff --git a/west-ci.yml b/west-ci.yml new file mode 100644 index 0000000..0805ade --- /dev/null +++ b/west-ci.yml @@ -0,0 +1,51 @@ +# The default west manifest file for the bacnet-stack zephyr project. +# +# The per-installation west configuration file, .west/config, sets the +# path to the project containing this file in the [manifest] section's +# "path" variable. +# +# This imports the latest upstream Zephyr manifest file. +# +# You can pass your manifest repositories to west init when creating a +# new Zephyr installation. See the west documentation for more +# information. +# +# Beginning with west 0.8, the following command-line options +# can be used to initialize with a repository lacking a west.yml +# file at the top level. +# +# west init +# -m +# --mr +# --mf +# + +manifest: + version: 1.2 + + remotes: + - name: bacnet-stack + url-base: https://github.com/bacnet-stack + - name: zephyrproject-rtos + url-base: https://github.com/zephyrproject-rtos + + defaults: + remote: bacnet-stack + + self: + path: bacnet + + projects: + - name: bacnet-stack + path: bacnet/stack # Hidden by bacnet/.gitignore + revision: master + - name: zephyr + path: zephyr + revision: v3.7.1 + remote: zephyrproject-rtos + west-commands: scripts/west-commands.yml + import: + name-allowlist: + - cmsis + - picolibc + - hal_stm32 From c5c40392800ad451d73288fe2a1b72e311dc5272 Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Wed, 1 Oct 2025 15:16:44 -0500 Subject: [PATCH 14/18] Changed west-ci to provide PWD info. --- west-ci.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/west-ci.sh b/west-ci.sh index d704768..193a368 100755 --- a/west-ci.sh +++ b/west-ci.sh @@ -1,6 +1,8 @@ #!/bin/bash # setup our build environment +echo "$PWD" +ls -al bacnet west --version -west init -l --mf ./west-ci.yml . +west init -l --mf bacnet/west-ci.yml . west update > /dev/null 2>&1 From 9e12f6a674cb294e3ed8309f34f995993e570370 Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Wed, 1 Oct 2025 15:24:32 -0500 Subject: [PATCH 15/18] Reverted samples and unittest script to use zephyr/scripts/twister --- samples.sh | 2 +- unittest.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples.sh b/samples.sh index 3443b52..d426137 100755 --- a/samples.sh +++ b/samples.sh @@ -1,7 +1,7 @@ #!/bin/bash # Set the path to the twister executable -TWISTER_EXE="west twister" +TWISTER_EXE="../zephyr/scripts/twister" # Set the path to the test cases directory TEST_CASES_DIR="zephyr/samples" diff --git a/unittest.sh b/unittest.sh index 07d6651..074ecc6 100755 --- a/unittest.sh +++ b/unittest.sh @@ -1,7 +1,7 @@ #!/bin/bash # Set the path to the twister executable -TWISTER_EXE="west twister" +TWISTER_EXE="../zephyr/scripts/twister" # Set the path to the test cases directory TEST_CASES_DIR="zephyr/tests" From 02e4bbe485b0b3ba73b4697827e24845bc2ba077 Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Wed, 1 Oct 2025 15:49:21 -0500 Subject: [PATCH 16/18] Adjust samples and unit test to be ours, not zephyr --- samples.sh | 2 +- unittest.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples.sh b/samples.sh index d426137..2f1b860 100755 --- a/samples.sh +++ b/samples.sh @@ -4,7 +4,7 @@ TWISTER_EXE="../zephyr/scripts/twister" # Set the path to the test cases directory -TEST_CASES_DIR="zephyr/samples" +TEST_CASES_DIR="./zephyr/samples" # Set the output directory for test results OUTPUT_DIR="twister-out.samples" diff --git a/unittest.sh b/unittest.sh index 074ecc6..1c81eca 100755 --- a/unittest.sh +++ b/unittest.sh @@ -4,7 +4,7 @@ TWISTER_EXE="../zephyr/scripts/twister" # Set the path to the test cases directory -TEST_CASES_DIR="zephyr/tests" +TEST_CASES_DIR="./zephyr/tests" # Set the output directory for test results OUTPUT_DIR="twister-out.unit_testing" From 6c7ae26e6c5a84da6b3bb65522762522e4bca076 Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Wed, 1 Oct 2025 15:58:14 -0500 Subject: [PATCH 17/18] Adjust samples and unit test to be ours, not zephyr --- samples.sh | 2 +- unittest.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples.sh b/samples.sh index 2f1b860..faefdff 100755 --- a/samples.sh +++ b/samples.sh @@ -4,7 +4,7 @@ TWISTER_EXE="../zephyr/scripts/twister" # Set the path to the test cases directory -TEST_CASES_DIR="./zephyr/samples" +TEST_CASES_DIR="../bacnet/zephyr/samples" # Set the output directory for test results OUTPUT_DIR="twister-out.samples" diff --git a/unittest.sh b/unittest.sh index 1c81eca..1aafdf6 100755 --- a/unittest.sh +++ b/unittest.sh @@ -4,7 +4,7 @@ TWISTER_EXE="../zephyr/scripts/twister" # Set the path to the test cases directory -TEST_CASES_DIR="./zephyr/tests" +TEST_CASES_DIR="../bacnet/zephyr/tests" # Set the output directory for test results OUTPUT_DIR="twister-out.unit_testing" From 48ee5af47814fc137647215f46e530ab159df00f Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Wed, 1 Oct 2025 16:25:11 -0500 Subject: [PATCH 18/18] Combined unit test and samples into one docker workflow. --- .github/workflows/zephyr-samples.yml | 44 ---------------------------- .github/workflows/zephyr.yml | 44 ++++++++++++++++------------ README.md | 4 +-- 3 files changed, 27 insertions(+), 65 deletions(-) delete mode 100644 .github/workflows/zephyr-samples.yml diff --git a/.github/workflows/zephyr-samples.yml b/.github/workflows/zephyr-samples.yml deleted file mode 100644 index 1d70d4e..0000000 --- a/.github/workflows/zephyr-samples.yml +++ /dev/null @@ -1,44 +0,0 @@ -permissions: - contents: read -name: Zephyr OS Samples -# For Zephyr 3.7 LTS, use the v0.26-branch -# or the latest v0.26.x release Docker image. -# Docker image was built on Ubuntu 22.04 -on: - push: - branches: [ "default" ] - pull_request: - branches: - - '*' - workflow_dispatch: - -jobs: - run-image: - runs-on: ubuntu-22.04 - permissions: - packages: read # Required to pull private images from GHCR - steps: - - name: Show File System Info - run: | - docker system df - docker images - - name: Free file system space - run: | - echo "== Remove all unused containers, networks, images" - echo "== (both dangling and unused), and optionally, volumes." - set -e - sudo docker system prune --all --filter "until=720h" --force - docker system df - - name: Delete unnecessary tools folder - run: rm -rf /opt/hostedtoolcache - - name: Pull Docker image from GHCR - run: docker pull ghcr.io/zephyrproject-rtos/ci:v0.26-branch - - uses: actions/checkout@v3 - - name: Run Docker image from GHCR - env: - DOCKER_RUN_TARGET: "/bacnet/west-ci.sh && /bacnet/samples.sh" - ZEPHYR_CONTAINER: "ghcr.io/zephyrproject-rtos/ci:v0.26-branch" - run: | - ls -alh - echo "== Run Docker image from GHCR" - docker run --rm -v "$(pwd):/bacnet" "$ZEPHYR_CONTAINER" /bin/bash -c "$DOCKER_RUN_TARGET" diff --git a/.github/workflows/zephyr.yml b/.github/workflows/zephyr.yml index bfc2c81..fccbb3c 100644 --- a/.github/workflows/zephyr.yml +++ b/.github/workflows/zephyr.yml @@ -1,6 +1,6 @@ permissions: contents: read -name: Zephyr OS Tests +name: Zephyr OS Unit Tests and Sample Builds # For Zephyr 3.7 LTS, use the v0.26-branch # or the latest v0.26.x release Docker image. # Docker image was built on Ubuntu 22.04 @@ -13,24 +13,32 @@ on: workflow_dispatch: jobs: - test: - name: Twister Tests + run-image: runs-on: ubuntu-22.04 - container: ghcr.io/zephyrproject-rtos/ci:v0.26-branch - env: - CMAKE_PREFIX_PATH: /opt/toolchains + permissions: + packages: read # Required to pull private images from GHCR steps: - - name: Checkout - uses: actions/checkout@v4 - with: - path: bacnet - - name: Initialize - working-directory: bacnet + - name: Show File System Info run: | - west init -l . - west update - - name: Twister Tests unit_testing - working-directory: bacnet + docker system df + docker images + - name: Free file system space run: | - pwd - ./unittest.sh + echo "== Remove all unused containers, networks, images" + echo "== (both dangling and unused), and optionally, volumes." + set -e + sudo docker system prune --all --filter "until=720h" --force + docker system df + - name: Delete unnecessary tools folder + run: rm -rf /opt/hostedtoolcache + - name: Pull Docker image from GHCR + run: docker pull ghcr.io/zephyrproject-rtos/ci:v0.26-branch + - uses: actions/checkout@v3 + - name: Run Docker image from GHCR + env: + DOCKER_RUN_TARGET: "/bacnet/west-ci.sh && /bacnet/samples.sh && /bacnet/unittest.sh" + ZEPHYR_CONTAINER: "ghcr.io/zephyrproject-rtos/ci:v0.26-branch" + run: | + ls -alh + echo "== Run Docker image from GHCR" + docker run --rm -v "$(pwd):/bacnet" "$ZEPHYR_CONTAINER" /bin/bash -c "$DOCKER_RUN_TARGET" diff --git a/README.md b/README.md index 696b2ab..e4ca9df 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,7 @@ This integration uses automated continuous integration services to assist in automated compilation, validation, linting, security scanning, and unit testing to produce robust C code. -[![Actions Status](https://github.com/bacnet-stack/bacnet-stack-zephyr/actions/workflows/zephyr.yml/badge.svg)](https://github.com/bacnet-stack/bacnet-stack-zephyr/actions/workflows/zephyr.yml) GitHub Workflow: BACnet Stack Zephyr Twister Unit Tests - -[![Actions Status](https://github.com/bacnet-stack/bacnet-stack-zephyr/actions/workflows/zephyr-samples.yml/badge.svg)](https://github.com/bacnet-stack/bacnet-stack-zephyr/actions/workflows/zephyr-samples.yml) GitHub Workflow: BACnet Stack Samples Built +[![Actions Status](https://github.com/bacnet-stack/bacnet-stack-zephyr/actions/workflows/zephyr.yml/badge.svg)](https://github.com/bacnet-stack/bacnet-stack-zephyr/actions/workflows/zephyr.yml) GitHub Workflow: BACnet Stack Zephyr Twister Unit Tests and Sample Build [![Actions Status](https://github.com/bacnet-stack/bacnet-stack-zephyr/workflows/CodeQL/badge.svg)](https://github.com/bacnet-stack-zephyr/bacnet-stack/actions/workflows/codeql-analysis.yml) GitHub Workflow: CodeQL Analysis