Repository: SunDevilRocketry/Flight-Computer-Firmware
Pull request #39: Configured github actions to check build stability
Author: login: ETSells
Created: 2025-03-17T21:23:18Z | Merged: 2025-03-27T00:30:58Z

One of the steps of my code review process is to check out the branch and build the application that the change applies to in order to make sure that the changes do not break the application. I also check for warnings to make sure the code will behave as expected.

This .yml file configures an action via Github that will run whenever a pull request is created. It clones the repository, sets up make, and then builds the data-logger, canard, and terminal applications. The run fails if any of these three fail to compile. If they throw warnings, they are visible in the output log for each application build.

The free plan allows us to run 20 jobs concurrently, which is more than sufficient for our needs. If another application needs to be configured in the future, we can simply add it to this .yml. I also would like to explore configuring regression tests for pulls into main in the future, but since the only up-to-date test is for GPS, I would consider this a good place to start lol. Let me know what you think about these kinds of changes to our workflow!


Diff:
diff --git a/.github/workflows/build-stability.yml b/.github/workflows/build-stability.yml
new file mode 100644
index 00000000..769a77f9
--- /dev/null
+++ b/.github/workflows/build-stability.yml
@@ -0,0 +1,36 @@
+name: FCF Stability Check
+run-name: ${{ github.actor }} is verifying build stability 🚀
+on: [pull_request]
+jobs:
+  Check-build-stability:
+    runs-on: ubuntu-latest
+    steps:
+      - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
+      - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
+      - run: echo "🔎 The name of your branch is ${{ github.ref }}."
+      - name: Check out dependencies
+        uses: fiam/arm-none-eabi-gcc@v1
+        with:
+          release: '9-2019-q4' # The arm-none-eabi-gcc release to use.
+      - name: Check out repository code
+        uses: actions/checkout@v4
+        with:
+          submodules: 'true'
+      - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
+      - run: echo "🖥️ The workflow is now ready to test your code on the runner."
+      - name: List files in the repository
+        run: |
+          ls ${{ github.workspace }}
+      - name: Build canard application
+        run: |
+          cd app/canard/rev2 
+          make
+      - name: Build terminal application
+        run: |
+          cd app/terminal/rev2 
+          make
+      - name: Build data-logger application
+        run: |
+          cd app/flight/data-logger/rev2 
+          make
+      - run: echo "🍏 This job's status is ${{ job.status }}."
\ No newline at end of file
diff --git a/.github/workflows/fcf-regression.yml b/.github/workflows/fcf-regression.yml
new file mode 100644
index 00000000..04c7bd6e
--- /dev/null
+++ b/.github/workflows/fcf-regression.yml
@@ -0,0 +1,25 @@
+name: FCF Regression Test
+run-name: ${{ github.actor }} is testing low-level functionality 🤖
+on: [release]
+jobs:
+  FCF-regression:
+    runs-on: ubuntu-latest
+    steps:
+      - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
+      - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
+      - run: echo "🔎 The name of your branch is ${{ github.ref }}."
+      - name: Check out repository code
+        uses: actions/checkout@v4
+        with:
+          submodules: 'true'
+      - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
+      - run: echo "🖥️ The workflow is now ready to test your code on the runner."
+      - name: List files in the repository
+        run: |
+          ls ${{ github.workspace }}
+      - name: Build and run the GPS tests
+        run: |
+          cd test/mod/gps
+          make
+          make test
+      - run: echo "🍏 This job's status is ${{ job.status }}."
\ No newline at end of file
diff --git a/test b/test
index d8456cc2..797996b8 160000
--- a/test
+++ b/test
@@ -1 +1 @@
-Subproject commit d8456cc210be6115cdf4edb7caa635f6292b99cc
+Subproject commit 797996b873e93ad39252477eb503e0591ab5ab38


Reviews:
user: login: niekky
body: LGTM!
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-03-27T00:22:41Z
user: login: ETSells
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-27T00:27:43Z
user: login: ETSells
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-27T00:27:50Z

Review comments:
diff_hunk: @@ -0,0 +1,36 @@
+name: FCF Stability Check
+run-name: ${{ github.actor }} is verifying build stability 🚀
+on: [pull_request]
+jobs:
+  Check-build-stability:
+    runs-on: ubuntu-latest
+    steps:
+      - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
+      - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
+      - run: echo "🔎 The name of your branch is ${{ github.ref }}."
+      - name: Check out dependencies
+        uses: fiam/arm-none-eabi-gcc@v1
+        with:
+          release: '9-2019-q4' # The arm-none-eabi-gcc release to use.
+      - name: Check out repository code
+        uses: actions/checkout@v4
+        with:
+          submodules: 'true'
+      - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
+      - run: echo "🖥️ The workflow is now ready to test your code on the runner."
+      - name: List files in the repository
+        run: |
+          ls ${{ github.workspace }}
+      - name: Build canard application
+        run: |
+          cd app/canard/rev2 
+          make
+      - name: Build terminal application
+        run: |
+          cd app/terminal/rev2 
+          make
+      - name: Build data-logger application
+        run: |
+          cd app/flight/data-logger/rev2 
+          make
+      - run: echo "🍏 This job's status is ${{ job.status }}."
path: .github/workflows/build-stability.yml
user: login: niekky
body: action file looks good. But it'd be better if it displays any warnings and critical compile errors. 
created_at: 2025-03-18T20:11:35Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,25 @@
+name: FCF Regression Test
+run-name: ${{ github.actor }} is testing low-level functionality 🤖
+on: [release]
+jobs:
+  FCF-regression:
+    runs-on: ubuntu-latest
+    steps:
+      - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
+      - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
+      - run: echo "🔎 The name of your branch is ${{ github.ref }}."
+      - name: Check out repository code
+        uses: actions/checkout@v4
+        with:
+          submodules: 'true'
+      - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
+      - run: echo "🖥️ The workflow is now ready to test your code on the runner."
+      - name: List files in the repository
+        run: |
+          ls ${{ github.workspace }}
+      - name: Build and run the GPS tests
+        run: |
path: .github/workflows/fcf-regression.yml
user: login: niekky
body: Nice! 
created_at: 2025-03-18T20:13:06Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,36 @@
+name: FCF Stability Check
+run-name: ${{ github.actor }} is verifying build stability 🚀
+on: [pull_request]
+jobs:
+  Check-build-stability:
+    runs-on: ubuntu-latest
+    steps:
+      - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
+      - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
+      - run: echo "🔎 The name of your branch is ${{ github.ref }}."
+      - name: Check out dependencies
+        uses: fiam/arm-none-eabi-gcc@v1
+        with:
+          release: '9-2019-q4' # The arm-none-eabi-gcc release to use.
+      - name: Check out repository code
+        uses: actions/checkout@v4
+        with:
+          submodules: 'true'
+      - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
+      - run: echo "🖥️ The workflow is now ready to test your code on the runner."
+      - name: List files in the repository
+        run: |
+          ls ${{ github.workspace }}
+      - name: Build canard application
+        run: |
+          cd app/canard/rev2 
+          make
+      - name: Build terminal application
+        run: |
+          cd app/terminal/rev2 
+          make
+      - name: Build data-logger application
+        run: |
+          cd app/flight/data-logger/rev2 
+          make
+      - run: echo "🍏 This job's status is ${{ job.status }}."
path: .github/workflows/build-stability.yml
user: login: ETSells
body: I would like that too. I'm not familiar enough with bash to be able to pull all of those out and display the output, but it would be ideal to catch compiler warnings. Could be worth making an issue for this after Canard is ready?
created_at: 2025-03-27T00:27:43Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,25 @@
+name: FCF Regression Test
+run-name: ${{ github.actor }} is testing low-level functionality 🤖
+on: [release]
+jobs:
+  FCF-regression:
+    runs-on: ubuntu-latest
+    steps:
+      - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
+      - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
+      - run: echo "🔎 The name of your branch is ${{ github.ref }}."
+      - name: Check out repository code
+        uses: actions/checkout@v4
+        with:
+          submodules: 'true'
+      - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
+      - run: echo "🖥️ The workflow is now ready to test your code on the runner."
+      - name: List files in the repository
+        run: |
+          ls ${{ github.workspace }}
+      - name: Build and run the GPS tests
+        run: |
path: .github/workflows/fcf-regression.yml
user: login: ETSells
body: o7
created_at: 2025-03-27T00:27:50Z
author_association: MEMBER

PR comments:
user: login: ETSells
created_at: 2025-03-17T21:25:19Z
body: The job has been updated to only run on a pull request, by the way. You can see below that it says "all checks have passed" when the application can be built successfully :)
author_association: MEMBER
user: login: ETSells
created_at: 2025-03-18T19:37:46Z
body: Adding @niekky for review. I did this on my own time out of curiosity, but I figured there's not much of a reason not to use it. It's still a change to our SQA processes, so I want your opinion on it.
author_association: MEMBER