Skip to content

Commit

Permalink
Test RIOT, Zephyr and Pico templates in CI (#222)
Browse files Browse the repository at this point in the history
* test RIOT template

* CI

* Fix path

* Debug CI

* CI

* Setup zephyr template CI

* Path

* Test pico-template in CI

* Clone riot template recursively

* Clone pico recursively

* CI

* CI

* CI

* CI

* CI

* CI

* CI

* Last CI, promise
  • Loading branch information
erlingrj authored Feb 13, 2025
1 parent 641595f commit 01e4ce5
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 8 deletions.
22 changes: 15 additions & 7 deletions .github/actions/zephyr/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: Install and build Zephyr dependencies
description: Install and build Zephyr dependencies
inputs:
clone-template:
description: "Also clone and configure the lf-zephyr-uc-template"
required: true
default: "true"

runs:
using: "composite"
steps:
Expand Down Expand Up @@ -38,23 +44,25 @@ runs:
id: cache-zephyr-rtos
uses: actions/cache@v4
with:
path: /opt/lf-west-template
key: lf-west-template-${{ runner.os }}
path: /opt/lf-zephyr-uc-template
key: lf-zephyr-uc-template-${{ runner.os }}

- name: Download and install Zephyr RTOS with the lf-west-template
if: steps.cache-zephyr-rtos.outputs.cache-hit != 'true'
- name: Download and install Zephyr RTOS with the lf-zephyr-uc-template
if: steps.cache-zephyr-rtos.outputs.cache-hit != 'true' && inputs.clone-template == 'true'
run: |
cd /opt
git clone https://github.com/lf-lang/lf-west-template && cd lf-west-template
git clone https://github.com/lf-lang/lf-zephyr-uc-template && cd lf-zephyr-uc-template
west update
shell: bash

- name: Setup environment variables
run: |
cd "/opt/zephyr-sdk-${{env.SDK_VERSION}}"
sudo ./setup.sh -t all -h -c
echo "ZEPHYR_BASE=/opt/lf-west-template/deps/zephyr" >> $GITHUB_ENV
echo "ZEPHYR_BASE=/opt/lf-zephyr-uc-template/deps/zephyr" >> $GITHUB_ENV
echo "ZEPHYR_TEMPLATE_DIR=/opt/lf-zephyr-uc-template" >> $GITHUB_ENV
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-sdk-${{env.SDK_VERSION}}/" >> $GITHUB_ENV
cd /opt/lf-west-template
cd /opt/lf-zephyr-uc-template
west zephyr-export
pip install -r deps/zephyr/scripts/requirements.txt
shell: bash
14 changes: 13 additions & 1 deletion .github/workflows/pico.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ jobs:
ci:
name: Build examples
runs-on: ubuntu-24.04
env:
REACTOR_UC_PATH: ${{ github.workspace }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -21,4 +23,14 @@ jobs:
run: |
cmake -Bbuild && cd build
make
- name: Clone template repository
uses: actions/checkout@v3
with:
repository: lf-lang/lf-pico-uc-template
submodules: recursive
path: lf-pico-uc-template

- name: Test template repository
working-directory: ${{ github.workspace }}/lf-pico-uc-template
run: ./.github/scripts/run-all.sh
13 changes: 13 additions & 0 deletions .github/workflows/riot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,16 @@ jobs:
- name: Build examples
working-directory: ${{ github.workspace }}/examples/riot
run: ./buildAll.sh

- name: Clone template repository
uses: actions/checkout@v3
with:
repository: lf-lang/lf-riot-uc-template
submodules: recursive
path: lf-riot-uc-template

- name: Test template repository
working-directory: ${{ github.workspace }}/lf-riot-uc-template
run: ./.github/scripts/run-all.sh


4 changes: 4 additions & 0 deletions .github/workflows/zephyr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ jobs:
working-directory: ${{ github.workspace }}/examples/zephyr
run: ./buildAll.sh

- name: Run template tests
working-directory: ${{env.ZEPHYR_TEMPLATE_DIR}}
run: ./.github/scripts/run-all.sh

0 comments on commit 01e4ce5

Please sign in to comment.