diff --git a/.github/workflows/build-firmware.yaml b/.github/workflows/build-firmware.yaml index 16fc342529..9a0a8a6d65 100644 --- a/.github/workflows/build-firmware.yaml +++ b/.github/workflows/build-firmware.yaml @@ -574,12 +574,6 @@ jobs: if: ${{ env.full == 'true' }} run: bash misc/jenkins/build_java_console.sh - # Build the simulator - - name: Build simulator - if: ${{ env.full == 'true' }} - # 'OS="Windows_NT"' allows us to build Windows executable on unix - run: OS="Windows_NT" bash misc/jenkins/build_simulator.sh - # - name: Download LibOpenBLT Tool (Linux) # uses: actions/download-artifact@v3 # with: diff --git a/.github/workflows/build-simulator.yaml b/.github/workflows/build-simulator.yaml index 8d63e4381a..0b2f054731 100644 --- a/.github/workflows/build-simulator.yaml +++ b/.github/workflows/build-simulator.yaml @@ -50,7 +50,7 @@ jobs: - name: Compile Linux Simulator working-directory: ./simulator/ - run: ./compile.sh + run: make -j$(nproc) -r - name: Run Simulator Functional Test working-directory: ./java_tools/ diff --git a/firmware/bundle.mk b/firmware/bundle.mk index 6d2a18c048..30358e0763 100644 --- a/firmware/bundle.mk +++ b/firmware/bundle.mk @@ -103,6 +103,9 @@ BUNDLE_FILES = \ $(FOLDER_TARGETS) \ $(CONSOLE_FOLDER_TARGETS) +$(SIMULATOR): + $(MAKE) -C ../simulator -r SIMULATOR_DEBUG_LEVEL_OPT="-O2" OS="Windows_NT" + $(BOOTLOADER_HEX) $(BOOTLOADER_BIN) &: BOARD_DIR=../$(BOARD_DIR) BOARD_META_PATH=../$(BOARD_META_PATH) $(MAKE) -C bootloader -r @@ -145,9 +148,11 @@ $(ARTIFACTS)/$(BUNDLE_FULL_NAME)_autoupdate.zip: $(UPDATE_BUNDLE_FILES) | $(ARTI bundle: $(ARTIFACTS)/$(BUNDLE_FULL_NAME)_autoupdate.zip $(ARTIFACTS)/$(BUNDLE_FULL_NAME).zip all CLEAN_BUNDLE_HOOK: - @echo Cleaning bundle + @echo Cleaning Bundle + $(MAKE) -C ../simulator clean BOARD_DIR=../$(BOARD_DIR) BOARD_META_PATH=../$(BOARD_META_PATH) $(MAKE) -C bootloader clean rm -rf $(FOLDER) + @echo Done Cleaning Bundle PERCENT = % diff --git a/misc/jenkins/build_simulator.bat b/misc/jenkins/build_simulator.bat deleted file mode 100644 index f84277566b..0000000000 --- a/misc/jenkins/build_simulator.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -sh.exe misc\jenkins\build_simulator.sh diff --git a/misc/jenkins/build_simulator.sh b/misc/jenkins/build_simulator.sh deleted file mode 100755 index 1ac7e663ee..0000000000 --- a/misc/jenkins/build_simulator.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -echo "TIMESTAMP $(date "+%D %T.%2N") Building rusefi simulator" -pwd -cd simulator -gcc -v -make -v -mkdir -p out -rm -rf build -rm -rf .dep -export SIMULATOR_DEBUG_LEVEL_OPT="-O2" -bash compile.sh -ls build -cd .. -[ -e simulator/build/rusefi_simulator.exe ] || [ -e simulator/build/rusefi_simulator ] || { echo "SIMULATOR COMPILATION FAILED"; exit 1; } diff --git a/simulator/Makefile b/simulator/Makefile index 31a933ab63..a46b33be59 100644 --- a/simulator/Makefile +++ b/simulator/Makefile @@ -286,3 +286,9 @@ include $(RULESPATH)/rules.mk # Enable precompiled header include $(PROJECT_DIR)/rusefi_pch.mk + +CLEAN_RULE_HOOK: + @echo Cleaning Simulator + rm -rf build + rm -rf .dep + @echo Done Cleaning Simulator diff --git a/simulator/compile.bat b/simulator/compile.bat deleted file mode 100644 index 402aa98bd1..0000000000 --- a/simulator/compile.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -sh.exe compile.sh diff --git a/simulator/compile.sh b/simulator/compile.sh deleted file mode 100755 index 5faac1615f..0000000000 --- a/simulator/compile.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -set -e - -rm -f build/rusefi_simulator.exe -make -j$(nproc) -r $@ -[ $? -eq 0 ] || { echo "Simulator compilation failed"; exit 1; } -file build/rusefi_simulator -echo "TIMESTAMP $(date "+%D %T.%2N") just compiled rusEFI simulator"