rusefi-1/misc/jenkins/functional_test_and_build_b.../build_current_bundle.sh

87 lines
2.5 KiB
Bash
Raw Normal View History

#!/bin/bash
# This script would compile firmware, dev console and win32 simulator into a single bundle file
2022-01-15 19:09:27 -08:00
# This script depends on: zip
SCRIPT_NAME="build_current_bundle"
ROOT_FOLDER=$(pwd)
echo "$SCRIPT_NAME Entering ROOT_FOLDER=$ROOT_FOLDER"
2022-01-15 19:09:27 -08:00
echo "$SCRIPT_NAME.sh: Hello rusEFI build full bundle"
date "+%a %D %T.%2S"
export BUNDLE_NAME="default"
cd firmware/bootloader
bash clean_bootloader.sh
bash compile_bootloader_discovery407.sh
[ -e bootloader_generated.hxx ] || { echo "FAILED TO COMPILE BOOTLOADER"; exit 1; }
pwd
cd ../..
# At root folder here
cd firmware
date "+%a %D %T.%2S"
echo "$SCRIPT_NAME: will be Erasing chip"
Convert documentation (#1600) * Add checkout * remove empty with statement * Actually we do need push depth * convert gen_upload_docs.bat * convert run.bat * forgot to add run.sh * convert gen_upload_docs.bat * remove checking from bats * change config * fix path * fix path again * fix file extension * remove escapes * added missing quotation and escapes * convert build_current_bundle * convert clean_bootloader * convert compile_bootloader_discovery * convert compile_bootloader * add env var to skip upload * remove checking from compile.bat * working on push.yaml * finish sorting * progress * rename push to builds * rename push to builds * Add skip upload env var * fix pull_request name * fixed typo and changed name * fixed indentation and runs-on * try different env var setup * add nucleos and switch to underscore * add quotes * remove boards that were commented * remove boards that were commented * fix project board name * fixed variable name * add ini-file and console-settings * try installing gcc-multilib first * Install g++-multilib as well * remove unnecessary export * fixed exit numbers * change to different env setup * add simulator and console compilation to board bundles * changed OS and added linux simulator build * add checkout and missing colon * add gcc-multilib installes * Install mingw * fixed install * remove mingw from linux sim and call compile directly * change directory * moved envs to command * debug ls * debug ls * set ftp vars * add makefile debug info * removed batchecks * redirect stdout to easier see orrs * change name * remove redirect, add file inpection * Add conditional project name * Try software upgrade * missing char * update ine files * try quotes * add escapes * add quotes * add escapes and quotes * remove quotes and escapes * remove software upgrade * ignore test 2 * update apt * like this then * forgot import * fix case * remove RUSEFI_SKIP_UPLOAD and check RUSEFI_FTP_SERVER instead * break workflow back apart * upload simulator artifact * fixed operator * update apt * change paths * Update build-firmware.yaml * move update bundle to artifacts * fix var name * Install ncftp * set env vars conditionally * remove check so zips are created * try things the github way and copy to primary * re-enable test * missing space * use bash * use bash * add workflow * add check before upload * install kicad * switch firmware to bash * switch unit_testts to bash * switch jenkins to bash * fix path * pwd * checkout submodules * add ppa for kicad 5.1 * install xvfb and set DISPLAY * use xvfb * use python3 and add NO_DISPLAY var * fetch all * remove blob * undo unintentional changes * reset accidentally commited config.xmlu * remove submodule * fix path Co-authored-by: David Holdeman <David Holdeman>
2020-07-11 19:57:00 -07:00
[ -e flash_erase407.sh ] || { echo "NOT FOUND flash_erase.sh"; exit 1; }
echo "$SCRIPT_NAME: Erasing chip"
bash flash_erase407.sh
echo "$SCRIPT_NAME: Building firmware"
bash clean.sh
bash update_version.sh
bash clean_compile_two_versions.sh
#[ -e deliver/rusefi_no_asserts.hex ] || { echo "Just to confirm - FAILED to compile no_asserts"; exit 1; }
[ -e deliver/rusefi.hex ] || { echo "Just to confirm - FAILED to compile default DEBUG"; exit 1; }
echo "$SCRIPT_NAME: Building DFU"
if uname | grep "NT"; then
chmod u+x ../misc/encedo_hex2dfu/hex2dfu.exe
Convert documentation (#1600) * Add checkout * remove empty with statement * Actually we do need push depth * convert gen_upload_docs.bat * convert run.bat * forgot to add run.sh * convert gen_upload_docs.bat * remove checking from bats * change config * fix path * fix path again * fix file extension * remove escapes * added missing quotation and escapes * convert build_current_bundle * convert clean_bootloader * convert compile_bootloader_discovery * convert compile_bootloader * add env var to skip upload * remove checking from compile.bat * working on push.yaml * finish sorting * progress * rename push to builds * rename push to builds * Add skip upload env var * fix pull_request name * fixed typo and changed name * fixed indentation and runs-on * try different env var setup * add nucleos and switch to underscore * add quotes * remove boards that were commented * remove boards that were commented * fix project board name * fixed variable name * add ini-file and console-settings * try installing gcc-multilib first * Install g++-multilib as well * remove unnecessary export * fixed exit numbers * change to different env setup * add simulator and console compilation to board bundles * changed OS and added linux simulator build * add checkout and missing colon * add gcc-multilib installes * Install mingw * fixed install * remove mingw from linux sim and call compile directly * change directory * moved envs to command * debug ls * debug ls * set ftp vars * add makefile debug info * removed batchecks * redirect stdout to easier see orrs * change name * remove redirect, add file inpection * Add conditional project name * Try software upgrade * missing char * update ine files * try quotes * add escapes * add quotes * add escapes and quotes * remove quotes and escapes * remove software upgrade * ignore test 2 * update apt * like this then * forgot import * fix case * remove RUSEFI_SKIP_UPLOAD and check RUSEFI_FTP_SERVER instead * break workflow back apart * upload simulator artifact * fixed operator * update apt * change paths * Update build-firmware.yaml * move update bundle to artifacts * fix var name * Install ncftp * set env vars conditionally * remove check so zips are created * try things the github way and copy to primary * re-enable test * missing space * use bash * use bash * add workflow * add check before upload * install kicad * switch firmware to bash * switch unit_testts to bash * switch jenkins to bash * fix path * pwd * checkout submodules * add ppa for kicad 5.1 * install xvfb and set DISPLAY * use xvfb * use python3 and add NO_DISPLAY var * fetch all * remove blob * undo unintentional changes * reset accidentally commited config.xmlu * remove submodule * fix path Co-authored-by: David Holdeman <David Holdeman>
2020-07-11 19:57:00 -07:00
# ../misc/encedo_hex2dfu/hex2dfu.exe -i deliver/rusefi_no_asserts.hex -o deliver/rusefi_no_asserts.dfu
../misc/encedo_hex2dfu/hex2dfu.exe -i deliver/rusefi.hex -o deliver/rusefi.dfu
else
chmod u+x ../misc/encedo_hex2dfu/hex2dfu.bin
# ../misc/encedo_hex2dfu/hex2dfu.bin -i deliver/rusefi_no_asserts.hex -o deliver/rusefi_no_asserts.dfu
../misc/encedo_hex2dfu/hex2dfu.bin -i deliver/rusefi.hex -o deliver/rusefi.dfu
fi
2020-07-05 20:54:43 -07:00
echo "${SCRIPT_NAME} ls -l deliver"
ls -l deliver
cd ..
# At root folder here
bash misc/jenkins/build_java_console.sh
Use github actions to build and upload bundles (#1583) * add env var to skip upload * remove checking from compile.bat * working on push.yaml * finish sorting * progress * rename push to builds * rename push to builds * Add skip upload env var * fix pull_request name * fixed typo and changed name * fixed indentation and runs-on * try different env var setup * add nucleos and switch to underscore * add quotes * remove boards that were commented * remove boards that were commented * fix project board name * fixed variable name * add ini-file and console-settings * try installing gcc-multilib first * Install g++-multilib as well * remove unnecessary export * fixed exit numbers * change to different env setup * add simulator and console compilation to board bundles * changed OS and added linux simulator build * add checkout and missing colon * add gcc-multilib installes * Install mingw * fixed install * remove mingw from linux sim and call compile directly * change directory * moved envs to command * debug ls * debug ls * set ftp vars * add makefile debug info * removed batchecks * redirect stdout to easier see orrs * change name * remove redirect, add file inpection * Add conditional project name * Try software upgrade * missing char * update ine files * try quotes * add escapes * add quotes * add escapes and quotes * remove quotes and escapes * remove software upgrade * ignore test 2 * update apt * like this then * forgot import * fix case * remove RUSEFI_SKIP_UPLOAD and check RUSEFI_FTP_SERVER instead * break workflow back apart * upload simulator artifact * fixed operator * update apt * change paths * Update build-firmware.yaml * move update bundle to artifacts * fix var name * Install ncftp * set env vars conditionally * remove check so zips are created * try things the github way and copy to primary * re-enable test * missing space
2020-07-08 08:10:24 -07:00
[ -e java_console_binary/rusefi_console.jar ] || { echo "rusefi_console.jar build FAILED"; exit 1; }
bash misc/jenkins/build_simulator.sh
Use github actions to build and upload bundles (#1583) * add env var to skip upload * remove checking from compile.bat * working on push.yaml * finish sorting * progress * rename push to builds * rename push to builds * Add skip upload env var * fix pull_request name * fixed typo and changed name * fixed indentation and runs-on * try different env var setup * add nucleos and switch to underscore * add quotes * remove boards that were commented * remove boards that were commented * fix project board name * fixed variable name * add ini-file and console-settings * try installing gcc-multilib first * Install g++-multilib as well * remove unnecessary export * fixed exit numbers * change to different env setup * add simulator and console compilation to board bundles * changed OS and added linux simulator build * add checkout and missing colon * add gcc-multilib installes * Install mingw * fixed install * remove mingw from linux sim and call compile directly * change directory * moved envs to command * debug ls * debug ls * set ftp vars * add makefile debug info * removed batchecks * redirect stdout to easier see orrs * change name * remove redirect, add file inpection * Add conditional project name * Try software upgrade * missing char * update ine files * try quotes * add escapes * add quotes * add escapes and quotes * remove quotes and escapes * remove software upgrade * ignore test 2 * update apt * like this then * forgot import * fix case * remove RUSEFI_SKIP_UPLOAD and check RUSEFI_FTP_SERVER instead * break workflow back apart * upload simulator artifact * fixed operator * update apt * change paths * Update build-firmware.yaml * move update bundle to artifacts * fix var name * Install ncftp * set env vars conditionally * remove check so zips are created * try things the github way and copy to primary * re-enable test * missing space
2020-07-08 08:10:24 -07:00
[ -e simulator/build/rusefi_simulator.exe ] || { echo "rusefi_simulator.exe build FAILED"; exit 1; }
STM_ARCH="stm32f407"
TIMESTAMP=$(date "+%Y%m%d_%H%M%S")
FOLDER="snapshot_${TIMESTAMP}_${STM_ARCH}_rusefi"
echo "$SCRIPT_NAME: folder variable1=$FOLDER"
export FOLDER="temp/$FOLDER"
echo "$SCRIPT_NAME: folder variable3=$FOLDER"
pwd
# DfuFlasher.java validates this prefix
export BUNDLE_FULL_NAME="rusefi_bundle"
bash misc/jenkins/build_working_folder.sh
[ $? -eq 0 ] || { echo "$SCRIPT_NAME: ERROR: invoking build_working_folder.sh"; exit 1; }
echo "$SCRIPT_NAME: Going back to root folder"
cd "$ROOT_FOLDER"
pwd
echo "TIMESTAMP $(date "+%a %D %T.%2S")"
pwd
echo "exiting $SCRIPT_NAME"