From 15e44ae9ccf24a110a9d7502c89425cf7bcc4086 Mon Sep 17 00:00:00 2001 From: David Holdeman Date: Wed, 8 Jul 2020 10:10:24 -0500 Subject: [PATCH] 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 --- .github/workflows/build-bootloader.yaml | 28 --- .github/workflows/build-firmware.yaml | 224 ++++++++++-------- .github/workflows/build-simulator.yaml | 31 +-- .../boards/microrusefi/compile_mre_f4.sh | 2 +- ...ompile_mre_f4_hardware_QC_special_build.sh | 2 +- firmware/config/boards/nucleo_f746/board.mk | 6 +- .../nucleo_f746/compile_stm32f746_nucleo.sh | 4 +- misc/jenkins/build_simulator.sh | 1 + misc/jenkins/build_working_folder.sh | 13 +- .../compile_other_versions/prepare_bundle.sh | 5 - misc/jenkins/compile_other_versions/run.bat | 47 ++-- .../build_current_bundle.sh | 4 +- simulator/Makefile | 8 +- simulator/clean.bat | 8 +- simulator/compile.bat | 8 +- simulator/compile.sh | 1 + unit_tests/ci_gcov.sh | 7 +- unit_tests/compile.bat | 8 +- 18 files changed, 197 insertions(+), 210 deletions(-) delete mode 100644 .github/workflows/build-bootloader.yaml diff --git a/.github/workflows/build-bootloader.yaml b/.github/workflows/build-bootloader.yaml deleted file mode 100644 index 4afdb4dd90..0000000000 --- a/.github/workflows/build-bootloader.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: Bootloader CI - -on: [push,pull_request] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - with: - submodules: recursive - - # Build machines don't have arm-none-eabi gcc, so let's download it and put it on the path - - name: Download & Install GCC - run: | # Compiler hosted on our other git repo - avoids having to download from the nice folks at ARM every time - wget 'https://github.com/rusefi/build_support/raw/master/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.xz' -O compiler.tar.xz - tar -xvf compiler.tar.xz - echo "::add-path::`pwd`/gcc-arm-none-eabi-9-2019-q4-major/bin" - - # Make sure the compiler we just downloaded works - just print out the version - - name: Test Compiler - run: arm-none-eabi-gcc -v - - # Build the bootloader! - - name: Build Bootloader - working-directory: ./firmware/bootloader/ - run: make -j4 -f src/Makefile EXTRA_PARAMS="-DEFI_BOOTLOADER -DSTM32F405xx -DEFI_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_CHECKS=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DBOARD_TLE8888_COUNT=0 -DBOARD_TLE6240_COUNT=0 -DBOARD_MC33972_COUNT=0" diff --git a/.github/workflows/build-firmware.yaml b/.github/workflows/build-firmware.yaml index 9dd7e7a154..3778fe1a0c 100644 --- a/.github/workflows/build-firmware.yaml +++ b/.github/workflows/build-firmware.yaml @@ -1,9 +1,9 @@ -name: Firmware CI +name: Build Firmware -on: [push,pull_request] +on: [push, pull_request] jobs: - build: + build-firmware: runs-on: ubuntu-latest strategy: @@ -12,84 +12,54 @@ jobs: matrix: # What boards should we build for? In the 'include' section below, # set up what each of these boards needs to build. - build-target: [frankenso, frankenso-pal, mre-f4, mre-f7, prometheus-405, prometheus-469, proteus-f4, proteus-f7, kinetis] - build-type: [debug, release] + build-target: [frankenso_na6, kinetis, mre_f4, mre_f4_hardware_QC_special_build, mre_f7, prometheus_405, prometheus_469, proteus_f4, proteus_f7, stm32f746_nucleo, stm32f767_nucleo] include: # Board configurations - - build-target: frankenso - efi-cpu: ARCH_STM32F4 - efi-board: st_stm32f4 - target-extra-params: -DSHORT_BOARD_NAME=fra + - build-target: frankenso_na6 + folder: frankenso - - build-target: frankenso-pal - efi-cpu: ARCH_STM32F4 - efi-board: st_stm32f4 - target-extra-params: -DSHORT_BOARD_NAME=fra -DHAL_TRIGGER_USE_PAL=TRUE -DEFI_ICU_INPUTS=FALSE -DEFI_VEHICLE_SPEED=FALSE -DEFI_LOGIC_ANALYZER=FALSE - - - build-target: mre-f4 - efi-cpu: ARCH_STM32F4 - efi-board: microrusefi - target-extra-params: -DSHORT_BOARD_NAME=mre - - - build-target: mre-f7 - efi-cpu: ARCH_STM32F7 - efi-board: microrusefi - target-extra-params: -DSHORT_BOARD_NAME=mre - - - build-target: prometheus-405 - efi-cpu: ARCH_STM32F4 - efi-board: prometheus/f405 - target-extra-params: -DSHORT_BOARD_NAME=pth - - - build-target: prometheus-469 - efi-cpu: ARCH_STM32F4 - efi-board: prometheus/f469 - target-extra-params: -DSHORT_BOARD_NAME=pth - - - build-target: proteus-f4 - efi-cpu: ARCH_STM32F4 - efi-board: proteus - target-extra-params: -DSHORT_BOARD_NAME=pro - - - build-target: proteus-f7 - efi-cpu: ARCH_STM32F7 - efi-board: proteus - target-extra-params: -DSHORT_BOARD_NAME=pro - - build-target: kinetis - efi-cpu: kinetis - efi-board: kinetis - target-extra-params: -DSHORT_BOARD_NAME=kin -DCPU_MKE16F512VLH16 -DCPU_MKE16F512VLH16_cm4 -D__USE_CMSI -DDEFAULT_ENGINE_TYPE=MINIMAL_PINS - extra-options: USE_FATFS=no USE_BOOTLOADER=no + folder: kinetis - # Debug vs. release configuration - - build-type: debug - type-extra-params: -DDUMMY - build-debug-level-opt: -O0 -ggdb -g3 + - build-target: mre_f4 + folder: microrusefi + ini-file: rusefi_mre_f4.ini - - build-type: release - type-extra-params: -DEFI_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_TRACE=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE - build-debug-level-opt: -O2 -ggdb -g3 + - build-target: mre_f4_hardware_QC_special_build + folder: microrusefi + ini-file: rusefi_microrusefi.ini + + - build-target: mre_f7 + folder: microrusefi + ini-file: rusefi_mre_f7.ini + console-settings: firmware/config/boards/nucleo_f767/rusefi_console_properties.xml - # We don't need debug builds for every board... - exclude: - - build-target: frankenso-pal - build-type: debug - - build-target: mre-f4 - build-type: debug - - build-target: mre-f7 - build-type: debug - - build-target: prometheus-405 - build-type: debug - - build-target: prometheus-469 - build-type: debug - - build-target: proteus-f4 - build-type: debug - - build-target: proteus-f7 - build-type: debug - - build-target: kinetis - build-type: debug + - build-target: prometheus_405 + folder: prometheus + ini-file: rusefi_prometheus_405.ini + + - build-target: prometheus_469 + folder: prometheus + ini-file: rusefi_prometheus_469.ini + + - build-target: proteus_f4 + folder: proteus + ini-file: rusefi_proteus_f4.ini + + - build-target: proteus_f7 + folder: proteus + ini-file: rusefi_proteus_f7.ini + + - build-target: stm32f746_nucleo + folder: nucleo_f746 + ini-file: no + console-settings: firmware/config/boards/nucleo_f767/rusefi_console_properties.xml + + - build-target: stm32f767_nucleo + folder: nucleo_f767 + ini-file: no + console-settings: firmware/config/boards/nucleo_f767/rusefi_console_properties.xml steps: - uses: actions/checkout@v1 @@ -111,47 +81,91 @@ jobs: tar -xvf compiler.tar.xz echo "::add-path::`pwd`/gcc-arm-none-eabi-9-2019-q4-major/bin" + - name: Install multilib, mingw, and ncftp + run: | + sudo apt-get update + sudo apt-get install gcc-multilib g++-multilib g++-mingw-w64 gcc-mingw-w64 ncftp + # Make sure the compiler we just downloaded works - just print out the version - name: Test Compiler run: arm-none-eabi-gcc -v + + - name: Set FTP variables + run: | + if [ "${{github.event_name}}" = "push" ] && [ "${{github.ref}}" = "refs/heads/master" ]; then + echo "::set-env name=RUSEFI_FTP_SERVER::${{secrets.RUSEFI_FTP_SERVER}}"; + echo "::set-env name=RUSEFI_BUILD_FTP_USER::${{secrets.RUSEFI_BUILD_FTP_USER}}"; + echo "::set-env name=RUSEFI_BUILD_FTP_PASS::${{secrets.RUSEFI_BUILD_FTP_PASS}}"; + fi + + # Build rusEFI console + - name: Build console + run: sh misc/jenkins/build_java_console.sh + # Build the simulator + - name: Build simulator + run: OS="Windows_NT" sh misc/jenkins/build_simulator.sh + # Build the firmware! - name: Build Firmware + run: sh misc/jenkins/compile_other_versions/compile_and_upload.sh ${{matrix.folder}} ${{matrix.build-target}} ${{matrix.ini-file}} ${{matrix.console-settings}} + + - name: Upload bundle + uses: actions/upload-artifact@v2 + with: + name: rusefi_bundle_${{matrix.build-target}}.zip + path: ./artifacts/rusefi_bundle_${{matrix.build-target}}.zip + + - name: Upload autoupdate bundle + uses: actions/upload-artifact@v2 + with: + name: rusefi_bundle_${{matrix.build-target}}_autoupdate.zip + path: ./artifacts/rusefi_bundle_${{matrix.build-target}}_autoupdate.zip + + build-primary-bundle: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + with: + submodules: recursive + + - name: Generate Configs working-directory: ./firmware/ - run: make -j4 PROJECT_BOARD=${{matrix.efi-board}} PROJECT_CPU=${{matrix.efi-cpu}} EXTRA_PARAMS="${{matrix.type-extra-params}} ${{matrix.target-extra-params}}" DEBUG_LEVEL_OPT='${{matrix.build-debug-level-opt}}' ${{matrix.extra-options}} - - # Get hex2dfu - - name: Fetch hex2dfu - uses: actions/checkout@v2 - with: - repository: 'rusefi/hex2dfu' - path: hex2dfu + run: sh gen_config.sh - # Build hex2dfu - - name: Build hex2dfu - working-directory: ./hex2dfu - run: gcc hex2dfu.c -o hex2dfu + - name: Generate Live Documentation + working-directory: ./firmware/ + run: sh gen_live_documentation.sh - # Convert hex to dfu - - name: Create DFU file - run: ./hex2dfu/hex2dfu -i ./firmware/build/rusefi.hex -o ./firmware/build/rusefi.dfu - + # Build machines don't have arm-none-eabi gcc, so let's download it and put it on the path + - name: Download & Install GCC + run: | # Compiler hosted on our other git repo - avoids having to download from the nice folks at ARM every time + wget 'https://github.com/rusefi/build_support/raw/master/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.xz' -O compiler.tar.xz + tar -xvf compiler.tar.xz + echo "::add-path::`pwd`/gcc-arm-none-eabi-9-2019-q4-major/bin" + + - name: Install multilib, mingw, and ncftp + run: | + sudo apt-get update + sudo apt-get install gcc-multilib g++-multilib g++-mingw-w64 gcc-mingw-w64 ncftp - # The next two steps upload the bin, elf, and dfu as build artifacts - - name: Upload elf + # Make sure the compiler we just downloaded works - just print out the version + - name: Test Compiler + run: arm-none-eabi-gcc -v + + - name: Set FTP variables + run: | + if [ "${{github.event_name}}" = "push" ] && [ "${{github.ref}}" = "refs/heads/master" ]; then + echo "::set-env name=RUSEFI_FTP_SERVER::${{secrets.RUSEFI_FTP_SERVER}}"; + echo "::set-env name=RUSEFI_BUILD_FTP_USER::${{secrets.RUSEFI_BUILD_FTP_USER}}"; + echo "::set-env name=RUSEFI_BUILD_FTP_PASS::${{secrets.RUSEFI_BUILD_FTP_PASS}}"; + fi + + - name: Build Primary Bundle + run: OS="Windows_NT" sh misc/jenkins/functional_test_and_build_bundle/build_current_bundle.sh + + - name: Upload primary bundle uses: actions/upload-artifact@v2 with: - name: firmware-${{matrix.build-target}}-${{matrix.build-type}}-elf - path: ./firmware/build/rusefi.elf - - - name: Upload bin - uses: actions/upload-artifact@v2 - with: - name: firmware-${{matrix.build-target}}-${{matrix.build-type}}-bin - path: ./firmware/build/rusefi.bin - - - name: Upload dfu - uses: actions/upload-artifact@v2 - with: - name: firmware-${{matrix.build-target}}-${{matrix.build-type}}-dfu - path: ./firmware/build/rusefi.dfu + name: rusefi_bundle.zip + path: ./artifacts/rusefi_bundle.zip diff --git a/.github/workflows/build-simulator.yaml b/.github/workflows/build-simulator.yaml index db45076258..fee3ba184c 100644 --- a/.github/workflows/build-simulator.yaml +++ b/.github/workflows/build-simulator.yaml @@ -1,27 +1,28 @@ -name: Simulator CI +name: Build Simulator -on: [push,pull_request] +on: [push, pull_request] jobs: - build: + # This is just to ensure the simulator compiles on Linux + build-simulator: runs-on: ubuntu-latest steps: - - name: Install Simulator Deps - run: sudo apt-get update && sudo apt-get install -y gcc-multilib g++-multilib - - uses: actions/checkout@v1 with: submodules: recursive - - name: Generate Configs - working-directory: ./firmware/ - run: sh gen_config.sh + - name: Install multilib + run: | + sudo apt-get update + sudo apt-get install gcc-multilib g++-multilib - - name: Generate Live Documentation - working-directory: ./firmware/ - run: sh gen_live_documentation.sh - - - name: Build Simulator + - name: Compile Simulator working-directory: ./simulator/ - run: make -j4 + run: sh compile.sh + + - name: Upload built simulator + uses: actions/upload-artifact@v2 + with: + name: rusefi_simulator_linux + path: ./simulator/build/rusefi_simulator diff --git a/firmware/config/boards/microrusefi/compile_mre_f4.sh b/firmware/config/boards/microrusefi/compile_mre_f4.sh index 59ea14818b..81688cdc4d 100644 --- a/firmware/config/boards/microrusefi/compile_mre_f4.sh +++ b/firmware/config/boards/microrusefi/compile_mre_f4.sh @@ -4,7 +4,7 @@ cd ../../.. export PROJECT_BOARD=microrusefi export PROJECT_CPU=ARCH_STM32F4 -export EXTRA_PARAMS=-DSHORT_BOARD_NAME=mre_f4 +export EXTRA_PARAMS="-DSHORT_BOARD_NAME=mre_f4" diff --git a/firmware/config/boards/microrusefi/compile_mre_f4_hardware_QC_special_build.sh b/firmware/config/boards/microrusefi/compile_mre_f4_hardware_QC_special_build.sh index 0f31add4b2..bd11512314 100644 --- a/firmware/config/boards/microrusefi/compile_mre_f4_hardware_QC_special_build.sh +++ b/firmware/config/boards/microrusefi/compile_mre_f4_hardware_QC_special_build.sh @@ -4,7 +4,7 @@ cd ../../.. export PROJECT_BOARD=microrusefi export PROJECT_CPU=ARCH_STM32F4 -export EXTRA_PARAMS=-DHW_CHECK_MODE=TRUE -DSHORT_BOARD_NAME=mre_f4 +export EXTRA_PARAMS="-DHW_CHECK_MODE=TRUE -DSHORT_BOARD_NAME=mre_f4" export DEFAULT_ENGINE_TYPE=-DDEFAULT_ENGINE_TYPE=MRE_BOARD_NEW_TEST diff --git a/firmware/config/boards/nucleo_f746/board.mk b/firmware/config/boards/nucleo_f746/board.mk index 6ddc7b8d3e..7cffe40e01 100644 --- a/firmware/config/boards/nucleo_f746/board.mk +++ b/firmware/config/boards/nucleo_f746/board.mk @@ -1,12 +1,12 @@ # List of all the board related files. BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO144_F746ZG/board.c -BOARDSRC_CPP = $(PROJECT_DIR)/config/boards/NUCLEO_F767/board_configuration.cpp +BOARDSRC_CPP = $(PROJECT_DIR)/config/boards/nucleo_f767/board_configuration.cpp # Required include directories -BOARDINC = $(PROJECT_DIR)/config/boards/NUCLEO_F746 $(PROJECT_DIR)/config/stm32f7ems +BOARDINC = $(PROJECT_DIR)/config/boards/nucleo_f746 $(PROJECT_DIR)/config/stm32f7ems CONFDIR=config/stm32f7ems -LDSCRIPT= $(PROJECT_DIR)/config/boards/NUCLEO_F746/STM32F746xG.ld +LDSCRIPT= $(PROJECT_DIR)/config/boards/nucleo_f746/STM32F746xG.ld # Override DEFAULT_ENGINE_TYPE DDEFS += -DDEFAULT_ENGINE_TYPE=DEFAULT_FRANKENSO -DSTM32F746xx diff --git a/firmware/config/boards/nucleo_f746/compile_stm32f746_nucleo.sh b/firmware/config/boards/nucleo_f746/compile_stm32f746_nucleo.sh index 5b8705215e..06920dc224 100644 --- a/firmware/config/boards/nucleo_f746/compile_stm32f746_nucleo.sh +++ b/firmware/config/boards/nucleo_f746/compile_stm32f746_nucleo.sh @@ -2,11 +2,11 @@ # STM32F767 version of the firmware for Nucleo-F746ZG board -export script_name="compile_nucleo_f746.sh" +SCRIPT_NAME="compile_nucleo_f746.sh" echo "Entering $SCRIPT_NAME" cd ../../.. -export PROJECT_BOARD=nucleo_F746 +export PROJECT_BOARD=nucleo_f746 export PROJECT_CPU=ARCH_STM32F7 export EXTRA_PARAMS="-DDUMMY -DSTM32F746xx \ -DEFI_INJECTOR_PIN3=GPIO_UNASSIGNED \ diff --git a/misc/jenkins/build_simulator.sh b/misc/jenkins/build_simulator.sh index e06a37fab7..92feba30ef 100644 --- a/misc/jenkins/build_simulator.sh +++ b/misc/jenkins/build_simulator.sh @@ -9,5 +9,6 @@ mkdir -p out rm -rf build rm -rf .dep sh compile.sh +ls build cd .. [ -e simulator/build/rusefi_simulator.exe ] || { echo "SIMULATOR COMPILATION FAILED"; exit 1; } diff --git a/misc/jenkins/build_working_folder.sh b/misc/jenkins/build_working_folder.sh index 1da8ea73f8..6d8a86a02c 100644 --- a/misc/jenkins/build_working_folder.sh +++ b/misc/jenkins/build_working_folder.sh @@ -88,15 +88,17 @@ cd temp echo "Building bundle" pwd zip -r $FULL_BUNDLE_FILE * -[ $? == 0 ] || (echo "$SCRIPT_NAME: ERROR INVOKING zip"; exit 1) +[ $? -eq 0 ] || (echo "$SCRIPT_NAME: ERROR INVOKING zip"; exit 1) echo "$SCRIPT_FILE: Bundle $FULL_BUNDLE_FILE ready" ls -l $FULL_BUNDLE_FILE [ -e $FULL_BUNDLE_FILE ] || { echo "$SCRIPT_NAME: ERROR not found $FULL_BUNDLE_FILE"; exit 1; } -echo "$SCRIPT_NAME: Uploading full bundle" -ncftpput -u $RUSEFI_BUILD_FTP_USER -p $RUSEFI_BUILD_FTP_PASS $RUSEFI_FTP_SERVER . $FULL_BUNDLE_FILE +if [ -n "$RUSEFI_FTP_SERVER" ]; then + echo "$SCRIPT_NAME: Uploading full bundle" + ncftpput -u $RUSEFI_BUILD_FTP_USER -p $RUSEFI_BUILD_FTP_PASS $RUSEFI_FTP_SERVER . $FULL_BUNDLE_FILE +fi cd .. @@ -112,8 +114,11 @@ cd $FOLDER zip -r ../$UPDATE_BUNDLE_FILE * cd .. ls -l $UPDATE_BUNDLE_FILE -ncftpput -u "$RUSEFI_BUILD_FTP_USER" -p "$RUSEFI_BUILD_FTP_PASS" "$RUSEFI_FTP_SERVER" autoupdate "$UPDATE_BUNDLE_FILE" +if [ -n "$RUSEFI_FTP_SERVER" ]; then + ncftpput -u "$RUSEFI_BUILD_FTP_USER" -p "$RUSEFI_BUILD_FTP_PASS" "$RUSEFI_FTP_SERVER" autoupdate "$UPDATE_BUNDLE_FILE" +fi cd .. +mv temp/$UPDATE_BUNDLE_FILE artifacts echo "$SCRIPT_NAME: We are back in root directory" diff --git a/misc/jenkins/compile_other_versions/prepare_bundle.sh b/misc/jenkins/compile_other_versions/prepare_bundle.sh index e9fab7c4f2..9ed8cdff5a 100644 --- a/misc/jenkins/compile_other_versions/prepare_bundle.sh +++ b/misc/jenkins/compile_other_versions/prepare_bundle.sh @@ -4,11 +4,6 @@ SCRIPT_NAME="prepare_bundle.sh" echo "Entering $SCRIPT_NAME with $BUNDLE_NAME" echo "RUSEFI_BUILD_FTP_USER=$RUSEFI_BUILD_FTP_USER" -if [ -z $RUSEFI_BUILD_FTP_USER ]; then - echo "RUSEFI_BUILD_FTP_USER not set - not packaging" - exit 0 -fi - TIMESTAMP=$(date "+%Y%m%d_%H%M%S") export FOLDER="temp/snapshot_${TIMESTAMP}_${BUNDLE_NAME}_rusefi" diff --git a/misc/jenkins/compile_other_versions/run.bat b/misc/jenkins/compile_other_versions/run.bat index 03530b2fac..cef55a814d 100644 --- a/misc/jenkins/compile_other_versions/run.bat +++ b/misc/jenkins/compile_other_versions/run.bat @@ -14,12 +14,21 @@ rem # rem # see gen_config.sh where short<>long name dictionary is hard-coded rem # +call misc\jenkins\compile_other_versions\compile_and_upload.bat frankenso frankenso_na6 +IF %ERRORLEVEL% NEQ 0 echo ERROR invoking compile_and_upload.bat +IF %ERRORLEVEL% NEQ 0 EXIT /B 1 +pwd + +call misc\jenkins\compile_other_versions\compile_and_upload.bat kinetis kinetis +IF %ERRORLEVEL% NEQ 0 echo ERROR invoking compile_and_upload.bat +IF %ERRORLEVEL% NEQ 0 EXIT /B 1 + call misc\jenkins\compile_other_versions\compile_and_upload.bat microrusefi mre_f4 rusefi_mre_f4.ini IF %ERRORLEVEL% NEQ 0 echo ERROR invoking compile_and_upload.bat IF %ERRORLEVEL% NEQ 0 EXIT /B 1 pwd -rem call misc\jenkins\compile_other_versions\compile_and_upload.bat microrusefi mre_f4_slave rusefi_microrusefi.ini +rem call misc\jenkins\compile_other_versions\compile_and_upload.bat microrusefi mre_f4_slave rusefi_mre_f7.ini rem IF %ERRORLEVEL% NEQ 0 echo ERROR invoking compile_and_upload.bat rem IF %ERRORLEVEL% NEQ 0 EXIT /B 1 rem pwd @@ -29,18 +38,30 @@ IF %ERRORLEVEL% NEQ 0 echo ERROR invoking compile_and_upload.bat IF %ERRORLEVEL% NEQ 0 EXIT /B 1 pwd -call misc\jenkins\compile_other_versions\compile_and_upload.bat kinetis kinetis -IF %ERRORLEVEL% NEQ 0 echo ERROR invoking compile_and_upload.bat -IF %ERRORLEVEL% NEQ 0 EXIT /B 1 +set f7_console_setting=firmware\config\boards\nucleo_f767\rusefi_console_properties.xml -call misc\jenkins\compile_other_versions\compile_and_upload.bat frankenso frankenso_na6 +rem folter_name configuration_name [optional .ini file name] + +call misc\jenkins\compile_other_versions\compile_and_upload.bat microrusefi mre_f7 rusefi_microrusefi.ini %f7_console_setting% IF %ERRORLEVEL% NEQ 0 echo ERROR invoking compile_and_upload.bat IF %ERRORLEVEL% NEQ 0 EXIT /B 1 pwd -set f7_console_setting=firmware\config\boards\nucleo_f767\rusefi_console_properties.xml +rem call misc\jenkins\compile_other_versions\compile_and_upload.bat microrusefi mre_f7_test rusefi_microrusefi.ini %f7_console_setting% +rem IF %ERRORLEVEL% NEQ 0 echo ERROR invoking compile_and_upload.bat +rem IF %ERRORLEVEL% NEQ 0 EXIT /B 1 +rem pwd -rem folter_name configuration_name [optional .ini file name] +call misc\jenkins\compile_other_versions\compile_and_upload.bat prometheus prometheus_405 prometheus_405.ini +IF %ERRORLEVEL% NEQ 0 echo ERROR invoking compile_and_upload.bat +IF %ERRORLEVEL% NEQ 0 EXIT /B 1 +pwd + + +call misc\jenkins\compile_other_versions\compile_and_upload.bat prometheus prometheus_469 prometheus_469.ini +IF %ERRORLEVEL% NEQ 0 echo ERROR invoking compile_and_upload.bat +IF %ERRORLEVEL% NEQ 0 EXIT /B 1 +pwd call misc\jenkins\compile_other_versions\compile_and_upload.bat proteus proteus_f4 rusefi_proteus_f4.ini IF %ERRORLEVEL% NEQ 0 echo ERROR invoking compile_and_upload.bat @@ -52,16 +73,6 @@ IF %ERRORLEVEL% NEQ 0 echo ERROR invoking compile_and_upload.bat IF %ERRORLEVEL% NEQ 0 EXIT /B 1 pwd -call misc\jenkins\compile_other_versions\compile_and_upload.bat microrusefi mre_f7 rusefi_mre_f7.ini %f7_console_setting% -IF %ERRORLEVEL% NEQ 0 echo ERROR invoking compile_and_upload.bat -IF %ERRORLEVEL% NEQ 0 EXIT /B 1 -pwd - -rem call misc\jenkins\compile_other_versions\compile_and_upload.bat microrusefi mre_f7_test rusefi_microrusefi.ini %f7_console_setting% -rem IF %ERRORLEVEL% NEQ 0 echo ERROR invoking compile_and_upload.bat -rem IF %ERRORLEVEL% NEQ 0 EXIT /B 1 -rem pwd - call misc\jenkins\compile_other_versions\compile_and_upload.bat nucleo_f746 stm32f746_nucleo no %f7_console_setting% IF %ERRORLEVEL% NEQ 0 echo ERROR invoking compile_and_upload.bat IF %ERRORLEVEL% NEQ 0 EXIT /B 1 @@ -79,7 +90,6 @@ rem IF %ERRORLEVEL% NEQ 0 echo ERROR invoking compile_and_upload.bat rem IF %ERRORLEVEL% NEQ 0 EXIT /B 1 rem pwd - call misc\jenkins\compile_other_versions\compile_and_upload.bat prometheus prometheus_405 rusefi_prometheus_405.ini IF %ERRORLEVEL% NEQ 0 echo ERROR invoking compile_and_upload.bat IF %ERRORLEVEL% NEQ 0 EXIT /B 1 @@ -90,4 +100,3 @@ call misc\jenkins\compile_other_versions\compile_and_upload.bat prometheus prome IF %ERRORLEVEL% NEQ 0 echo ERROR invoking compile_and_upload.bat IF %ERRORLEVEL% NEQ 0 EXIT /B 1 pwd - diff --git a/misc/jenkins/functional_test_and_build_bundle/build_current_bundle.sh b/misc/jenkins/functional_test_and_build_bundle/build_current_bundle.sh index 78d70923c5..b5f8df2d04 100644 --- a/misc/jenkins/functional_test_and_build_bundle/build_current_bundle.sh +++ b/misc/jenkins/functional_test_and_build_bundle/build_current_bundle.sh @@ -56,10 +56,10 @@ cd .. # At root folder here sh misc/jenkins/build_java_console.sh -[ -e java_console_binary/rusefi_console.jar ] || { echo "rusefi_console.jar build FAILED"; exit -1; } +[ -e java_console_binary/rusefi_console.jar ] || { echo "rusefi_console.jar build FAILED"; exit 1; } sh misc/jenkins/build_simulator.sh -[ -e simulator/build/rusefi_simulator.exe ] || { echo "rusefi_simulator.exe build FAILED"; exit -1; } +[ -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") diff --git a/simulator/Makefile b/simulator/Makefile index 4bd39eadda..71eea1e812 100644 --- a/simulator/Makefile +++ b/simulator/Makefile @@ -100,7 +100,11 @@ endif # # Define project name here -PROJECT = rusefi_simulator +ifeq ($(OS),Windows_NT) + PROJECT = rusefi_simulator.exe +else + PROJECT = rusefi_simulator +endif PROJECT_DIR = ../firmware # Imported source files and paths @@ -214,6 +218,8 @@ ASMXSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) # Compiler settings # +$(info OS is [${OS}]) + ifeq ($(OS),Windows_NT) # ChibiOS seem to require 32 bit compiler at least on Windows # base 32-bit Cygwin is needed with mingw64 32-bit version diff --git a/simulator/clean.bat b/simulator/clean.bat index 20ae4d6a70..402aa98bd1 100644 --- a/simulator/clean.bat +++ b/simulator/clean.bat @@ -1,8 +1,2 @@ @echo off -sh.exe compile.sh || ( - if exist C:\cygwin64 ( - C:\cygwin64\bin\sh.exe compile.sh - ) else ( - if exist C:\cygwin ( C:\cygwin\bin\sh.exe compile.sh ) - ) -) +sh.exe compile.sh diff --git a/simulator/compile.bat b/simulator/compile.bat index 20ae4d6a70..402aa98bd1 100644 --- a/simulator/compile.bat +++ b/simulator/compile.bat @@ -1,8 +1,2 @@ @echo off -sh.exe compile.sh || ( - if exist C:\cygwin64 ( - C:\cygwin64\bin\sh.exe compile.sh - ) else ( - if exist C:\cygwin ( C:\cygwin\bin\sh.exe compile.sh ) - ) -) +sh.exe compile.sh diff --git a/simulator/compile.sh b/simulator/compile.sh index 0175decbb3..ab4db04d75 100644 --- a/simulator/compile.sh +++ b/simulator/compile.sh @@ -1,3 +1,4 @@ rm -f build/rusefi_simulator.exe make -j4 -r +file build/rusefi_simulator echo "TIMESTAMP $(date "+%D %T.%2N") just compiled rusefi simulator" diff --git a/unit_tests/ci_gcov.sh b/unit_tests/ci_gcov.sh index 6d501f3cbd..d91c289ef0 100755 --- a/unit_tests/ci_gcov.sh +++ b/unit_tests/ci_gcov.sh @@ -35,6 +35,7 @@ lcov --capture --directory . --output-file coverage.info echo -e "\nGenerating HTML" genhtml coverage.info --output-directory gcov -echo -e "\nUploading HTML" - -ncftpput -m -R -v -u "$1" -p "$2" "$3" /unit_tests_coverage gcov/* +if [ -n "$RUSEFI_FTP_SERVER" ]; then + echo -e "\nUploading HTML" + ncftpput -m -R -v -u "$1" -p "$2" "$3" /unit_tests_coverage gcov/* +fi diff --git a/unit_tests/compile.bat b/unit_tests/compile.bat index 20ae4d6a70..402aa98bd1 100644 --- a/unit_tests/compile.bat +++ b/unit_tests/compile.bat @@ -1,8 +1,2 @@ @echo off -sh.exe compile.sh || ( - if exist C:\cygwin64 ( - C:\cygwin64\bin\sh.exe compile.sh - ) else ( - if exist C:\cygwin ( C:\cygwin\bin\sh.exe compile.sh ) - ) -) +sh.exe compile.sh