File tree Expand file tree Collapse file tree 3 files changed +46
-53
lines changed
Expand file tree Collapse file tree 3 files changed +46
-53
lines changed Original file line number Diff line number Diff line change 1- name : HIL Build
2- on :
3- workflow_run :
4- workflows : [" OBC Build"]
5- types :
6- - completed
7-
8- concurrency :
9- group : rm46-hil
10- cancel-in-progress : false
11-
12- jobs :
13- build-linux :
14- if : ${{ github.event.workflow_run.conclusion == 'success' }}
15- runs-on : [self-hosted, hil, rm46]
16-
17- defaults :
18- run :
19- shell : bash
20- steps :
21- - uses : actions/checkout@v3
22- - name : Install Dependencies
23- run : |
24- sudo apt install -y build-essential gcc-multilib g++-multilib cmake curl
25- python3 -m venv venv/
26- source venv/bin/activate
27- pip install --upgrade pip
28- pip install -r requirements.txt
29- pip install -e .
30-
31- - name : Create Ground Station Binary Directory
32- run : |
33- mkdir build_gs
34- cd build_gs
35- cmake .. -DCMAKE_BUILD_TYPE=GS
36-
37- - name : Build
38- run : |
39- cd build_gs
40- cmake --build .
41-
42- - name : Download binary with CRC
43- uses : actions/download-artifact@v4
44- with :
45- name : launchpad-bin
46- path : .
47-
48- - name : Run HIL
49- run : |
50- source venv/bin/activate
51- python3 hil/hil_main.py /dev/ttyACM0 OBC-firmware-crc.bin
Original file line number Diff line number Diff line change 11name : OBC Build
22on : [push, pull_request]
33
4+ concurrency :
5+ group : rm46-hil
6+ cancel-in-progress : false
7+
48jobs :
59 OBC_BUILD :
610 runs-on : ubuntu-latest
@@ -96,3 +100,43 @@ jobs:
96100 run : |
97101 echo "CRC checksum:"
98102 cksum OBC-firmware.bin
103+
104+ HARDWARE-IN-LOOP :
105+ needs : OBC_BUILD
106+ runs-on : [self-hosted, hil, rm46]
107+
108+ defaults :
109+ run :
110+ shell : bash
111+ steps :
112+ - uses : actions/checkout@v3
113+ - name : Install Dependencies
114+ run : |
115+ sudo apt install -y build-essential gcc-multilib g++-multilib cmake curl
116+ python3 -m venv venv/
117+ source venv/bin/activate
118+ pip install --upgrade pip
119+ pip install -r requirements.txt
120+ pip install -e .
121+
122+ - name : Create Ground Station Binary Directory
123+ run : |
124+ mkdir build_gs
125+ cd build_gs
126+ cmake .. -DCMAKE_BUILD_TYPE=GS
127+
128+ - name : Build
129+ run : |
130+ cd build_gs
131+ cmake --build .
132+
133+ - name : Download binary with CRC
134+ uses : actions/download-artifact@v4
135+ with :
136+ name : launchpad-bin
137+ path : .
138+
139+ - name : Run HIL
140+ run : |
141+ source venv/bin/activate
142+ python3 hil/hil_main.py /dev/ttyACM0 OBC-firmware-crc.bin
Original file line number Diff line number Diff line change 1919# Helper logger function for this
2020def error_log (msg : str , code : int ) -> None :
2121 """
22- Print an error message and terminate execution with a specific exit code.
22+ Print an error message and terminate execution with a specific exit code
2323
2424 Args:
2525 msg: Human-readable error message.
@@ -31,7 +31,7 @@ def error_log(msg: str, code: int) -> None:
3131
3232def main () -> int :
3333 """
34- Validate inputs and flash firmware onto the target hardware.
34+ Validate inputs and flash firmware onto the target hardware
3535
3636 Returns:
3737 Exit status code.
You can’t perform that action at this time.
0 commit comments