Skip to content

LeStarch running Baremetal CI actions #6

LeStarch running Baremetal CI actions

LeStarch running Baremetal CI actions #6

name: baremetal-ci-actions
run-name: ${{ github.actor }} running Baremetal CI actions
on: [push]
env:
run_job_select: "fsw-gds"
build_binary: ${{ github.workspace }}/build-artifacts/teensy41/BaremetalReference/bin/BaremetalReference.elf.hex
gds_args: --comm-adapter uart --uart-device /dev/ttyACM0
dict_path: ${{ github.workspace }}/build-artifacts/teensy41/BaremetalReference/dict/BaremetalReferenceTopologyAppDictionary.xml
test_path: BaremetalReference/test/int/baremetal_ref_integration_test.py
new_build_binary: ${{ github.workspace }}/build-artifacts/teensy41/BaremetalReference/bin/build_binary
new_dict_path: ${{ github.workspace }}/build-artifacts/teensy41/BaremetalReference/dict/dictionary.xml
jobs:
build:
runs-on: ubuntu-latest
outputs:
run_job_select: ${{ env.run_job_select }}
start_cmd: /home/odroid/teensy_loader_cli/teensy_loader_cli --mcu=TEENSY41 -v -s ./build_binary
gds_args: ${{ env.gds_args }}
test_path: ${{ env.test_path }}
steps:
- uses: actions/checkout@v4
- name: "Checkout F' Repository"
uses: actions/checkout@v4
with:
submodules: true
path: ${{ inputs.fprime_location }}
- name: "Fprime Venv and Requirements Install"
run: |
python3 -m venv ./fprime-venv
. ./fprime-venv/bin/activate
pip3 install -r ${{ inputs.fprime_location }}./lib/fprime/requirements.txt
- name: "Platform Specific Requirements Install"
run: |
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=$VIRTUAL_ENV/bin sh
pip3 install arduino-cli-cmake-wrapper==0.2.0a1
export PATH=~/.local/bin:$PATH
cd ${{ github.workspace }}
arduino-cli config init
arduino-cli config add board_manager.additional_urls https://www.pjrc.com/teensy/package_teensy_index.json
arduino-cli core update-index
arduino-cli core install teensy:avr
- name: "Build"
run: |
. ./fprime-venv/bin/activate
fprime-util generate
fprime-util build
- name: "Rename build files"
run: |
mv ${{ env.build_binary }} ${{ env.new_build_binary }}
mv ${{ env.dict_path}} ${{ env.new_dict_path}}
- name: "Upload build binary"
uses: actions/upload-artifact@v4
with:
name: build_binary
path: ${{ env.new_build_binary }}
- name: "Upload dictionary"
uses: actions/upload-artifact@v4
with:
name: dictionary.xml
path: ${{ env.new_dict_path }}
- run: echo "Expose env vars for reusable workflow."
fit:
needs: build
uses: ./.github/workflows/reusable_fit_ci.yml
with:
test_path: ${{ needs.build.outputs.test_path }}
runs_on: self-hosted
run_job_select: ${{ needs.build.outputs.run_job_select }}
start_cmd: ${{ needs.build.outputs.start_cmd }}
gds_args: ${{ needs.build.outputs.gds_args }}