Skip to content

Rework HIL

Rework HIL #3687

Workflow file for this run

name: OBC Build / HIL
on: [push, pull_request]
jobs:
OBC_BUILD:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup
run: |
sudo apt-get update
sudo apt-get -y install build-essential cmake
- name: Install requirements
run: |
python3 -m pip install -r requirements.txt
- name: Create binary directory
run: |
mkdir build
cd build
export REPO_ROOT=$(git rev-parse --show-toplevel)
- name: Build (Release-Launchpad)
run: |
cd build
cmake .. -DCMAKE_BUILD_TYPE=OBC -G"Unix Makefiles" -DBOARD_TYPE=RM46_LAUNCHPAD -DDEBUG=0
make
- name: Upload CRC Binary (Release-Launchpad)
uses: actions/upload-artifact@v4
with:
name: launchpad-bin
path: build/OBC-firmware-crc.bin
- name: Build (Release-OBC Rev1)
run: |
cd build
cmake .. -DCMAKE_BUILD_TYPE=OBC -G"Unix Makefiles" -DBOARD_TYPE=OBC_REVISION_1 -DDEBUG=0
make
- name: Upload CRC Binary (Release-OBC Rev1)
uses: actions/upload-artifact@v4
with:
name: rev1-bin
path: build/OBC-firmware-crc.bin
- name: Build (Release-OBC Rev2)
run: |
cd build
cmake .. -DCMAKE_BUILD_TYPE=OBC -G"Unix Makefiles" -DBOARD_TYPE=OBC_REVISION_2 -DDEBUG=0
make
- name: Upload CRC Binary (Release-OBC Rev2)
uses: actions/upload-artifact@v4
with:
name: rev2-bin
path: build/OBC-firmware-crc.bin
- name: Build (Debug-Launchpad)
run: |
cd build
cmake .. -DCMAKE_BUILD_TYPE=OBC -G"Unix Makefiles" -DBOARD_TYPE=RM46_LAUNCHPAD -DDEBUG=1
make
- name: Build (Debug-OBC Rev1)
run: |
cd build
cmake .. -DCMAKE_BUILD_TYPE=OBC -G"Unix Makefiles" -DBOARD_TYPE=OBC_REVISION_1 -DDEBUG=1
make
- name: Build (Debug-OBC Rev2)
run: |
cd build
cmake .. -DCMAKE_BUILD_TYPE=OBC -G"Unix Makefiles" -DBOARD_TYPE=OBC_REVISION_2 -DDEBUG=1
make
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: bin-file
path: build/OBC-firmware.bin
CRC:
needs: OBC_BUILD
runs-on: ubuntu-latest
steps:
- name: Download binary
uses: actions/download-artifact@v4
with:
name: bin-file
path: .
- name: Display CRC
run: |
echo "CRC checksum:"
cksum OBC-firmware.bin
OBC_HIL:
needs: OBC_BUILD
runs-on: self-hosted
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: |
sudo apt-get -y install python3-venv build-essential cmake
python3 -m venv venv/
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
- name: Create Ground Station Binary Directory
run: |
mkdir build_gs
cd build_gs
cmake .. -DCMAKE_BUILD_TYPE=GS
- name: Build
run: |
cd build_gs
cmake --build .
- name: Download binary wiht CRC
uses: actions/download-artifact@v4
with:
name: launchpad-bin
- name: Run HIL
run: |
source venv/bin/activate
python hil/hil_main.py /dev/ttyACM0 OBC-firmware-crc.bin