Skip to content

Commit 1165464

Browse files
committed
add initial CI for zephyr
1 parent 70f2ff3 commit 1165464

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

.github/scripts/build-zephyr.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
# turn echo on and error on earliest command
4+
set -ex
5+
6+
# get shared variables
7+
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
8+
source $SCRIPT_DIR/defaults.sh
9+
10+
# install Zephyr dependencies
11+
git submodule update --init $LOCAL_CHIPYARD_DIR/software/zephyrproject/zephyr
12+
cd $LOCAL_CHIPYARD_DIR/software/zephyrproject/zephyr/
13+
west init -l .
14+
west config manifest.file west-riscv.yml
15+
west update
16+
west build -p -b chipyard_riscv64 samples/chipyard/hello_world/

.github/scripts/run-tests.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ case $1 in
173173
chipyard-tacit-rocket)
174174
run_binary LOADMEM=1 BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/dhrystone.riscv
175175
;;
176+
chipyard-zephyr)
177+
run_binary LOADMEM=1 BINARY=$LOCAL_CHIPYARD_DIR/software/zephyrproject/zephyr/build/zephyr/zephyr.elf
178+
;;
176179
icenet)
177180
run_binary BINARY=none
178181
;;

.github/workflows/chipyard-run-tests.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,34 @@ jobs:
558558
group-key: "group-cores"
559559
project-key: "chipyard-tacit-rocket"
560560

561+
chipyard-rocket-zephyr-run-tests:
562+
name: chipyard-rocket-zephyr-run-tests
563+
needs: prepare-chipyard-cores
564+
runs-on: as4
565+
steps:
566+
- name: Delete old checkout
567+
run: |
568+
ls -alh .
569+
rm -rf ${{ github.workspace }}/* || true
570+
rm -rf ${{ github.workspace }}/.* || true
571+
ls -alh .
572+
- name: Checkout
573+
uses: actions/checkout@v4
574+
- name: Git workaround
575+
uses: ./.github/actions/git-workaround
576+
- name: Create conda env
577+
uses: ./.github/actions/create-conda-env
578+
- name: Build zephyr hello world
579+
run: |
580+
conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)
581+
.github/scripts/build-zephyr.sh
582+
- name: Run tests
583+
uses: ./.github/actions/run-tests
584+
with:
585+
group-key: "group-cores"
586+
project-key: "chipyard-zephyr"
587+
588+
561589
chipyard-cva6-run-tests:
562590
name: chipyard-cva6-run-tests
563591
needs: prepare-chipyard-cores
@@ -1257,6 +1285,7 @@ jobs:
12571285
chipyard-shuttle-run-tests,
12581286
chipyard-shuttle3-run-tests,
12591287
chipyard-tacit-rocket-run-tests,
1288+
chipyard-rocket-zephyr-run-tests,
12601289
chipyard-cva6-run-tests,
12611290
chipyard-ibex-run-tests,
12621291
chipyard-vexiiriscv-run-tests,

0 commit comments

Comments
 (0)