Skip to content

Unpacking CAN frames with JSONCAN in Python (#1271) #222

Unpacking CAN frames with JSONCAN in Python (#1271)

Unpacking CAN frames with JSONCAN in Python (#1271) #222

Workflow file for this run

name: Binary and DBC Generation
on:
push:
branches:
- master
jobs:
# ======= Build Binaries =======
build:
name: Build Firmware
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- board: quadruna_VC
bin_name: quadruna_VC_app_metadata.hex
build_dir: firmware/quadruna/VC
- board: quadruna_BMS
bin_name: quadruna_BMS_app_metadata.hex
build_dir: firmware/quadruna/BMS
- board: quadruna_FSM
bin_name: quadruna_FSM_app_metadata.hex
build_dir: firmware/quadruna/FSM
- board: quadruna_RSM
bin_name: quadruna_RSM_app_metadata.hex
build_dir: firmware/quadruna/RSM
- board: quadruna_CRIT
bin_name: quadruna_CRIT_app_metadata.hex
build_dir: firmware/quadruna/CRIT
container:
image: ubcformulaelectric/environment:latest
credentials:
username: ubcformulaelectric
password: ${{ secrets.docker_token }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- uses: ./.github/actions/build_binary
with:
board: ${{ matrix.board }}
# Uploads .hex binary to Github Actions workflow
- name: Save built artifact
uses: actions/upload-artifact@v4
env:
BUILD_DIR: build_fw_deploy
with:
name: ${{ matrix.bin_name }}
path: "${{ env.BUILD_DIR }}/${{ matrix.build_dir }}/${{ matrix.bin_name }}"
# ======= Generate DBC =======
generate-dbc:
name: Generate CAN DBC file
runs-on: ubuntu-22.04
container:
image: ubcformulaelectric/environment:latest
credentials:
username: ubcformulaelectric
password: ${{ secrets.docker_token }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
sparse-checkout: |
.github
scripts
can_bus
- name: Generate and Upload DBC
uses: ./.github/actions/build_dbc
- name: Upload DBC to Artifact
uses: actions/upload-artifact@v4
with:
name: quadruna.dbc
path: quadruna.dbc
# ======= MAKE THE RELEASE =======
make-release:
name: Add Binaries and DBC to Release Tab
runs-on: ubuntu-22.04
needs: [ build, generate-dbc ]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
sparse-checkout: .github
- name: Download Binaries and DBC from Artifacts
uses: actions/download-artifact@v4
with:
path: ./
- name: Debug Environment
run: ls -l -a
- name: Create Release
uses: ./.github/actions/push_release
with:
# https://github.com/actions/download-artifact#download-all-artifacts
files: |
quadruna_VC_app_metadata.hex/quadruna_VC_app_metadata.hex
quadruna_BMS_app_metadata.hex/quadruna_BMS_app_metadata.hex
quadruna_FSM_app_metadata.hex/quadruna_FSM_app_metadata.hex
quadruna_RSM_app_metadata.hex/quadruna_RSM_app_metadata.hex
quadruna_CRIT_app_metadata.hex/quadruna_CRIT_app_metadata.hex
quadruna.dbc/quadruna.dbc
latest: true
title: "Stable Binaries and DBCs"
body: "This release contains the latest stable binaries and DBCs."
tag_name: "latest"