From 1276e48dc9a7f414846e54744c03d4c9b05fd63f Mon Sep 17 00:00:00 2001 From: jmaralo Date: Thu, 16 Jan 2025 13:38:29 +0100 Subject: [PATCH 01/15] Revert ubuntu version on actions --- .github/workflows/c-cpp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 43c1e00ce..5e2a9401d 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: build_type: [hardware,simulator] - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - uses: carlosperate/arm-none-eabi-gcc-action@v1 @@ -36,7 +36,7 @@ jobs: Run-Tests: name: Run Simulator tests needs: build - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: Download test binary compressed From dd6bf93494de3943ac463de32d13d0cfd2e864cc Mon Sep 17 00:00:00 2001 From: jmaralo Date: Thu, 16 Jan 2025 14:33:04 +0100 Subject: [PATCH 02/15] Use cube-ctl instead of public arm-none-eabi-gcc --- .github/workflows/c-cpp.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 5e2a9401d..a435c1849 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -15,8 +15,7 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - - uses: carlosperate/arm-none-eabi-gcc-action@v1 - - run: arm-none-eabi-gcc --version + - run: mkdir /temp && cd /temp && git clone https://github.com/HyperloopUPV-H8/cubeclt.git && cd cubeclt && git lfs pull && chmod +x cubeclt_1.16.0_installer.sh && echo | LICENSE_ALREADY_ACCEPTED=1 ./cubeclt_1.16.0_installer.sh - name: Build run: ./tools/build.sh ${{matrix.build_type}} ## the following is because of this known limitation From 30d1f90f75c51badf7c6a855389a0a446b7e92e9 Mon Sep 17 00:00:00 2001 From: jmaralo Date: Thu, 16 Jan 2025 14:34:10 +0100 Subject: [PATCH 03/15] change path due to permissions --- .github/workflows/c-cpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index a435c1849..3c129fa34 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - - run: mkdir /temp && cd /temp && git clone https://github.com/HyperloopUPV-H8/cubeclt.git && cd cubeclt && git lfs pull && chmod +x cubeclt_1.16.0_installer.sh && echo | LICENSE_ALREADY_ACCEPTED=1 ./cubeclt_1.16.0_installer.sh + - run: mkdir /cube-install && cd /cube-install && git clone https://github.com/HyperloopUPV-H8/cubeclt.git && cd cubeclt && git lfs pull && chmod +x cubeclt_1.16.0_installer.sh && echo | LICENSE_ALREADY_ACCEPTED=1 ./cubeclt_1.16.0_installer.sh - name: Build run: ./tools/build.sh ${{matrix.build_type}} ## the following is because of this known limitation From 8f458e142e20362c8a7d63223109b5cc08aefc1d Mon Sep 17 00:00:00 2001 From: jmaralo Date: Thu, 16 Jan 2025 14:36:23 +0100 Subject: [PATCH 04/15] Run cube install commands as sudo --- .github/workflows/c-cpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 3c129fa34..ef9f3292d 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - - run: mkdir /cube-install && cd /cube-install && git clone https://github.com/HyperloopUPV-H8/cubeclt.git && cd cubeclt && git lfs pull && chmod +x cubeclt_1.16.0_installer.sh && echo | LICENSE_ALREADY_ACCEPTED=1 ./cubeclt_1.16.0_installer.sh + - run: sudo mkdir /cube-install && sudo cd /cube-install && sudo git clone https://github.com/HyperloopUPV-H8/cubeclt.git && sudo cd cubeclt && sudo git lfs pull && sudo chmod +x cubeclt_1.16.0_installer.sh && sudo echo | LICENSE_ALREADY_ACCEPTED=1 ./cubeclt_1.16.0_installer.sh - name: Build run: ./tools/build.sh ${{matrix.build_type}} ## the following is because of this known limitation From 614ba67f7efd8d3d678d0b192701bf2cc09211e8 Mon Sep 17 00:00:00 2001 From: jmaralo Date: Thu, 16 Jan 2025 14:39:01 +0100 Subject: [PATCH 05/15] Change how sudo is invoked --- .github/workflows/c-cpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index ef9f3292d..1a31795c6 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - - run: sudo mkdir /cube-install && sudo cd /cube-install && sudo git clone https://github.com/HyperloopUPV-H8/cubeclt.git && sudo cd cubeclt && sudo git lfs pull && sudo chmod +x cubeclt_1.16.0_installer.sh && sudo echo | LICENSE_ALREADY_ACCEPTED=1 ./cubeclt_1.16.0_installer.sh + - run: sudo -- sh -c 'mkdir /cube-install && cd /cube-install && git clone https://github.com/HyperloopUPV-H8/cubeclt.git && cd cubeclt && git lfs pull && chmod +x cubeclt_1.16.0_installer.sh && echo | LICENSE_ALREADY_ACCEPTED=1 ./cubeclt_1.16.0_installer.sh' - name: Build run: ./tools/build.sh ${{matrix.build_type}} ## the following is because of this known limitation From 153de762722ff4896e1abaaabaef8003bbc7a870 Mon Sep 17 00:00:00 2001 From: jmaralo Date: Thu, 16 Jan 2025 14:45:51 +0100 Subject: [PATCH 06/15] hopefully solve this time around the permission error --- .github/workflows/c-cpp.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 1a31795c6..7980739d6 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -14,8 +14,18 @@ jobs: build_type: [hardware,simulator] runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 - - run: sudo -- sh -c 'mkdir /cube-install && cd /cube-install && git clone https://github.com/HyperloopUPV-H8/cubeclt.git && cd cubeclt && git lfs pull && chmod +x cubeclt_1.16.0_installer.sh && echo | LICENSE_ALREADY_ACCEPTED=1 ./cubeclt_1.16.0_installer.sh' + - name: Clone ST-LIB + uses: actions/checkout@v3 + - name: Clone cubeclt + uses: actions/checkout@v3 + with: + repository: HyperloopUPV-H8/cubeclt + - name: Install cubeclt + run: | + cd cubeclt + git lfs pull + chmod +x cubeclt_1.16.0_installer.sh + echo | LICENSE_ALREADY_ACCEPTED=1 ./cubeclt_1.16.0_installer.sh - name: Build run: ./tools/build.sh ${{matrix.build_type}} ## the following is because of this known limitation From f72af6007adf89b459b9adace3a3a8837959d41d Mon Sep 17 00:00:00 2001 From: jmaralo Date: Thu, 16 Jan 2025 14:45:54 +0100 Subject: [PATCH 07/15] leftover files for previous commit --- .github/workflows/c-cpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 7980739d6..07a724ee6 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -25,7 +25,7 @@ jobs: cd cubeclt git lfs pull chmod +x cubeclt_1.16.0_installer.sh - echo | LICENSE_ALREADY_ACCEPTED=1 ./cubeclt_1.16.0_installer.sh + echo | LICENSE_ALREADY_ACCEPTED=1 sudo ./cubeclt_1.16.0_installer.sh - name: Build run: ./tools/build.sh ${{matrix.build_type}} ## the following is because of this known limitation From 83571f9bac4bd85a8e4364c22797da39dea2b9e2 Mon Sep 17 00:00:00 2001 From: jmaralo Date: Thu, 16 Jan 2025 14:48:12 +0100 Subject: [PATCH 08/15] fix path of cloned cubeclt --- .github/workflows/c-cpp.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 07a724ee6..307fa9610 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -20,9 +20,10 @@ jobs: uses: actions/checkout@v3 with: repository: HyperloopUPV-H8/cubeclt + path: /cubeclt - name: Install cubeclt run: | - cd cubeclt + cd /cubeclt git lfs pull chmod +x cubeclt_1.16.0_installer.sh echo | LICENSE_ALREADY_ACCEPTED=1 sudo ./cubeclt_1.16.0_installer.sh From 3305c42108cfcafd5c3660bc3e7afa3765985e0b Mon Sep 17 00:00:00 2001 From: jmaralo Date: Thu, 16 Jan 2025 14:48:58 +0100 Subject: [PATCH 09/15] nvm, the fix didn't fix the issue so I'm fixing the fix --- .github/workflows/c-cpp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 307fa9610..3033b92c8 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -20,10 +20,10 @@ jobs: uses: actions/checkout@v3 with: repository: HyperloopUPV-H8/cubeclt - path: /cubeclt + path: cubeclt - name: Install cubeclt run: | - cd /cubeclt + cd cubeclt git lfs pull chmod +x cubeclt_1.16.0_installer.sh echo | LICENSE_ALREADY_ACCEPTED=1 sudo ./cubeclt_1.16.0_installer.sh From ee04faa219036f80fedcd882d9bf69d719347213 Mon Sep 17 00:00:00 2001 From: jmaralo Date: Thu, 16 Jan 2025 14:50:12 +0100 Subject: [PATCH 10/15] remove echo before installer --- .github/workflows/c-cpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 3033b92c8..4f9a9d5c8 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -26,7 +26,7 @@ jobs: cd cubeclt git lfs pull chmod +x cubeclt_1.16.0_installer.sh - echo | LICENSE_ALREADY_ACCEPTED=1 sudo ./cubeclt_1.16.0_installer.sh + LICENSE_ALREADY_ACCEPTED=1 sudo ./cubeclt_1.16.0_installer.sh - name: Build run: ./tools/build.sh ${{matrix.build_type}} ## the following is because of this known limitation From 9d3cee066f4391fa294648ab546499be8b4c72eb Mon Sep 17 00:00:00 2001 From: jmaralo Date: Thu, 16 Jan 2025 15:44:40 +0100 Subject: [PATCH 11/15] Use dev container for github actions --- .github/workflows/c-cpp.yml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 4f9a9d5c8..fb7715879 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -12,21 +12,10 @@ jobs: strategy: matrix: build_type: [hardware,simulator] - runs-on: ubuntu-22.04 + runs-on: jmaralo/hyperloop-upv-firmware:0.1.0 steps: - name: Clone ST-LIB uses: actions/checkout@v3 - - name: Clone cubeclt - uses: actions/checkout@v3 - with: - repository: HyperloopUPV-H8/cubeclt - path: cubeclt - - name: Install cubeclt - run: | - cd cubeclt - git lfs pull - chmod +x cubeclt_1.16.0_installer.sh - LICENSE_ALREADY_ACCEPTED=1 sudo ./cubeclt_1.16.0_installer.sh - name: Build run: ./tools/build.sh ${{matrix.build_type}} ## the following is because of this known limitation @@ -46,7 +35,7 @@ jobs: Run-Tests: name: Run Simulator tests needs: build - runs-on: ubuntu-22.04 + runs-on: jmaralo/hyperloop-upv-firmware:0.1.0 steps: - uses: actions/checkout@v3 - name: Download test binary compressed From dace4873b48d4e903bef47435d2f729050919869 Mon Sep 17 00:00:00 2001 From: jmaralo Date: Thu, 16 Jan 2025 16:00:36 +0100 Subject: [PATCH 12/15] Properly use container image --- .github/workflows/c-cpp.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index fb7715879..45ee646e2 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -12,7 +12,9 @@ jobs: strategy: matrix: build_type: [hardware,simulator] - runs-on: jmaralo/hyperloop-upv-firmware:0.1.0 + runs-on: ubuntu-22.04 + container: + image: jmaralo/hyperloop-upv-firmware:0.1.0 steps: - name: Clone ST-LIB uses: actions/checkout@v3 @@ -35,7 +37,9 @@ jobs: Run-Tests: name: Run Simulator tests needs: build - runs-on: jmaralo/hyperloop-upv-firmware:0.1.0 + runs-on: ubuntu-22.04 + container: + image: jmaralo/hyperloop-upv-firmware:0.1.0 steps: - uses: actions/checkout@v3 - name: Download test binary compressed From d2c800c5706542ca7eeab788bad890dca02ffbb3 Mon Sep 17 00:00:00 2001 From: jmaralo Date: Thu, 16 Jan 2025 16:00:54 +0100 Subject: [PATCH 13/15] bump the version of ubuntu again from 22 to 24 --- .github/workflows/c-cpp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 45ee646e2..bb20a66cd 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: build_type: [hardware,simulator] - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 container: image: jmaralo/hyperloop-upv-firmware:0.1.0 steps: @@ -37,7 +37,7 @@ jobs: Run-Tests: name: Run Simulator tests needs: build - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 container: image: jmaralo/hyperloop-upv-firmware:0.1.0 steps: From 58def1bbd0cf633fa91bbf50670db77b5a01267e Mon Sep 17 00:00:00 2001 From: jmaralo Date: Thu, 16 Jan 2025 16:19:26 +0100 Subject: [PATCH 14/15] Set path variable inside the container so that the tools are found properly --- .devcontainer/Dockerfile | 6 ++++-- .github/workflows/c-cpp.yml | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index e18133e0f..f6e52ab2d 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,10 +1,12 @@ FROM ubuntu:24.04 +ENV PATH="$PATH:/opt/st/stm32cubeclt_1.16.0/GNU-tools-for-STM32/bin:/opt/st/stm32cubeclt_1.16.0/CMake/bin" + # Install git, git-lfs, pip and colorama, and create workspace directory RUN apt-get update && apt-get -y install git git-lfs python3-colorama cmake g++ build-essential && \ git lfs install - + # Install cubeclt RUN mkdir /temp && cd /temp && git clone https://github.com/HyperloopUPV-H8/cubeclt.git && \ cd cubeclt && git lfs pull && chmod +x cubeclt_1.16.0_installer.sh && \ - echo | LICENSE_ALREADY_ACCEPTED=1 ./cubeclt_1.16.0_installer.sh \ No newline at end of file + echo | LICENSE_ALREADY_ACCEPTED=1 ./cubeclt_1.16.0_installer.sh diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index bb20a66cd..8a4332342 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -14,7 +14,7 @@ jobs: build_type: [hardware,simulator] runs-on: ubuntu-24.04 container: - image: jmaralo/hyperloop-upv-firmware:0.1.0 + image: jmaralo/hyperloop-upv-firmware:0.2.0 steps: - name: Clone ST-LIB uses: actions/checkout@v3 @@ -39,7 +39,7 @@ jobs: needs: build runs-on: ubuntu-24.04 container: - image: jmaralo/hyperloop-upv-firmware:0.1.0 + image: jmaralo/hyperloop-upv-firmware:0.2.0 steps: - uses: actions/checkout@v3 - name: Download test binary compressed From 735393c620ba1593ff745ef1d4f5c6275c567619 Mon Sep 17 00:00:00 2001 From: jmaralo Date: Thu, 16 Jan 2025 18:52:26 +0100 Subject: [PATCH 15/15] Disable the simulator test for now --- .github/workflows/c-cpp.yml | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 8a4332342..d86c0c0e8 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -33,19 +33,4 @@ jobs: retention-days: 1 #this is because hardware build doesnot create the # test executable - continue-on-error: true - Run-Tests: - name: Run Simulator tests - needs: build - runs-on: ubuntu-24.04 - container: - image: jmaralo/hyperloop-upv-firmware:0.2.0 - steps: - - uses: actions/checkout@v3 - - name: Download test binary compressed - uses: actions/download-artifact@v4 - with: - name: stlib_test - - run: tar -xvf test_files.tar - - name: Run test - run: ./tools/run_sim_tests.sh + continue-on-error: true \ No newline at end of file