Skip to content

Commit

Permalink
Simplify board name usage #1
Browse files Browse the repository at this point in the history
  • Loading branch information
andreika-git committed Jan 15, 2024
1 parent f9cc2d8 commit da97535
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/build-firmware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,32 @@ on:
workflow_dispatch:

jobs:
read-meta-info:
runs-on: ubuntu-latest
outputs:
short_board_name: ${{ steps.read_meta.outputs.SHORT_BOARD_NAME }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Read meta-info file with the board description
id: read_meta
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
echo "$(cat ./meta-info.env)" >> $GITHUB_OUTPUT
- name: Debug output of the board name
run: |
echo "SHORT_BOARD_NAME = ${{ steps.read_meta.outputs.SHORT_BOARD_NAME }}"
call-workflow-passing-data:
needs: read-meta-info
uses: rusefi/rusefi/.github/workflows/custom-board-build.yaml@master
secrets: inherit
permissions:
contents: write
with:
shortBoardName: XXX
shortBoardName: ${{ needs.read-meta-info.outputs.SHORT_BOARD_NAME }}
rusefi_dir: ext/rusefi
relative_board_dir: ../..
4 changes: 2 additions & 2 deletions board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ BOARDCPPSRC = $(BOARD_DIR)/board_configuration.cpp

BOARDINC += $(BOARD_DIR)/generated/controllers/generated

# todo: use meta-info.txt
SHORT_BOARD_NAME=XXX
# defines SHORT_BOARD_NAME
include $(BOARD_DIR)/meta-info.env

# reduce memory usage monitoring
DDEFS += -DRAM_UNUSED_SIZE=100
Expand Down
1 change: 1 addition & 0 deletions meta-info.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SHORT_BOARD_NAME=XXX
2 changes: 0 additions & 2 deletions meta-info.txt

This file was deleted.

0 comments on commit da97535

Please sign in to comment.