Skip to content

Commit 59c5050

Browse files
committed
tests_hw: Remove native_sim tests, merge files
Removes zephyr native_sim tests as they are redundent in the overall CI pipeline. At this point the Raspberry Pi test file is redundant so removed references to it and added the runner to the linux tests file. Also seperated the test-coverage job from the rest of the Linux tests to prevent this step from being run more than once. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
1 parent e03ff98 commit 59c5050

3 files changed

Lines changed: 55 additions & 102 deletions

File tree

.github/workflows/hardware-rp5.yml

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -12,47 +12,7 @@ concurrency:
1212
on:
1313
workflow_call:
1414

15-
1615
jobs:
17-
setup-local-runner:
18-
name: Setup local runner
19-
runs-on: "ocre-raspberrypi"
20-
21-
steps:
22-
- name: Clean other workspace
23-
run: rm -rf ../.west
24-
25-
- name: Clean workspace
26-
run: find . -name . -o -prune -exec rm -rf -- {} +
27-
28-
- name: Install Dependencies
29-
run: |
30-
sudo apt update
31-
sudo apt upgrade
32-
sudo apt install --no-install-recommends git cmake ninja-build gperf \
33-
ccache dfu-util device-tree-compiler wget python3-dev python3-venv python3-tk \
34-
xz-utils file make gcc gcc-multilib g++-multilib libsdl2-dev libmagic1 curl
35-
36-
- name: Checkout
37-
uses: actions/checkout@v4
38-
with:
39-
path: ocre-runtime
40-
submodules: true
41-
42-
- name: Setup Zephyr project
43-
uses: zephyrproject-rtos/action-zephyr-setup@v1
44-
with:
45-
app-path: ocre-runtime
46-
sdk-version: 0.16.8
47-
48-
- name: West Setup
49-
run: |
50-
ls -lah
51-
ls -lah *
52-
west init -l ocre-runtime
53-
west update
54-
west packages pip --install
55-
5616
build-and-run-linux:
5717
name: Build and Run
5818
runs-on: "ocre-raspberrypi"
@@ -100,34 +60,3 @@ jobs:
10060
echo "[ERROR] Expected log not found: $EXPECTED_LOG"
10161
exit 1
10262
fi
103-
104-
105-
zephyr-native-sim-build-and-run:
106-
name: Build
107-
runs-on: "ocre-raspberrypi"
108-
strategy:
109-
matrix:
110-
app:
111-
- mini
112-
- demo
113-
114-
steps:
115-
- name: West build
116-
run: |
117-
source .venv/bin/activate
118-
west build -p always -b native_sim/native/64 ocre-runtime/src/samples/${{ matrix.app }}/zephyr
119-
120-
- name: Run ${{ matrix.app }} on ${{ matrix.board }}
121-
run: |
122-
EXPECTED_LOG="powered by Ocre"
123-
echo "Running application..."
124-
chmod +x zephyr/zephyr.exe
125-
stdbuf -oL -eL timeout 20s ./zephyr/zephyr.exe | tee zephyr_run.log
126-
echo "===== Checking for expected log ====="
127-
if grep -q "$EXPECTED_LOG" zephyr_run.log; then
128-
echo "[OK] Found expected log: $EXPECTED_LOG"
129-
else
130-
echo "[ERROR] Expected log not found: $EXPECTED_LOG"
131-
exit 1
132-
fi
133-

.github/workflows/linux.yml

Lines changed: 49 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66
name: Linux
77

8+
concurrency:
9+
group: pr-workflows
10+
cancel-in-progress: false
11+
812
on:
913
workflow_call:
1014
inputs:
@@ -17,10 +21,13 @@ on:
1721
jobs:
1822
build-and-run-linux:
1923
name: Build and Run
20-
runs-on: ["self-hosted", "build-server"]
24+
runs-on: ${{ matrix.run-target }}
2125
container:
2226
image: ghcr.io/${{ github.repository }}/devcontainer-linux:${{ inputs.devcontainer-tag }}
2327
options: --user 1000:1000
28+
strategy:
29+
matrix:
30+
run-target: [["self-hosted", "build-server"], ocre-raspberrypi]
2431
steps:
2532
- name: Clean other workspace
2633
run: rm -rf ../.west
@@ -57,29 +64,6 @@ jobs:
5764
- name: Delete build directory
5865
run: rm -rf build
5966

60-
- name: Configure (test coverage)
61-
run: mkdir build && cd build && cmake ../tests/coverage
62-
63-
- name: Build and run (test coverage)
64-
working-directory: build
65-
run: make coverage report.md
66-
67-
- name: Upload coverage report
68-
uses: actions/upload-artifact@v4
69-
with:
70-
name: ocre-coverage
71-
include-hidden-files: true
72-
path: build/coverage
73-
74-
- name: Report code coverage
75-
uses: marocchino/sticky-pull-request-comment@v3
76-
with:
77-
GITHUB_TOKEN: ${{ secrets.TOKEN_WRITE_PR }}
78-
path: build/report.md
79-
80-
- name: Delete build directory
81-
run: rm -rf build
82-
8367
- name: Configure
8468
run: mkdir build && cd build && cmake ..
8569

@@ -114,3 +98,44 @@ jobs:
11498
echo "[ERROR] Expected log not found: $EXPECTED_LOG"
11599
exit 1
116100
fi
101+
102+
post-code-coverage:
103+
name: Post Code Test Coverage
104+
runs-on: ["self-hosted", "build-server"]
105+
container:
106+
image: ghcr.io/${{ github.repository }}/devcontainer-linux:${{ inputs.devcontainer-tag }}
107+
options: --user 1000:1000
108+
steps:
109+
- name: Clean other workspace
110+
run: rm -rf ../.west
111+
112+
- name: Clean workspace
113+
run: find . -name . -o -prune -exec rm -rf -- {} +
114+
115+
- name: Checkout
116+
uses: actions/checkout@v4
117+
with:
118+
submodules: true
119+
120+
- name: Delete build directory
121+
run: rm -rf build
122+
123+
- name: Configure (test coverage)
124+
run: mkdir build && cd build && cmake ../tests/coverage
125+
126+
- name: Build and run (test coverage)
127+
working-directory: build
128+
run: make coverage report.md
129+
130+
- name: Upload coverage report
131+
uses: actions/upload-artifact@v4
132+
with:
133+
name: ocre-coverage
134+
include-hidden-files: true
135+
path: build/coverage
136+
137+
- name: Report code coverage
138+
uses: marocchino/sticky-pull-request-comment@v3
139+
with:
140+
GITHUB_TOKEN: ${{ secrets.TOKEN_WRITE_PR }}
141+
path: build/report.md

.github/workflows/main.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,9 @@ jobs:
8282
with:
8383
devcontainer-tag: ${{ needs.zephyr-devcontainer.outputs.devcontainer-tag }}
8484

85-
hardware-raspberry_pi:
86-
name: Hardware Raspberry Pi 5
87-
needs:
88-
- linux
89-
uses: ./.github/workflows/hardware-rp5.yml
90-
secrets: inherit
91-
85+
# hardware-raspberry_pi:
86+
# name: Hardware Raspberry Pi 5
87+
# # needs:
88+
# # - linux
89+
# uses: ./.github/workflows/hardware-rp5.yml
90+
# secrets: inherit

0 commit comments

Comments
 (0)