2023-07-03 21:05:54 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
HW_FOLDER=$1
|
|
|
|
HW_TARGET=$2
|
|
|
|
|
|
|
|
# for instance
|
|
|
|
# .github/workflows/hw-ci/build_for_hw_ci.sh config/boards/f407-discovery f407-discovery
|
|
|
|
# .github/workflows/hw-ci/build_for_hw_ci.sh config/boards/proteus proteus_f4
|
2023-07-23 09:25:37 -07:00
|
|
|
# .github/workflows/hw-ci/build_for_hw_ci.sh config/boards/proteus proteus_f7_debug
|
2023-07-03 21:05:54 -07:00
|
|
|
|
|
|
|
set -e
|
2024-02-19 18:32:31 -08:00
|
|
|
echo "[build_for_hw_ci.sh] enter [$HW_FOLDER][$HW_TARGET]"
|
2023-07-03 21:05:54 -07:00
|
|
|
|
|
|
|
cd firmware
|
|
|
|
|
2024-02-14 13:39:10 -08:00
|
|
|
export BOARD_META_PATH=$(bash bin/find_meta_info.sh ${HW_FOLDER} ${HW_TARGET})
|
2024-02-05 15:30:07 -08:00
|
|
|
source config/boards/common_script_read_meta_env.inc "${BOARD_META_PATH}"
|
2024-02-14 13:39:10 -08:00
|
|
|
|
2024-02-19 18:32:31 -08:00
|
|
|
echo "[build_for_hw_ci.sh] We aren't guaranteed a clean machine every time, so manually clean the output."
|
2023-07-03 21:05:54 -07:00
|
|
|
make clean
|
|
|
|
|
|
|
|
export EXTRA_2_PARAMS=-DHARDWARE_CI
|
|
|
|
|
2024-02-19 18:32:31 -08:00
|
|
|
echo "[build_for_hw_ci.sh] Building Firmware"
|
2024-02-20 13:48:26 -08:00
|
|
|
make -j$(nproc) -r deliver/rusefi.bin
|
2024-02-19 18:32:31 -08:00
|
|
|
|
|
|
|
echo "[build_for_hw_ci.sh] Done!"
|