Simplify board name usage https://github.com/rusefi/fw-custom-example/issues/1
This commit is contained in:
parent
f9cc2d87a3
commit
da975357e4
|
@ -8,10 +8,32 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
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:
|
call-workflow-passing-data:
|
||||||
|
needs: read-meta-info
|
||||||
uses: rusefi/rusefi/.github/workflows/custom-board-build.yaml@master
|
uses: rusefi/rusefi/.github/workflows/custom-board-build.yaml@master
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
with:
|
with:
|
||||||
shortBoardName: XXX
|
shortBoardName: ${{ needs.read-meta-info.outputs.SHORT_BOARD_NAME }}
|
||||||
|
rusefi_dir: ext/rusefi
|
||||||
|
relative_board_dir: ../..
|
||||||
|
|
4
board.mk
4
board.mk
|
@ -2,8 +2,8 @@ BOARDCPPSRC = $(BOARD_DIR)/board_configuration.cpp
|
||||||
|
|
||||||
BOARDINC += $(BOARD_DIR)/generated/controllers/generated
|
BOARDINC += $(BOARD_DIR)/generated/controllers/generated
|
||||||
|
|
||||||
# todo: use meta-info.txt
|
# defines SHORT_BOARD_NAME
|
||||||
SHORT_BOARD_NAME=XXX
|
include $(BOARD_DIR)/meta-info.env
|
||||||
|
|
||||||
# reduce memory usage monitoring
|
# reduce memory usage monitoring
|
||||||
DDEFS += -DRAM_UNUSED_SIZE=100
|
DDEFS += -DRAM_UNUSED_SIZE=100
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
SHORT_BOARD_NAME=XXX
|
|
@ -1,2 +0,0 @@
|
||||||
# todo: find a way for build-firmware.yaml to consume this file? maybe the other way around?
|
|
||||||
shortBoardName=XXX
|
|
Loading…
Reference in New Issue