From 4ef7ee2156924c3f5584ed7a331574189b6eca4a Mon Sep 17 00:00:00 2001 From: erlingrj Date: Thu, 13 Feb 2025 09:32:57 +0100 Subject: [PATCH 01/18] test RIOT template --- .github/workflows/riot.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/riot.yml b/.github/workflows/riot.yml index 04ac96b8..30751d5c 100644 --- a/.github/workflows/riot.yml +++ b/.github/workflows/riot.yml @@ -33,3 +33,6 @@ jobs: - name: Build examples working-directory: ${{ github.workspace }}/examples/riot run: ./buildAll.sh + + - name: Test template repository + uses: lf-lang/lf-riot-uc-template/.github/actions/run-tests@ci From 6222dc6fb2f94af6ff955fd0afcda5065a0e6371 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Thu, 13 Feb 2025 10:34:03 +0100 Subject: [PATCH 02/18] CI --- .github/workflows/riot.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/riot.yml b/.github/workflows/riot.yml index 30751d5c..6b027472 100644 --- a/.github/workflows/riot.yml +++ b/.github/workflows/riot.yml @@ -33,6 +33,13 @@ jobs: - name: Build examples working-directory: ${{ github.workspace }}/examples/riot run: ./buildAll.sh - + + - name: Clone template repository + run: git clone https://github.com/lf-lang/lf-riot-uc-template -b ci + - name: Test template repository - uses: lf-lang/lf-riot-uc-template/.github/actions/run-tests@ci + uses: ./.github/actions/run-tests + with: + template-path: ${{ github.workspace}}/lf-riot-uc-template + + From 05affc9281a74e2ecfcbf6f611f5d4cb4e2c72f0 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Thu, 13 Feb 2025 10:53:22 +0100 Subject: [PATCH 03/18] Fix path --- .github/workflows/riot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/riot.yml b/.github/workflows/riot.yml index 6b027472..6a727ccd 100644 --- a/.github/workflows/riot.yml +++ b/.github/workflows/riot.yml @@ -38,7 +38,7 @@ jobs: run: git clone https://github.com/lf-lang/lf-riot-uc-template -b ci - name: Test template repository - uses: ./.github/actions/run-tests + uses: ./lf-riot-uc-template/.github/actions/run-tests with: template-path: ${{ github.workspace}}/lf-riot-uc-template From 8c6ed84f6ecef2d19f53b9e3d179c20988168722 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Thu, 13 Feb 2025 11:05:17 +0100 Subject: [PATCH 04/18] Debug CI --- .github/workflows/riot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/riot.yml b/.github/workflows/riot.yml index 6a727ccd..f42bfa46 100644 --- a/.github/workflows/riot.yml +++ b/.github/workflows/riot.yml @@ -37,6 +37,10 @@ jobs: - name: Clone template repository run: git clone https://github.com/lf-lang/lf-riot-uc-template -b ci + # Uncomment to SSH into the runner. + - name: Setup upterm session + uses: lhotari/action-upterm@v1 + # if: matrix.platform == 'macos-latest' - name: Test template repository uses: ./lf-riot-uc-template/.github/actions/run-tests with: From 539f7cdb2412322d42c53f570d12e99be908fbf2 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Thu, 13 Feb 2025 11:30:34 +0100 Subject: [PATCH 05/18] CI --- .github/workflows/riot.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/riot.yml b/.github/workflows/riot.yml index f42bfa46..62617f8c 100644 --- a/.github/workflows/riot.yml +++ b/.github/workflows/riot.yml @@ -36,14 +36,8 @@ jobs: - name: Clone template repository run: git clone https://github.com/lf-lang/lf-riot-uc-template -b ci - - # Uncomment to SSH into the runner. - - name: Setup upterm session - uses: lhotari/action-upterm@v1 - # if: matrix.platform == 'macos-latest' + - name: Test template repository - uses: ./lf-riot-uc-template/.github/actions/run-tests - with: - template-path: ${{ github.workspace}}/lf-riot-uc-template + run: ./lf-riot-uc-template/.github/scripts/run-all.sh From 4cd9db1e0bf0a9030bea526dd40b056cfd964e09 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Thu, 13 Feb 2025 11:43:12 +0100 Subject: [PATCH 06/18] Setup zephyr template CI --- .github/actions/zephyr/action.yml | 25 ++++++++++++++++--------- .github/workflows/zephyr.yml | 4 ++++ 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/actions/zephyr/action.yml b/.github/actions/zephyr/action.yml index fc83fe52..01307075 100644 --- a/.github/actions/zephyr/action.yml +++ b/.github/actions/zephyr/action.yml @@ -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: @@ -38,23 +44,24 @@ 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 + west zephyr-export + pip install -r deps/zephyr/scripts/requirements.txt + echo "ZEPHYR_BASE=/opt/lf-zephyr-uc-template/deps/zephyr" >> $GITHUB_ENV + echo "ZEPHYR_TEMPLATE_DIR=/opt/lf-zephyr-uc-template" >> $GITHUB_ENV 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_SDK_INSTALL_DIR=/opt/zephyr-sdk-${{env.SDK_VERSION}}/" >> $GITHUB_ENV - cd /opt/lf-west-template - west zephyr-export - pip install -r deps/zephyr/scripts/requirements.txt shell: bash \ No newline at end of file diff --git a/.github/workflows/zephyr.yml b/.github/workflows/zephyr.yml index b7f2d495..a712f7d0 100644 --- a/.github/workflows/zephyr.yml +++ b/.github/workflows/zephyr.yml @@ -25,3 +25,7 @@ jobs: working-directory: ${{ github.workspace }}/examples/zephyr run: ./buildAll.sh + - name: Run template tests + working-directory: $ {{ github.env.ZEPHYR_TEMPLATE_DIR }} + run: ./.github/scripts/runAll.sh + From 42463067e08340d3bbe8533980667c42c766b2c1 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Thu, 13 Feb 2025 11:43:47 +0100 Subject: [PATCH 07/18] Path --- .github/workflows/riot.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/riot.yml b/.github/workflows/riot.yml index 62617f8c..5c0cf537 100644 --- a/.github/workflows/riot.yml +++ b/.github/workflows/riot.yml @@ -38,6 +38,7 @@ jobs: run: git clone https://github.com/lf-lang/lf-riot-uc-template -b ci - name: Test template repository - run: ./lf-riot-uc-template/.github/scripts/run-all.sh + working-directory: ${{ github.workspace }}/lf-riot-uc-template + run: ./.github/scripts/run-all.sh From 2e18688fb2470ce8b592e4c0588dee02a4829671 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Thu, 13 Feb 2025 11:50:40 +0100 Subject: [PATCH 08/18] Test pico-template in CI --- .github/workflows/pico.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pico.yml b/.github/workflows/pico.yml index c5fb8c58..ee7dd42b 100644 --- a/.github/workflows/pico.yml +++ b/.github/workflows/pico.yml @@ -21,4 +21,10 @@ jobs: run: | cmake -Bbuild && cd build make - \ No newline at end of file + + - name: Clone template repository + run: git clone https://github.com/lf-lang/lf-pico-uc-template + + - name: Test template repository + working-directory: ${{ github.workspace }}/lf-pico-uc-template + run: ./.github/scripts/run-all.sh \ No newline at end of file From b5f248815719faa1244b6b8ac2cf40b0688a88d2 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Thu, 13 Feb 2025 11:56:42 +0100 Subject: [PATCH 09/18] Clone riot template recursively --- .github/workflows/riot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/riot.yml b/.github/workflows/riot.yml index 5c0cf537..a15c699d 100644 --- a/.github/workflows/riot.yml +++ b/.github/workflows/riot.yml @@ -35,7 +35,7 @@ jobs: run: ./buildAll.sh - name: Clone template repository - run: git clone https://github.com/lf-lang/lf-riot-uc-template -b ci + run: git clone https://github.com/lf-lang/lf-riot-uc-template -b ci --recursive - name: Test template repository working-directory: ${{ github.workspace }}/lf-riot-uc-template From e57bb2050262f038cc702cdc1975edb331362e37 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Thu, 13 Feb 2025 12:02:39 +0100 Subject: [PATCH 10/18] Clone pico recursively --- .github/workflows/pico.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pico.yml b/.github/workflows/pico.yml index ee7dd42b..bd4dddf2 100644 --- a/.github/workflows/pico.yml +++ b/.github/workflows/pico.yml @@ -23,7 +23,7 @@ jobs: make - name: Clone template repository - run: git clone https://github.com/lf-lang/lf-pico-uc-template + run: git clone https://github.com/lf-lang/lf-pico-uc-template --recursive - name: Test template repository working-directory: ${{ github.workspace }}/lf-pico-uc-template From 10d47ce6d2dd0be7311cba318ccf2281e07e9342 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Thu, 13 Feb 2025 12:14:04 +0100 Subject: [PATCH 11/18] CI --- .github/actions/lingua-franca/action.yml | 4 ++++ .github/workflows/pico.yml | 5 ++++- .github/workflows/riot.yml | 6 +++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/actions/lingua-franca/action.yml b/.github/actions/lingua-franca/action.yml index 44f933c4..37dfd0c9 100644 --- a/.github/actions/lingua-franca/action.yml +++ b/.github/actions/lingua-franca/action.yml @@ -10,3 +10,7 @@ runs: java-version: 17 - name: Gradle Build Action uses: gradle/gradle-build-action@v2.8.0 + + - name: Ignore github host key verification + run: echo "StrictHostKeyChecking no" >> ~/.ssh/config + shell: bash diff --git a/.github/workflows/pico.yml b/.github/workflows/pico.yml index bd4dddf2..da11afb2 100644 --- a/.github/workflows/pico.yml +++ b/.github/workflows/pico.yml @@ -23,7 +23,10 @@ jobs: make - name: Clone template repository - run: git clone https://github.com/lf-lang/lf-pico-uc-template --recursive + uses: actions/checkout@v3 + with: + repository: lf-lang/lf-pico-uc-template + submodules: recursive - name: Test template repository working-directory: ${{ github.workspace }}/lf-pico-uc-template diff --git a/.github/workflows/riot.yml b/.github/workflows/riot.yml index a15c699d..bc33ce17 100644 --- a/.github/workflows/riot.yml +++ b/.github/workflows/riot.yml @@ -35,7 +35,11 @@ jobs: run: ./buildAll.sh - name: Clone template repository - run: git clone https://github.com/lf-lang/lf-riot-uc-template -b ci --recursive + uses: actions/checkout@v3 + with: + repository: lf-lang/lf-riot-uc-template + submodules: recursive + - name: Test template repository working-directory: ${{ github.workspace }}/lf-riot-uc-template From 89d9fb1f5a9e87dcfa93fe32dc115ba423c2f823 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Thu, 13 Feb 2025 12:16:46 +0100 Subject: [PATCH 12/18] CI --- .github/actions/lingua-franca/action.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/actions/lingua-franca/action.yml b/.github/actions/lingua-franca/action.yml index 37dfd0c9..44f933c4 100644 --- a/.github/actions/lingua-franca/action.yml +++ b/.github/actions/lingua-franca/action.yml @@ -10,7 +10,3 @@ runs: java-version: 17 - name: Gradle Build Action uses: gradle/gradle-build-action@v2.8.0 - - - name: Ignore github host key verification - run: echo "StrictHostKeyChecking no" >> ~/.ssh/config - shell: bash From bfa99c6649ec616d337b364468c8d0fa45a4f0d3 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Thu, 13 Feb 2025 12:21:55 +0100 Subject: [PATCH 13/18] CI --- .github/workflows/pico.yml | 1 + .github/workflows/riot.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/pico.yml b/.github/workflows/pico.yml index da11afb2..64637964 100644 --- a/.github/workflows/pico.yml +++ b/.github/workflows/pico.yml @@ -27,6 +27,7 @@ jobs: 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 diff --git a/.github/workflows/riot.yml b/.github/workflows/riot.yml index bc33ce17..985f2116 100644 --- a/.github/workflows/riot.yml +++ b/.github/workflows/riot.yml @@ -39,6 +39,7 @@ jobs: with: repository: lf-lang/lf-riot-uc-template submodules: recursive + path: lf-riot-uc-template - name: Test template repository From 0f7399efc9748e46959979b08c747faca2144c45 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Thu, 13 Feb 2025 12:44:02 +0100 Subject: [PATCH 14/18] CI --- .github/workflows/pico.yml | 2 ++ .github/workflows/riot.yml | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pico.yml b/.github/workflows/pico.yml index 64637964..0e42904d 100644 --- a/.github/workflows/pico.yml +++ b/.github/workflows/pico.yml @@ -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 diff --git a/.github/workflows/riot.yml b/.github/workflows/riot.yml index 985f2116..0260ad40 100644 --- a/.github/workflows/riot.yml +++ b/.github/workflows/riot.yml @@ -41,7 +41,6 @@ jobs: 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 From d37babe889edcf78a1cab6b7d1bd04dd4aa394e8 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Thu, 13 Feb 2025 13:03:39 +0100 Subject: [PATCH 15/18] CI --- .github/workflows/zephyr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/zephyr.yml b/.github/workflows/zephyr.yml index a712f7d0..54585b1f 100644 --- a/.github/workflows/zephyr.yml +++ b/.github/workflows/zephyr.yml @@ -26,6 +26,6 @@ jobs: run: ./buildAll.sh - name: Run template tests - working-directory: $ {{ github.env.ZEPHYR_TEMPLATE_DIR }} + working-directory: ${{env.ZEPHYR_TEMPLATE_DIR}} run: ./.github/scripts/runAll.sh From fc5cabfc8b0ba18a5ef3a413bb776f2ae48fdb9a Mon Sep 17 00:00:00 2001 From: erlingrj Date: Thu, 13 Feb 2025 13:09:02 +0100 Subject: [PATCH 16/18] CI --- .github/actions/zephyr/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/zephyr/action.yml b/.github/actions/zephyr/action.yml index 01307075..a2bc5daf 100644 --- a/.github/actions/zephyr/action.yml +++ b/.github/actions/zephyr/action.yml @@ -55,13 +55,13 @@ runs: west update west zephyr-export pip install -r deps/zephyr/scripts/requirements.txt - echo "ZEPHYR_BASE=/opt/lf-zephyr-uc-template/deps/zephyr" >> $GITHUB_ENV - echo "ZEPHYR_TEMPLATE_DIR=/opt/lf-zephyr-uc-template" >> $GITHUB_ENV 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-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 shell: bash \ No newline at end of file From 75d6bee6caa357428a74abf34f626193cfe2919c Mon Sep 17 00:00:00 2001 From: erlingrj Date: Thu, 13 Feb 2025 13:14:37 +0100 Subject: [PATCH 17/18] CI --- .github/actions/zephyr/action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/zephyr/action.yml b/.github/actions/zephyr/action.yml index a2bc5daf..fde8ddba 100644 --- a/.github/actions/zephyr/action.yml +++ b/.github/actions/zephyr/action.yml @@ -53,8 +53,6 @@ runs: cd /opt git clone https://github.com/lf-lang/lf-zephyr-uc-template && cd lf-zephyr-uc-template west update - west zephyr-export - pip install -r deps/zephyr/scripts/requirements.txt shell: bash - name: Setup environment variables @@ -64,4 +62,7 @@ runs: 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-zephyr-uc-template + west zephyr-export + pip install -r deps/zephyr/scripts/requirements.txt shell: bash \ No newline at end of file From 5af1b2060d05608cb287f809cdd40f61f34e162a Mon Sep 17 00:00:00 2001 From: erlingrj Date: Thu, 13 Feb 2025 13:23:50 +0100 Subject: [PATCH 18/18] Last CI, promise --- .github/workflows/zephyr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/zephyr.yml b/.github/workflows/zephyr.yml index 54585b1f..d412f905 100644 --- a/.github/workflows/zephyr.yml +++ b/.github/workflows/zephyr.yml @@ -27,5 +27,5 @@ jobs: - name: Run template tests working-directory: ${{env.ZEPHYR_TEMPLATE_DIR}} - run: ./.github/scripts/runAll.sh + run: ./.github/scripts/run-all.sh