Skip to content

Commit 48ee5af

Browse files
committed
Combined unit test and samples into one docker workflow.
1 parent 6c7ae26 commit 48ee5af

File tree

3 files changed

+27
-65
lines changed

3 files changed

+27
-65
lines changed

.github/workflows/zephyr-samples.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/zephyr.yml

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
permissions:
22
contents: read
3-
name: Zephyr OS Tests
3+
name: Zephyr OS Unit Tests and Sample Builds
44
# For Zephyr 3.7 LTS, use the v0.26-branch
55
# or the latest v0.26.x release Docker image.
66
# Docker image was built on Ubuntu 22.04
@@ -13,24 +13,32 @@ on:
1313
workflow_dispatch:
1414

1515
jobs:
16-
test:
17-
name: Twister Tests
16+
run-image:
1817
runs-on: ubuntu-22.04
19-
container: ghcr.io/zephyrproject-rtos/ci:v0.26-branch
20-
env:
21-
CMAKE_PREFIX_PATH: /opt/toolchains
18+
permissions:
19+
packages: read # Required to pull private images from GHCR
2220
steps:
23-
- name: Checkout
24-
uses: actions/checkout@v4
25-
with:
26-
path: bacnet
27-
- name: Initialize
28-
working-directory: bacnet
21+
- name: Show File System Info
2922
run: |
30-
west init -l .
31-
west update
32-
- name: Twister Tests unit_testing
33-
working-directory: bacnet
23+
docker system df
24+
docker images
25+
- name: Free file system space
3426
run: |
35-
pwd
36-
./unittest.sh
27+
echo "== Remove all unused containers, networks, images"
28+
echo "== (both dangling and unused), and optionally, volumes."
29+
set -e
30+
sudo docker system prune --all --filter "until=720h" --force
31+
docker system df
32+
- name: Delete unnecessary tools folder
33+
run: rm -rf /opt/hostedtoolcache
34+
- name: Pull Docker image from GHCR
35+
run: docker pull ghcr.io/zephyrproject-rtos/ci:v0.26-branch
36+
- uses: actions/checkout@v3
37+
- name: Run Docker image from GHCR
38+
env:
39+
DOCKER_RUN_TARGET: "/bacnet/west-ci.sh && /bacnet/samples.sh && /bacnet/unittest.sh"
40+
ZEPHYR_CONTAINER: "ghcr.io/zephyrproject-rtos/ci:v0.26-branch"
41+
run: |
42+
ls -alh
43+
echo "== Run Docker image from GHCR"
44+
docker run --rm -v "$(pwd):/bacnet" "$ZEPHYR_CONTAINER" /bin/bash -c "$DOCKER_RUN_TARGET"

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ This integration uses automated continuous integration services to assist
1313
in automated compilation, validation, linting, security scanning, and unit
1414
testing to produce robust C code.
1515

16-
[![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
17-
18-
[![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
16+
[![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
1917

2018
[![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
2119

0 commit comments

Comments
 (0)