|
1 | 1 | permissions: |
2 | 2 | contents: read |
3 | | -name: Zephyr OS Tests |
| 3 | +name: Zephyr OS Unit Tests and Sample Builds |
4 | 4 | # For Zephyr 3.7 LTS, use the v0.26-branch |
5 | 5 | # or the latest v0.26.x release Docker image. |
6 | 6 | # Docker image was built on Ubuntu 22.04 |
|
13 | 13 | workflow_dispatch: |
14 | 14 |
|
15 | 15 | jobs: |
16 | | - test: |
17 | | - name: Twister Tests |
| 16 | + run-image: |
18 | 17 | 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 |
22 | 20 | 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 |
29 | 22 | 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 |
34 | 26 | 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" |
0 commit comments