Skip to content

Commit 68f55b4

Browse files
committed
Merge branch 'main' of github.com:mgeeIOL/ocre-runtime into test-initial-basic-rp5-tests
2 parents 237ea39 + 111708d commit 68f55b4

28 files changed

Lines changed: 117 additions & 114 deletions

.github/workflows/devcontainer-linux.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ on:
1414
jobs:
1515
necessary:
1616
name: Necessary?
17-
runs-on: ["self-hosted", "build-server"]
17+
runs-on: ubuntu-24.04
1818
outputs:
19-
build: ${{ steps.changed-files.outputs.all_changed_and_modified_files != '' }}
19+
build: ${{ github.event_name == 'workflow_dispatch' || steps.changed-files.outputs.all_changed_and_modified_files != '' }}
2020
devcontainer-tag: ${{ steps.devcontainer-tag.outputs.tag }}
2121

2222
steps:
@@ -26,7 +26,7 @@ jobs:
2626
- name: Clean workspace
2727
run: find . -name . -o -prune -exec rm -rf -- {} +
2828

29-
- uses: actions/checkout@v4
29+
- uses: actions/checkout@v6
3030
with:
3131
fetch-depth: 0
3232

@@ -45,27 +45,28 @@ jobs:
4545
4646
build-push:
4747
name: Build and push
48+
timeout-minutes: 300
4849
if: ${{ needs.necessary.outputs.build == 'true' }}
4950
needs:
5051
- necessary
51-
runs-on: ["self-hosted", "build-server"]
52+
runs-on: ubuntu-24.04
5253

5354
steps:
5455
- name: Checkout the code
55-
uses: actions/checkout@v4
56+
uses: actions/checkout@v6
5657

5758
- name: Set up Docker Buildx
58-
uses: docker/setup-buildx-action@v3
59+
uses: docker/setup-buildx-action@v4
5960

6061
- name: Login to Github Registry
61-
uses: docker/login-action@v3
62+
uses: docker/login-action@v4
6263
with:
6364
username: ${{ github.actor }}
6465
password: ${{ github.token }}
6566
registry: ghcr.io
6667

6768
- name: Build and push
68-
uses: docker/build-push-action@v5
69+
uses: docker/build-push-action@v7
6970
with:
7071
context: .devcontainer/linux
7172
file: .devcontainer/linux/Dockerfile

.github/workflows/devcontainer-zephyr.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ on:
1414
jobs:
1515
necessary:
1616
name: Necessary?
17-
runs-on: ["self-hosted", "build-server"]
17+
runs-on: ubuntu-24.04
1818
outputs:
19-
build: ${{ steps.changed-files.outputs.all_changed_and_modified_files != '' }}
19+
build: ${{ github.event_name == 'workflow_dispatch' || steps.changed-files.outputs.all_changed_and_modified_files != '' }}
2020
devcontainer-tag: ${{ steps.devcontainer-tag.outputs.tag }}
2121

2222
steps:
@@ -26,7 +26,7 @@ jobs:
2626
- name: Clean workspace
2727
run: find . -name . -o -prune -exec rm -rf -- {} +
2828

29-
- uses: actions/checkout@v4
29+
- uses: actions/checkout@v6
3030
with:
3131
fetch-depth: 0
3232

@@ -46,28 +46,28 @@ jobs:
4646
4747
build-push:
4848
name: Build and push
49-
timeout-minutes: 60
49+
timeout-minutes: 300
5050
if: ${{ needs.necessary.outputs.build == 'true' }}
5151
needs:
5252
- necessary
53-
runs-on: ["self-hosted", "build-server"]
53+
runs-on: ubuntu-24.04
5454

5555
steps:
5656
- name: Checkout the code
57-
uses: actions/checkout@v4
57+
uses: actions/checkout@v6
5858

5959
- name: Set up Docker Buildx
60-
uses: docker/setup-buildx-action@v3
60+
uses: docker/setup-buildx-action@v4
6161

6262
- name: Login to Github Registry
63-
uses: docker/login-action@v3
63+
uses: docker/login-action@v4
6464
with:
6565
username: ${{ github.actor }}
6666
password: ${{ github.token }}
6767
registry: ghcr.io
6868

6969
- name: Build and push
70-
uses: docker/build-push-action@v5
70+
uses: docker/build-push-action@v7
7171
with:
7272
context: .
7373
file: .devcontainer/zephyr/Dockerfile

.github/workflows/formatting-checks.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,24 @@ on:
1717
jobs:
1818
format-checks:
1919
name: Formatting checks
20-
runs-on: ["self-hosted", "build-server"]
20+
runs-on: ubuntu-24.04
2121
container:
2222
image: ghcr.io/${{ github.repository }}/devcontainer-linux:${{ inputs.devcontainer-tag }}
23-
options: --user 1000:1000
2423
steps:
2524
- name: Clean other workspace
2625
run: rm -rf ../.west
2726

2827
- name: Clean workspace
2928
run: find . -name . -o -prune -exec rm -rf -- {} +
3029

31-
- name: checkout
32-
uses: actions/checkout@v5
30+
- name: Checkout
31+
uses: actions/checkout@v6
3332
with:
3433
fetch-depth: 0
3534

35+
- name: Configure git safe directory
36+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
37+
3638
- name: Run C Format Checks
3739
run: sh scripts/check_c_formatting.sh
3840

.github/workflows/hardware-bu585.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
continue-on-error: true
5858

5959
- name: Checkout
60-
uses: actions/checkout@v4
60+
uses: actions/checkout@v6
6161
with:
6262
path: ocre-runtime
6363
submodules: recursive
@@ -107,7 +107,7 @@ jobs:
107107
find . -name . -o -prune -exec rm -rf -- {} +
108108
109109
- name: Checkout
110-
uses: actions/checkout@v4
110+
uses: actions/checkout@v6
111111
with:
112112
path: ocre-runtime
113113
submodules: recursive
@@ -137,7 +137,7 @@ jobs:
137137

138138
steps:
139139
- name: Checkout
140-
uses: actions/checkout@v4
140+
uses: actions/checkout@v6
141141

142142
- name: Run mini sample Test Case
143143
run: |
@@ -167,7 +167,7 @@ jobs:
167167
find . -name . -o -prune -exec rm -rf -- {} +
168168
169169
- name: Checkout
170-
uses: actions/checkout@v4
170+
uses: actions/checkout@v6
171171
with:
172172
path: ocre-runtime
173173
submodules: recursive
@@ -197,7 +197,7 @@ jobs:
197197

198198
steps:
199199
- name: Checkout
200-
uses: actions/checkout@v4
200+
uses: actions/checkout@v6
201201

202202
- name: Run Demo Sample Test Case
203203
run: |
@@ -227,7 +227,7 @@ jobs:
227227
find . -name . -o -prune -exec rm -rf -- {} +
228228
229229
- name: Checkout
230-
uses: actions/checkout@v4
230+
uses: actions/checkout@v6
231231
with:
232232
path: ocre-runtime
233233
submodules: recursive
@@ -263,7 +263,7 @@ jobs:
263263

264264
steps:
265265
- name: Checkout
266-
uses: actions/checkout@v4
266+
uses: actions/checkout@v6
267267

268268
- name: Supervisor ${{ matrix.test.name }} Testcase
269269
run: |

.github/workflows/linux.yml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,9 @@ on:
2121
jobs:
2222
build-and-run-linux:
2323
name: Build and Run
24-
runs-on: ${{ matrix.run-target }}
24+
runs-on: ubuntu-24.04
2525
container:
2626
image: ghcr.io/${{ github.repository }}/devcontainer-linux:${{ inputs.devcontainer-tag }}
27-
options: --user 1000:1000
28-
strategy:
29-
matrix:
30-
run-target: [["self-hosted", "build-server"], ocre-raspberrypi]
3127
steps:
3228
- name: Clean other workspace
3329
run: rm -rf ../.west
@@ -36,10 +32,13 @@ jobs:
3632
run: find . -name . -o -prune -exec rm -rf -- {} +
3733

3834
- name: Checkout
39-
uses: actions/checkout@v4
35+
uses: actions/checkout@v6
4036
with:
4137
submodules: true
4238

39+
- name: Configure git safe directory
40+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
41+
4342
- name: Configure (system tests)
4443
run: mkdir build && cd build && cmake ../tests/system/posix
4544

@@ -64,6 +63,30 @@ jobs:
6463
- name: Delete build directory
6564
run: rm -rf build
6665

66+
- name: Configure (test coverage)
67+
run: mkdir build && cd build && cmake ../tests/coverage
68+
69+
- name: Build and run (test coverage)
70+
working-directory: build
71+
run: make coverage report.md
72+
73+
- name: Upload coverage report
74+
uses: actions/upload-artifact@v4
75+
with:
76+
name: ocre-coverage
77+
include-hidden-files: true
78+
path: build/coverage
79+
80+
- name: Report code coverage
81+
if: github.event.pull_request.head.repo.full_name == github.repository
82+
uses: marocchino/sticky-pull-request-comment@v3
83+
with:
84+
GITHUB_TOKEN: ${{ secrets.TOKEN_WRITE_PR }}
85+
path: build/report.md
86+
87+
- name: Delete build directory
88+
run: rm -rf build
89+
6790
- name: Configure
6891
run: mkdir build && cd build && cmake ..
6992

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
push:
1616
branches:
1717
- main
18+
workflow_dispatch:
1819

1920
concurrency:
2021
group: ${{ github.repository }}-${{ github.workflow }}@main-${{ github.ref }}
@@ -75,6 +76,7 @@ jobs:
7576

7677
hardware-b_u585i_iot02a:
7778
name: Hardware b_u585i_iot02a
79+
if: github.repository == 'project-ocre/ocre-runtime'
7880
needs:
7981
- zephyr-devcontainer
8082
uses: ./.github/workflows/hardware-bu585.yml

.github/workflows/zephyr-systests.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ on:
1717
jobs:
1818
zephyr-systests:
1919
name: Build and Run System Tests
20-
runs-on: ["self-hosted", "build-server"]
20+
runs-on: ubuntu-24.04
2121
container:
2222
image: ghcr.io/${{ github.repository }}/devcontainer-zephyr:${{ inputs.devcontainer-tag }}
23-
options: --user 1000:1000
2423
strategy:
2524
fail-fast: false
2625
matrix:
@@ -37,11 +36,14 @@ jobs:
3736
run: find . -name . -o -prune -exec rm -rf -- {} +
3837

3938
- name: Checkout
40-
uses: actions/checkout@v4
39+
uses: actions/checkout@v6
4140
with:
4241
path: ocre-runtime
4342
submodules: true
4443

44+
- name: Configure git safe directory
45+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE/ocre-runtime"
46+
4547
- name: West init
4648
run: |
4749
. /opt/zephyr-venv/bin/activate

.github/workflows/zephyr.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ on:
1717
jobs:
1818
build-zephyr:
1919
name: Build
20-
runs-on: ["self-hosted", "build-server"]
20+
runs-on: ubuntu-24.04
2121
container:
2222
image: ghcr.io/${{ github.repository }}/devcontainer-zephyr:${{ inputs.devcontainer-tag }}
23-
options: --user 1000:1000
2423
strategy:
2524
matrix:
2625
board:
@@ -39,11 +38,14 @@ jobs:
3938
run: find . -name . -o -prune -exec rm -rf -- {} +
4039

4140
- name: Checkout
42-
uses: actions/checkout@v4
41+
uses: actions/checkout@v6
4342
with:
4443
path: ocre-runtime
4544
submodules: true
4645

46+
- name: Configure git safe directory
47+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE/ocre-runtime"
48+
4749
- name: West init
4850
run: |
4951
. /opt/zephyr-venv/bin/activate
@@ -80,10 +82,9 @@ jobs:
8082
run-zephyr:
8183
name: Run
8284
needs: build-zephyr
83-
runs-on: ["self-hosted", "build-server"]
85+
runs-on: ubuntu-24.04
8486
container:
8587
image: ghcr.io/${{ github.repository }}/devcontainer-zephyr:${{ inputs.devcontainer-tag }}
86-
options: --user 1000:1000
8788
strategy:
8889
matrix:
8990
board:

docs/boards/zephyr/b_u585i_iot02a.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,24 @@ west build -p always -b b_u585i_iot02a --shield enc28j60 src/samples/supervisor/
103103

104104
Replace `enc28j60` with `wiznet_w5500` if WIZnet W5500 ethernet shield is used.
105105

106+
### AoT
107+
108+
For building AoT files use [wamrc](https://github.com/bytecodealliance/wasm-micro-runtime/tree/main/wamr-compiler) with following configuration:
109+
110+
```bash
111+
wamrc --cpu=cortex-m33 --target=thumbv8m.main --target-abi=eabihf -o hello-world.aot hello-world.wasm
112+
```
113+
114+
Make sure to build wamrc in the wasm-micro-runtime submodule, not a separate clone, in order to match the versions.
115+
116+
Since we use here hard-float ABI, make sure you enable FPU in boards' config. Additionally, MPU has to be disabled (or configured), since it might affect running AoT images from external memory. Furthermore, AoT config from Ocre has to be enabled. Hence, the necessary configuration shall include:
117+
118+
```
119+
CONFIG_ARM_MPU=n
120+
CONFIG_FPU=y
121+
CONFIG_OCRE_WAMR_AOT=y
122+
```
123+
106124
## Flashing
107125

108126
### First Flash (with Preloaded Images)

scripts/check_license_banner_c.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)