Skip to content

Commit 09a0970

Browse files
authored
Merge pull request #38 from bacnet-stack/bugfix/avoid-container-keyword-for-docker-in-pipeline
[WIP] github workflow no space workaround
2 parents 871faa4 + 48ee5af commit 09a0970

File tree

7 files changed

+88
-64
lines changed

7 files changed

+88
-64
lines changed

.github/workflows/zephyr-samples.yml

Lines changed: 0 additions & 41 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

samples.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
TWISTER_EXE="../zephyr/scripts/twister"
55

66
# Set the path to the test cases directory
7-
TEST_CASES_DIR="zephyr/samples"
7+
TEST_CASES_DIR="../bacnet/zephyr/samples"
88

99
# Set the output directory for test results
1010
OUTPUT_DIR="twister-out.samples"

unittest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
TWISTER_EXE="../zephyr/scripts/twister"
55

66
# Set the path to the test cases directory
7-
TEST_CASES_DIR="zephyr/tests"
7+
TEST_CASES_DIR="../bacnet/zephyr/tests"
88

99
# Set the output directory for test results
1010
OUTPUT_DIR="twister-out.unit_testing"

west-ci.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
# setup our build environment
4+
echo "$PWD"
5+
ls -al bacnet
6+
west --version
7+
west init -l --mf bacnet/west-ci.yml .
8+
west update > /dev/null 2>&1

west-ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# The default west manifest file for the bacnet-stack zephyr project.
2+
#
3+
# The per-installation west configuration file, .west/config, sets the
4+
# path to the project containing this file in the [manifest] section's
5+
# "path" variable.
6+
#
7+
# This imports the latest upstream Zephyr manifest file.
8+
#
9+
# You can pass your manifest repositories to west init when creating a
10+
# new Zephyr installation. See the west documentation for more
11+
# information.
12+
#
13+
# Beginning with west 0.8, the following command-line options
14+
# can be used to initialize with a repository lacking a west.yml
15+
# file at the top level.
16+
#
17+
# west init
18+
# -m <repository>
19+
# --mr <branch_name>
20+
# --mf <manifest_pathname>
21+
# <workspace>
22+
23+
manifest:
24+
version: 1.2
25+
26+
remotes:
27+
- name: bacnet-stack
28+
url-base: https://github.com/bacnet-stack
29+
- name: zephyrproject-rtos
30+
url-base: https://github.com/zephyrproject-rtos
31+
32+
defaults:
33+
remote: bacnet-stack
34+
35+
self:
36+
path: bacnet
37+
38+
projects:
39+
- name: bacnet-stack
40+
path: bacnet/stack # Hidden by bacnet/.gitignore
41+
revision: master
42+
- name: zephyr
43+
path: zephyr
44+
revision: v3.7.1
45+
remote: zephyrproject-rtos
46+
west-commands: scripts/west-commands.yml
47+
import:
48+
name-allowlist:
49+
- cmsis
50+
- picolibc
51+
- hal_stm32

0 commit comments

Comments
 (0)