Kevin/bms/imd pwm signal(new port) (#1133) #93
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Binary and DBC Generation | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
# Build DBC and Binaries (Thruna) | |
build: | |
name: Build Firmware Binaries (Thruna) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- board: DIM | |
bin_name: DIM_app_metadata.hex | |
build_dir: firmware/thruna/DIM/DIM_app_metadata.hex | |
- board: FSM | |
bin_name: FSM_app_metadata.hex | |
build_dir: firmware/thruna/FSM/FSM_app_metadata.hex | |
- board: PDM | |
bin_name: PDM_app_metadata.hex | |
build_dir: firmware/thruna/PDM/PDM_app_metadata.hex | |
- board: DCM | |
bin_name: DCM_app_metadata.hex | |
build_dir: firmware/thruna/DCM/DCM_app_metadata.hex | |
- board: BMS | |
bin_name: BMS_app_metadata.hex | |
build_dir: firmware/thruna/BMS/BMS_app_metadata.hex | |
- board: f4dev | |
bin_name: f4dev.hex | |
build_dir: firmware/dev/f4dev/f4dev.hex | |
- board: h7dev | |
bin_name: h7dev.hex | |
build_dir: firmware/dev/h7dev/h7dev.hex | |
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 }} | |
platform: thruna_firmware | |
# Uploads .hex binary to Github Actions workflow | |
- name: Save built artifact | |
uses: actions/upload-artifact@v3 | |
env: | |
BUILD_DIR: build_fw_deploy | |
with: | |
name: ${{ matrix.bin_name }} | |
path: ${{ env.BUILD_DIR }}/${{ matrix.build_dir }} | |
generate-dbc: | |
name: Call DBC Generation | |
uses: ./.github/workflows/dbc-gen.yml | |
secrets: | |
docker_token: ${{secrets.DOCKER_TOKEN}} | |
with: | |
upload_artifact: true | |
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@v3 | |
- name: Create Release | |
uses: ./.github/actions/push_release | |
with: | |
# https://github.com/actions/download-artifact#download-all-artifacts | |
files: "FSM_app_metadata.hex/FSM_app_metadata.hex BMS_app_metadata.hex/BMS_app_metadata.hex DCM_app_metadata.hex/DCM_app_metadata.hex DIM_app_metadata.hex/DIM_app_metadata.hex PDM_app_metadata.hex/PDM_app_metadata.hex f4dev.hex/f4dev.hex h7dev.hex/h7dev.hex CanMsgs.dbc/CanMsgs.dbc" | |
latest: true | |
title: "Stable Binaries and DBCs" | |
body: "This release contains the latest stable binaries and DBCs." | |
tag_name: "latest" |