test again #38
Workflow file for this run
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: | |
paths-ignore: | |
- 'software/**' | |
branches: | |
- jiajun/workflow_fix | |
- master | |
jobs: | |
# Build DBC and Binaries | |
build: | |
name: Build Firmware Binaries | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- board: DIM | |
build_dir: firmware/thruna/DIM/DIM.elf | |
- board: FSM | |
build_dir: firmware/thruna/FSM/FSM.elf | |
- board: PDM | |
build_dir: firmware/thruna/PDM/PDM.elf | |
- board: DCM | |
build_dir: firmware/thruna/DCM/DCM.elf | |
- board: BMS | |
build_dir: firmware/thruna/BMS/BMS.elf | |
- board: f4dev | |
build_dir: firmware/dev/f4dev/f4dev.elf | |
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 .elf binary to Github Actions workflow | |
- name: Save built artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.board }}.elf | |
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.elf BMS.elf/BMS.elf DCM.elf/DCM.elf DIM.elf/DIM.elf PDM.elf/PDM.elf f4dev.elf/f4dev.elf CanMsgs.dbc/CanMsgs.dbc" | |
latest: true | |
title: "Stable Binaries and DBCs" | |
body: "This release contains the latest stable binaries and DBCs." | |
tag_name: "latest" |