call gen_config_board with make
This commit is contained in:
parent
800ceecbf3
commit
205d7c6cd4
|
@ -41,9 +41,9 @@ jobs:
|
|||
- name: Test Java Compiler
|
||||
run: javac -version
|
||||
|
||||
- name: Generate Configs, Enums & Live Documentation
|
||||
- name: Generate Enums & Live Documentation
|
||||
working-directory: ./firmware/
|
||||
run: bash gen_default_everything.sh
|
||||
run: bash gen_live_documentation.sh
|
||||
|
||||
- name: Print arm GCC version
|
||||
working-directory: .
|
||||
|
|
|
@ -513,30 +513,6 @@ jobs:
|
|||
working-directory: ./firmware/
|
||||
run: ./gen_live_documentation.sh
|
||||
|
||||
- name: Generate Configs for build-target
|
||||
if: ${{ env.skip != 'true' }}
|
||||
working-directory: ./firmware/
|
||||
# todo: we have code duplication with gen_config.sh here :(
|
||||
run: |
|
||||
if [ "${{ matrix.build-target }}" = "kinetis" ]; then
|
||||
config/boards/kinetis/config/gen_kinetis_config.sh
|
||||
[ $? -eq 0 ] || { echo "ERROR generating board kinetis kin"; exit 1; }
|
||||
elif [ "${{ matrix.build-target }}" = "cypress" ]; then
|
||||
config/boards/cypress/config/gen_cypress_config.sh
|
||||
[ $? -eq 0 ] || { echo "ERROR generating board cypress cypress"; exit 1; }
|
||||
elif [ "${{ matrix.build-target }}" = "subaru_eg33_f7" ]; then
|
||||
bash config/boards/subaru_eg33/config/gen_subaru_config.sh
|
||||
[ $? -eq 0 ] || { echo "ERROR generating board subaru_eg33 subaru_eg33_f7"; exit 1; }
|
||||
elif [ "${{ matrix.build-target }}" = "subaru_eg33_f7_no_bl" ]; then
|
||||
bash config/boards/subaru_eg33/config/gen_subaru_config.sh
|
||||
[ $? -eq 0 ] || { echo "ERROR generating board subaru_eg33 subaru_eg33_f7_no_bl"; exit 1; }
|
||||
elif [ "${{ matrix.short-board-name }}" = "" ]; then
|
||||
echo "ERROR: ${{ matrix.build-target }} is missing short-board-name attribute"
|
||||
exit -1
|
||||
else
|
||||
bash gen_config_board.sh ${{matrix.folder}} ${{matrix.short-board-name}}
|
||||
fi
|
||||
|
||||
- name: Set Build Env Variables
|
||||
if: ${{ env.skip != 'true' }}
|
||||
working-directory: ./firmware/
|
||||
|
|
|
@ -33,9 +33,9 @@ jobs:
|
|||
- name: Test Java Compiler
|
||||
run: javac -version
|
||||
|
||||
- name: Generate Configs, Enums & Live Documentation
|
||||
- name: Generate Enums & Live Documentation
|
||||
working-directory: ./firmware/
|
||||
run: bash gen_default_everything.sh
|
||||
run: bash gen_live_documentation.sh
|
||||
|
||||
- name: Print GCC version
|
||||
working-directory: .
|
||||
|
|
|
@ -35,7 +35,7 @@ jobs:
|
|||
- name: Install required software (macos)
|
||||
if: ${{ matrix.os == 'macos-latest' }}
|
||||
run: |
|
||||
brew install mtools zip dosfstools
|
||||
brew install mtools zip dosfstools flock
|
||||
|
||||
- name: Print bash version
|
||||
working-directory: .
|
||||
|
|
|
@ -116,10 +116,6 @@ jobs:
|
|||
sudo bash ${{inputs.rusefi_dir}}/misc/actions/add-ubuntu-latest-apt-mirrors.sh
|
||||
sudo apt-get install sshpass sshpass mtools
|
||||
|
||||
- name: Gen Config
|
||||
working-directory: ${{inputs.rusefi_dir}}/firmware
|
||||
run: bash gen_config_board.sh
|
||||
|
||||
- name: Repo Status
|
||||
run: |
|
||||
git status
|
||||
|
@ -133,6 +129,23 @@ jobs:
|
|||
echo Not a repository
|
||||
fi
|
||||
|
||||
- name: Configs build_server upload SSH variables
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
|
||||
run: |
|
||||
if [ "${{github.event_name}}" = "push" ] && [ "${{github.ref}}" = "refs/heads/master" ]; then
|
||||
echo "Setting credentials..."
|
||||
echo "RUSEFI_SSH_SERVER=${{secrets.RUSEFI_SSH_SERVER}}" >> $GITHUB_ENV
|
||||
echo "RUSEFI_SSH_USER=${{secrets.RUSEFI_SSH_USER}}" >> $GITHUB_ENV
|
||||
echo "RUSEFI_SSH_PASS=${{secrets.RUSEFI_SSH_PASS}}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "NOT setting credentials: ${{github.event_name}} ${{github.ref}}"
|
||||
fi
|
||||
|
||||
- name: Build Firmware
|
||||
working-directory: ${{inputs.rusefi_dir}}/firmware
|
||||
run: bash bin/compile.sh -b ${{ env.BOARD_META_PATH }} deliver/rusefi.bin
|
||||
|
||||
- name: Push Config
|
||||
run: |
|
||||
git config --local user.email "action@github.com"
|
||||
|
@ -170,23 +183,6 @@ jobs:
|
|||
working-directory: generated/tunerstudio/generated
|
||||
run: ../../../${{inputs.rusefi_dir}}/firmware/tunerstudio/upload_ini.sh ${{ secrets.RUSEFI_ONLINE_FTP_USER }} ${{ secrets.RUSEFI_ONLINE_FTP_PASS }} ${{ secrets.RUSEFI_FTP_SERVER }}
|
||||
|
||||
- name: Configs build_server upload SSH variables
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
|
||||
run: |
|
||||
if [ "${{github.event_name}}" = "push" ] && [ "${{github.ref}}" = "refs/heads/master" ]; then
|
||||
echo "Setting credentials..."
|
||||
echo "RUSEFI_SSH_SERVER=${{secrets.RUSEFI_SSH_SERVER}}" >> $GITHUB_ENV
|
||||
echo "RUSEFI_SSH_USER=${{secrets.RUSEFI_SSH_USER}}" >> $GITHUB_ENV
|
||||
echo "RUSEFI_SSH_PASS=${{secrets.RUSEFI_SSH_PASS}}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "NOT setting credentials: ${{github.event_name}} ${{github.ref}}"
|
||||
fi
|
||||
|
||||
- name: Build Firmware
|
||||
working-directory: ${{inputs.rusefi_dir}}/firmware
|
||||
run: bash bin/compile.sh -b ${{ env.BOARD_META_PATH }} deliver/rusefi.bin
|
||||
|
||||
- name: Upload github action bin artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
|
|
@ -382,6 +382,8 @@ ULIBS = -lm --specs=nano.specs -Wl,--sort-section=alignment
|
|||
|
||||
include $(RULESFILE)
|
||||
|
||||
include rusefi_config.mk
|
||||
|
||||
# Enable precompiled header
|
||||
include rusefi_pch.mk
|
||||
|
||||
|
|
|
@ -22,8 +22,6 @@ else
|
|||
FOLDER = rusefi.snapshot.$(BUNDLE_NAME)
|
||||
endif
|
||||
|
||||
INI_FILE = $(META_OUTPUT_ROOT_FOLDER)tunerstudio/generated/rusefi_$(SHORT_BOARD_NAME).ini
|
||||
|
||||
DELIVER = deliver
|
||||
ARTIFACTS = ../artifacts
|
||||
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
SHORT_BOARD_NAME=cypress
|
||||
PROJECT_CPU=custom_platform
|
||||
CUSTOM_GEN_CONFIG=config/gen_cypress_config.sh
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
SHORT_BOARD_NAME=kin
|
||||
PROJECT_CPU=custom_platform
|
||||
CUSTOM_GEN_CONFIG=config/gen_kinetis_config.sh
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
SHORT_BOARD_NAME=subaru_eg33_f7
|
||||
PROJECT_CPU=ARCH_STM32F7
|
||||
USE_OPENBLT=yes
|
||||
CUSTOM_GEN_CONFIG=config/gen_subaru_config.sh
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
SHORT_BOARD_NAME=subaru_eg33_f7
|
||||
PROJECT_CPU=ARCH_STM32F7
|
||||
CUSTOM_GEN_CONFIG=config/gen_subaru_config.sh
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
set -e
|
||||
|
||||
cd ../java_tools
|
||||
./gradlew :config_definition:shadowJar
|
||||
flock /tmp/java.lock ./gradlew :config_definition:shadowJar
|
||||
cd ../firmware
|
||||
|
||||
echo "This script reads rusefi_config.txt and produces firmware persistent configuration headers"
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
INI_FILE = $(META_OUTPUT_ROOT_FOLDER)tunerstudio/generated/rusefi_$(SHORT_BOARD_NAME).ini
|
||||
|
||||
CONFIG_FILES = \
|
||||
$(PROJECT_DIR)/$(INI_FILE) \
|
||||
$(PROJECT_DIR)/controllers/generated/$(PROJECT)_generated_$(SHORT_BOARD_NAME).h \
|
||||
$(PROJECT_DIR)/controllers/generated/signature_$(SHORT_BOARD_NAME).h \
|
||||
$(PROJECT_DIR)/hw_layer/mass_storage/ramdisk_image.h \
|
||||
$(PROJECT_DIR)/hw_layer/mass_storage/ramdisk_image_compressed.h \
|
||||
$(PROJECT_DIR)/../java_console/models/src/main/java/com/rusefi/config/generated/Fields.java \
|
||||
$(PROJECT_DIR)/$(BOARD_DIR)/connectors/generated_outputs.h \
|
||||
$(PROJECT_DIR)/$(BOARD_DIR)/connectors/generated_ts_name_by_pin.cpp
|
||||
|
||||
.FORCE:
|
||||
|
||||
$(ACOBJS): $(CONFIG_FILES)
|
||||
|
||||
$(CONFIG_FILES): .config-sentinel ;
|
||||
|
||||
.config-sentinel: .FORCE
|
||||
ifneq (,$(CUSTOM_GEN_CONFIG))
|
||||
bash $(PROJECT_DIR)/$(BOARD_DIR)/$(CUSTOM_GEN_CONFIG)
|
||||
else
|
||||
bash $(PROJECT_DIR)/gen_config_board.sh $(BOARD_DIR) $(SHORT_BOARD_NAME)
|
||||
endif
|
||||
@touch $@
|
|
@ -1,12 +1,10 @@
|
|||
|
||||
|
||||
# Add the PCH dir to source path
|
||||
SRCPATHS += $(PCH_DIR)
|
||||
|
||||
PCHOBJ = $(addprefix $(PCH_DIR)/, $(notdir $(PCHSRC:.h=.h.gch)))/$(PCHSUB)
|
||||
|
||||
# Compile precompiled header file(s) as a cpp file, but output to .h.gch file
|
||||
$(PCHOBJ) : $(PCH_DIR)/%.h.gch/$(PCHSUB) : %.h Makefile
|
||||
$(PCHOBJ) : $(PCH_DIR)/%.h.gch/$(PCHSUB) : %.h Makefile $(CONFIG_FILES)
|
||||
@mkdir -p $<.gch
|
||||
ifeq ($(USE_VERBOSE_COMPILE),yes)
|
||||
@echo
|
||||
|
|
Loading…
Reference in New Issue