Call make directly from workflow

This commit is contained in:
David Holdeman 2024-02-05 17:30:07 -06:00 committed by rusefillc
parent 278afae589
commit 6999f5c4c5
6 changed files with 14 additions and 41 deletions

View File

@ -591,8 +591,9 @@ jobs:
if: ${{ env.skip != 'true' }}
working-directory: ./firmware/
run: |
source config/boards/common_script_read_meta_env.inc ${{ env.BOARD_META_PATH }}
make clean
bash config/boards/common_script.sh ${{ env.BOARD_META_PATH }}
make bundle -j$(nproc) -r
- name: Package Bundle
if: ${{ env.full == 'true' }}

View File

@ -79,7 +79,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: rusefi_hw-ci-${{matrix.build-target}}.bin
path: ./firmware/deliver/rusefi*.bin
path: ./firmware/build/rusefi*.bin
- name: Set EXTRA env
run: |

View File

@ -14,6 +14,7 @@ echo "HW CI build [$HW_FOLDER][$HW_TARGET]"
cd firmware
export BOARD_META_PATH=$(bash bin/find_meta_info.sh ${HW_FOLDER} ${HW_TARGET})
source config/boards/common_script_read_meta_env.inc "${BOARD_META_PATH}"
./gen_live_documentation.sh
./gen_config_board.sh $HW_FOLDER $HW_TARGET
@ -24,4 +25,4 @@ make clean
export EXTRA_2_PARAMS=-DHARDWARE_CI
echo Build Firmware
bash config/boards/common_script.sh "${BOARD_META_PATH}"
make -j$(nproc) -r

View File

@ -13,4 +13,4 @@ set -e
cd firmware
# works on F4 with ST-LINK/V3 does not seem to work using V2 :(
openocd -f "$HW_SCRIPT" -c init -c targets -c "reset halt" -c "flash erase_sector 0 0 last" -c "flash write_image "deliver/rusefi.bin" 0x08000000" -c "reset run" -c "shutdown"
openocd -f "$HW_SCRIPT" -c init -c targets -c "reset halt" -c "flash erase_sector 0 0 last" -c "flash write_image "build/rusefi.bin" 0x08000000" -c "reset run" -c "shutdown"

View File

@ -115,6 +115,14 @@ endif
# Project, sources and paths
#
ifeq ($(PROJECT_BOARD),)
ifneq ($(SHORT_BOARD_NAME),)
PROJECT_BOARD = $(SHORT_BOARD_NAME)
else
PROJECT_BOARD = f407-discovery
endif
endif
# Define project name here
PROJECT = openblt_$(PROJECT_BOARD)
PROJECT_DIR = ..

View File

@ -1,37 +0,0 @@
#!/bin/bash
# this script is supposed to be executed from within 'firmware' folder
export BOARD_META_PATH=${1:-$BOARD_META_PATH}
. config/boards/common_script_read_meta_env.inc $BOARD_META_PATH
# fail on error
set -e
SCRIPT_NAME="common_script.sh"
# temporary
if [ -z "$PROJECT_BOARD" ]; then
export PROJECT_BOARD="$SHORT_BOARD_NAME"
fi
# check if board dir is set
echo "Entering $SCRIPT_NAME with board [$PROJECT_BOARD] and CPU [$PROJECT_CPU] at [$BOARD_DIR]"
mkdir -p .dep
# todo: start using env variable for number of threads or for '-r'
make bundle -j$(nproc) -r
[ -e build/rusefi.hex ] || { echo "FAILED to compile by $SCRIPT_NAME with $PROJECT_BOARD $DEBUG_LEVEL_OPT and $EXTRA_PARAMS"; exit 1; }
if [ ! -z $POST_BUILD_SCRIPT ]; then
echo "$SCRIPT_NAME: invoking post-build script"
source $POST_BUILD_SCRIPT
fi
echo "$SCRIPT_NAME: build folder content:"
ls -l build
echo "$SCRIPT_NAME: deliver folder content:"
ls -l deliver