From 23b1de6b91ba3b5f115ff76b3135e0fc1b657cf8 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Mon, 1 Apr 2024 11:46:43 -0700 Subject: [PATCH 1/2] attempt to build and run unit tests for Math Component project as part of FPrime projects CI --- fprime-projects.Dockerfile | 2 +- playbook.yaml | 83 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 1 deletion(-) diff --git a/fprime-projects.Dockerfile b/fprime-projects.Dockerfile index c575305..5628a75 100644 --- a/fprime-projects.Dockerfile +++ b/fprime-projects.Dockerfile @@ -19,7 +19,7 @@ RUN apt update && apt -y install software-properties-common && add-apt-repositor # run Ansible commands COPY ./requirements.yaml ./playbook.yaml ./ -RUN ansible-galaxy install -r requirements.yaml && ansible-playbook -i,localhost playbook.yaml --tags "build_led_blinker, build_baremetal_reference" && rm -f ./*.yaml +RUN ansible-galaxy install -r requirements.yaml && ansible-playbook -i,localhost playbook.yaml --tags "build_led_blinker, build_math_component, build_baremetal_reference" && rm -f ./*.yaml # Custom Desktop Background - replace ingenuity_helicopter_on_mars.png on disk with your own background image COPY ./ingenuity_helicopter_on_mars.png /usr/share/extra/backgrounds/bg_default.png diff --git a/playbook.yaml b/playbook.yaml index 6e29e40..9e31e17 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -234,12 +234,14 @@ - install_fprime_tools - install_arduino_tools - build_led_blinker + - build_math_component - build_baremetal_reference vars: fprime_version: "v3.4.0" arduino_cli_cmake_wrapper_version: "94c3145e5ea4a0a48dc3f70560dfb8a" fprime_led_blinker_version: "{{ fprime_version }}" + fprime_math_component_version: "{{ fprime_version }}" fprime_arduino_version: "dbef42a1ea5bfab84930538cbb53fed90af77406" fprime_baremetal_reference_version: "v3.4.0-0.1.1" @@ -292,6 +294,33 @@ executable: /bin/bash become_user: 1000 + # Initialize Math Component project + - name: Clone fprime math component repo + shell: + cmd: git clone --recursive https://github.com/fprime-community/fprime-tutorial-math-component.git + chdir: /home/kasm-default-profile/ + executable: /bin/bash + become_user: 1000 + - name: Checkout {{ fprime_math_component_version }} in fprime math component repo + shell: + cmd: git checkout {{ fprime_math_component_version }} + chdir: /home/kasm-default-profile/fprime-tutorial-math-component + executable: /bin/bash + become_user: 1000 + - name: Fetch fprime submodule + shell: + cmd: git fetch + chdir: /home/kasm-default-profile/fprime-tutorial-math-component/fprime + executable: /bin/bash + become_user: 1000 + - name: Checkout {{ fprime_version }} in fprime submodule + shell: + cmd: git checkout {{ fprime_version }} + chdir: /home/kasm-default-profile/fprime-tutorial-math-component/fprime + executable: /bin/bash + become_user: 1000 + + # Initialize baremetal-reference - name: Clone fprime-baremetal-reference repo shell: @@ -489,6 +518,60 @@ executable: /bin/bash become_user: 1000 +- + # build Math Component project + hosts: localhost + connection: local + gather_facts: yes + tags: + - build_math_component + + tasks: + - name: Initialize submodules in fprime-tutorial-math-component/fprime submodule + shell: + cmd: git submodule update --init --recursive + chdir: /home/kasm-default-profile/fprime-tutorial-math-component/fprime + executable: /bin/bash + become_user: 1000 + - name: Generate fprime math component unit tests + shell: + cmd: fprime-util generate --ut + chdir: /home/kasm-default-profile/fprime-tutorial-math-component + executable: /bin/bash + become_user: 1000 + - name: Build fprime math component unit tests + shell: + cmd: fprime-util build --ut + chdir: /home/kasm-default-profile/fprime-tutorial-math-component + executable: /bin/bash + become_user: 1000 + - name: Run fprime math component unit tests + shell: + cmd: fprime-util check + chdir: /home/kasm-default-profile/fprime-tutorial-math-component + executable: /bin/bash + failed_when: false + changed_when: false + register: fprime_math_ut_output + become_user: 1000 + - name: Display fprime math component unit tests stdout + debug: + msg: "{{ fprime_math_ut_output.stdout }}" + become_user: 1000 + - name: Display fprime math component unit tests stderr + debug: + msg: "{{ fprime_math_ut_output.stderr }}" + become_user: 1000 + - name: Display fprime math component unit tests log + shell: + cmd: cat ./build-fprime-automatic-native-ut/Testing/Temporary/LastTest.log + chdir: /home/kasm-default-profile/fprime-tutorial-math-component + executable: /bin/bash + become_user: 1000 + - name: Delete fprime math component repo + shell: rm -rf /home/kasm-default-profile/fprime-tutorial-math-component + become_user: 1000 + - # build baremetal-reference hosts: localhost From 929216cc8ddf0f413aad3d44d7f2cb20be746193 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 2 Apr 2024 20:11:13 -0700 Subject: [PATCH 2/2] update README w/ FPrime community projects included in workspace --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 44f0ef1..35628ae 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,12 @@ ## Introduction -This repo provides the source code for building an Immutable-Infrastructure-as-Code (IIAC) workspace image, using Kasm, for the [F´(F Prime)](https://github.com/nasa/fprime) flight software and embedded systems framework, based on an Ansible template for [KASM Ubuntu Jammy](https://hub.docker.com/r/kasmweb/core-ubuntu-jammy) images. The workspace is configured with the following software: +This repo provides the source code for building an Immutable-Infrastructure-as-Code (IIAC) workspace image, using Kasm, for the [F´(F Prime)](https://github.com/nasa/fprime) flight software and embedded systems framework, based on an Ansible template for [KASM Ubuntu Jammy](https://hub.docker.com/r/kasmweb/core-ubuntu-jammy) images. The workspace is configured with the following: +- FPrime Community Projects + - [fprime-workshop-led-blinker](https://github.com/fprime-community/fprime-workshop-led-blinker) + - [fprime-tutorial-math-component](https://github.com/fprime-community/fprime-tutorial-math-component) + - [fprime-baremetal-reference](https://github.com/mdrs-community/fprime-baremetal-reference) - Cross Compile Toolchain for embedded Linux - gcc-arm-linux-gnueabihf - g++-arm-linux-gnueabihf