2022-01-26 13:27:17 -08:00
|
|
|
name: Firmware at GHA
|
2019-11-20 20:34:55 -08:00
|
|
|
|
2023-01-21 17:24:07 -08:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
2023-05-12 00:18:52 -07:00
|
|
|
do_upload:
|
|
|
|
description: 'Upload Build Outputs'
|
2023-01-21 17:24:07 -08:00
|
|
|
required: false
|
|
|
|
type: boolean
|
2023-03-02 01:17:39 -08:00
|
|
|
|
2019-11-20 20:34:55 -08:00
|
|
|
jobs:
|
2020-07-08 08:10:24 -07:00
|
|
|
build-firmware:
|
2023-02-21 10:56:30 -08:00
|
|
|
runs-on: ubuntu-latest-selfhost
|
2022-11-08 15:10:53 -08:00
|
|
|
|
2019-11-20 20:34:55 -08:00
|
|
|
strategy:
|
|
|
|
# Let all builds finish even if one fails early
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
2021-01-08 09:50:13 -08:00
|
|
|
# Board configurations
|
2023-02-22 20:35:07 -08:00
|
|
|
- build-target: hellen72
|
|
|
|
folder: config/boards/hellen/hellen72
|
|
|
|
ini-file: fome_hellen72.ini
|
2021-01-08 09:50:13 -08:00
|
|
|
|
2023-02-21 10:50:15 -08:00
|
|
|
# - build-target: hellen81
|
|
|
|
# folder: config/boards/hellen/hellen81
|
|
|
|
# ini-file: fome_hellen81.ini
|
2021-12-01 19:07:25 -08:00
|
|
|
|
2023-04-28 23:11:59 -07:00
|
|
|
- build-target: alphax-2chan
|
|
|
|
folder: config/boards/hellen/alphax-2chan
|
|
|
|
ini-file: fome_alphax-2chan.ini
|
2022-01-05 11:12:12 -08:00
|
|
|
|
2022-02-09 16:59:08 -08:00
|
|
|
- build-target: alphax-4chan
|
2023-02-06 04:37:17 -08:00
|
|
|
folder: config/boards/hellen/alphax-4chan
|
2023-02-21 02:29:22 -08:00
|
|
|
ini-file: fome_alphax-4chan.ini
|
2022-02-09 16:59:08 -08:00
|
|
|
|
2023-04-28 23:11:59 -07:00
|
|
|
- build-target: alphax-8chan
|
|
|
|
folder: config/boards/hellen/alphax-8chan
|
|
|
|
ini-file: fome_alphax-8chan.ini
|
2022-12-01 20:07:13 -08:00
|
|
|
|
2023-02-21 10:50:15 -08:00
|
|
|
# - build-target: harley81
|
|
|
|
# folder: config/boards/hellen/harley81
|
|
|
|
# ini-file: fome_harley81.ini
|
2022-02-09 16:59:08 -08:00
|
|
|
|
2023-02-21 10:50:15 -08:00
|
|
|
# - build-target: hellen88bmw
|
|
|
|
# folder: config/boards/hellen/hellen88bmw
|
|
|
|
# ini-file: fome_hellen88bmw.ini
|
2021-10-11 17:51:05 -07:00
|
|
|
|
2021-08-07 10:02:39 -07:00
|
|
|
- build-target: hellen-nb1
|
2023-02-06 04:37:17 -08:00
|
|
|
folder: config/boards/hellen/hellen-nb1
|
2023-02-21 02:29:22 -08:00
|
|
|
ini-file: fome_hellen-nb1.ini
|
2021-08-07 10:02:39 -07:00
|
|
|
|
2023-02-21 10:50:15 -08:00
|
|
|
# - build-target: hellen-gm-e67
|
|
|
|
# folder: config/boards/hellen/hellen-gm-e67
|
|
|
|
# ini-file: fome_hellen-gm-e67.ini
|
|
|
|
|
2023-02-22 20:35:07 -08:00
|
|
|
- build-target: hellenNA8_96
|
|
|
|
folder: config/boards/hellen/hellenNA8_96
|
|
|
|
ini-file: fome_hellenNA8_96.ini
|
2023-02-21 10:50:15 -08:00
|
|
|
|
2023-02-22 20:35:07 -08:00
|
|
|
- build-target: hellenNA6
|
|
|
|
folder: config/boards/hellen/hellen64_miataNA6_94
|
|
|
|
ini-file: fome_hellenNA6.ini
|
2023-02-21 10:50:15 -08:00
|
|
|
|
|
|
|
# - build-target: hellen128
|
|
|
|
# folder: config/boards/hellen/hellen128
|
|
|
|
# ini-file: fome_hellen128mercedes.ini
|
|
|
|
|
|
|
|
# - build-target: hellen121vag
|
|
|
|
# folder: config/boards/hellen/hellen121vag
|
|
|
|
# ini-file: fome_hellen121vag.ini
|
|
|
|
|
|
|
|
# - build-target: hellen121nissan
|
|
|
|
# folder: config/boards/hellen/hellen121nissan
|
|
|
|
# ini-file: fome_hellen121nissan.ini
|
|
|
|
|
|
|
|
# - build-target: hellen-honda-k
|
|
|
|
# folder: config/boards/hellen/hellen-honda-k
|
|
|
|
# ini-file: fome_hellen-honda-k.ini
|
|
|
|
|
2023-04-28 23:11:59 -07:00
|
|
|
- build-target: hellen154hyundai
|
|
|
|
folder: config/boards/hellen/hellen154hyundai
|
|
|
|
ini-file: fome_hellen154hyundai.ini
|
2023-02-21 10:50:15 -08:00
|
|
|
|
|
|
|
# - build-target: frankenso_na6
|
|
|
|
# folder: config/boards/frankenso
|
|
|
|
# ini-file: fome_frankenso_na6.ini
|
2022-06-10 09:30:28 -07:00
|
|
|
|
2020-07-08 08:10:24 -07:00
|
|
|
- build-target: mre_f4
|
2023-02-06 04:37:17 -08:00
|
|
|
folder: config/boards/microrusefi
|
2023-02-21 02:29:22 -08:00
|
|
|
ini-file: fome_mre_f4.ini
|
2020-07-08 08:10:24 -07:00
|
|
|
|
2023-02-21 10:50:15 -08:00
|
|
|
# - build-target: mre_f4_no_openblt
|
|
|
|
# folder: config/boards/microrusefi
|
|
|
|
# ini-file: fome_mre_f4.ini
|
2023-02-14 05:26:56 -08:00
|
|
|
|
2023-02-21 10:50:15 -08:00
|
|
|
# - build-target: mre_f4_debug
|
|
|
|
# folder: config/boards/microrusefi
|
|
|
|
# ini-file: fome_mre_f4.ini
|
2022-01-10 13:42:31 -08:00
|
|
|
|
2023-02-21 10:50:15 -08:00
|
|
|
# - build-target: mre_f4_recovery
|
|
|
|
# folder: config/boards/microrusefi
|
|
|
|
# ini-file: fome_mre_f4.ini
|
2021-01-28 14:46:49 -08:00
|
|
|
|
2023-02-21 10:50:15 -08:00
|
|
|
# - build-target: mre_f7
|
|
|
|
# folder: config/boards/microrusefi
|
|
|
|
# ini-file: fome_mre_f7.ini
|
2019-12-02 20:54:40 -08:00
|
|
|
|
2023-02-21 10:50:15 -08:00
|
|
|
# - build-target: prometheus_405
|
|
|
|
# folder: config/boards/prometheus
|
|
|
|
# ini-file: fome_prometheus_405.ini
|
2020-07-08 08:10:24 -07:00
|
|
|
|
2023-02-21 10:50:15 -08:00
|
|
|
# - build-target: prometheus_469
|
|
|
|
# folder: config/boards/prometheus
|
|
|
|
# ini-file: fome_prometheus_469.ini
|
2020-07-08 08:10:24 -07:00
|
|
|
|
|
|
|
- build-target: proteus_f4
|
2023-02-06 04:37:17 -08:00
|
|
|
folder: config/boards/proteus
|
2023-02-21 02:29:22 -08:00
|
|
|
ini-file: fome_proteus_f4.ini
|
2020-07-08 08:10:24 -07:00
|
|
|
|
|
|
|
- build-target: proteus_f7
|
2023-02-06 04:37:17 -08:00
|
|
|
folder: config/boards/proteus
|
2023-02-21 02:29:22 -08:00
|
|
|
ini-file: fome_proteus_f7.ini
|
2020-07-08 08:10:24 -07:00
|
|
|
|
2023-03-15 19:26:55 -07:00
|
|
|
- build-target: proteus_h7
|
|
|
|
folder: config/boards/proteus
|
|
|
|
ini-file: fome_proteus_h7.ini
|
2021-03-07 13:43:00 -08:00
|
|
|
|
2023-02-21 10:50:15 -08:00
|
|
|
# - build-target: proteus_legacy
|
|
|
|
# folder: config/boards/proteus
|
|
|
|
# ini-file: fome_proteus_f7.ini
|
2021-05-08 15:44:19 -07:00
|
|
|
|
2022-10-18 18:19:25 -07:00
|
|
|
- build-target: stm32f429_nucleo
|
2023-02-06 04:37:17 -08:00
|
|
|
folder: config/boards/nucleo_f429
|
2023-02-21 02:29:22 -08:00
|
|
|
ini-file: fome_stm32f429_nucleo.ini
|
2022-10-18 18:19:25 -07:00
|
|
|
|
2023-02-21 10:50:15 -08:00
|
|
|
# - build-target: stm32f767_nucleo
|
|
|
|
# folder: config/boards/nucleo_f767
|
|
|
|
# ini-file: fome_stm32f767_nucleo.ini
|
2019-12-04 12:16:26 -08:00
|
|
|
|
2023-02-21 10:50:15 -08:00
|
|
|
# - build-target: stm32h743_nucleo
|
|
|
|
# folder: config/boards/nucleo_h743
|
|
|
|
# ini-file: fome_stm32h743_nucleo.ini
|
2021-02-08 13:24:38 -08:00
|
|
|
|
2023-02-21 10:50:15 -08:00
|
|
|
# - build-target: subaru_eg33_f7
|
|
|
|
# folder: config/boards/subaru_eg33
|
|
|
|
# ini-file: fome_subaru_eg33_f7.ini
|
2021-02-18 15:18:13 -08:00
|
|
|
|
2023-01-31 20:31:42 -08:00
|
|
|
- build-target: f407-discovery
|
2023-02-06 04:37:17 -08:00
|
|
|
folder: config/boards/f407-discovery
|
2023-02-21 02:29:22 -08:00
|
|
|
ini-file: fome_f407-discovery.ini
|
2023-01-31 20:31:42 -08:00
|
|
|
|
2023-02-21 10:50:15 -08:00
|
|
|
# - build-target: f429-discovery
|
|
|
|
# folder: config/boards/f429-discovery
|
|
|
|
# ini-file: fome_f429-discovery.ini
|
2022-01-10 13:14:39 -08:00
|
|
|
|
2023-02-21 10:50:15 -08:00
|
|
|
# - build-target: core8
|
|
|
|
# folder: config/boards/core8
|
|
|
|
# ini-file: fome_core8.ini
|
2022-02-11 13:06:00 -08:00
|
|
|
|
2023-02-21 10:50:15 -08:00
|
|
|
# - build-target: 48way
|
|
|
|
# folder: config/boards/48way
|
|
|
|
# ini-file: fome_48way.ini
|
2022-05-30 12:56:21 -07:00
|
|
|
|
2023-02-21 10:50:15 -08:00
|
|
|
# - build-target: atlas
|
|
|
|
# folder: config/boards/atlas
|
|
|
|
# ini-file: fome_atlas.ini
|
2021-07-25 22:04:58 -07:00
|
|
|
|
2023-02-21 10:50:15 -08:00
|
|
|
# - build-target: tdg-pdm8
|
|
|
|
# folder: config/boards/tdg-pdm8
|
|
|
|
# ini-file: fome_tdg-pdm8.ini
|
2022-03-30 16:18:18 -07:00
|
|
|
|
2019-11-20 20:34:55 -08:00
|
|
|
steps:
|
2023-01-28 14:00:21 -08:00
|
|
|
- name: Check branch name
|
|
|
|
if: ${{ contains(github.ref_name, '.') }}
|
|
|
|
run: echo '::error::Branch names must not contain ".", this breaks firmware autoupdates.' && exit 1
|
2022-01-13 10:17:32 -08:00
|
|
|
|
2023-05-02 16:09:54 -07:00
|
|
|
- name: Set run condition variables
|
|
|
|
run: |
|
2023-05-02 16:19:29 -07:00
|
|
|
if [ "${{github.repository}}" = "FOME-Tech/fome-fw" ]\
|
2023-05-02 16:09:54 -07:00
|
|
|
&& [ "${{github.event_name}}" = "push" ]\
|
|
|
|
&& [ "${{github.ref}}" = "refs/heads/master" ]\
|
2023-05-12 00:18:52 -07:00
|
|
|
|| [ "${{toJSON(inputs.do_upload)}}" = "true" ]; then
|
2023-05-02 16:09:54 -07:00
|
|
|
echo "full=true" >> $GITHUB_ENV
|
|
|
|
echo "upload=true" >> $GITHUB_ENV
|
|
|
|
elif [ "${{github.event_name}}" = "push" ]\
|
|
|
|
&& [ "${{github.ref}}" = "refs/heads/master" ]; then
|
|
|
|
echo "full=true" >> $GITHUB_ENV
|
|
|
|
fi
|
|
|
|
|
2022-07-27 02:47:07 -07:00
|
|
|
- uses: actions/checkout@v3
|
2023-03-02 01:22:05 -08:00
|
|
|
with:
|
|
|
|
submodules: true
|
2022-01-04 08:51:06 -08:00
|
|
|
|
2023-02-21 10:50:15 -08:00
|
|
|
# - uses: actions/setup-java@v3
|
|
|
|
# with:
|
|
|
|
# distribution: 'zulu'
|
|
|
|
# java-version: '8'
|
|
|
|
|
|
|
|
# - name: Install multilib, mingw, sshpass and mtools
|
|
|
|
# working-directory: ./.github/workflows/
|
|
|
|
# run: |
|
|
|
|
# sudo ./add-ubuntu-latest-apt-mirrors.sh
|
|
|
|
# sudo apt-get install gcc-multilib g++-multilib g++-mingw-w64 gcc-mingw-w64 sshpass mtools
|
|
|
|
# sudo apt-get install zip
|
|
|
|
# sudo apt-get install dosfstools
|
2021-03-03 04:50:53 -08:00
|
|
|
|
2022-04-16 17:34:17 -07:00
|
|
|
- name: Generate Live Documentation
|
|
|
|
working-directory: ./firmware/
|
2022-08-31 17:43:07 -07:00
|
|
|
run: ./gen_live_documentation.sh
|
2022-04-16 17:34:17 -07:00
|
|
|
|
|
|
|
# live_data_ids.h is generated above so order of operations is important here!
|
|
|
|
- name: Generate Enum Strings
|
|
|
|
working-directory: ./firmware/
|
2022-08-31 17:43:07 -07:00
|
|
|
run: ./gen_enum_to_string.sh
|
2022-04-16 17:34:17 -07:00
|
|
|
|
2021-07-30 16:53:49 -07:00
|
|
|
- name: Generate Configs for build-target
|
2020-06-18 15:31:54 -07:00
|
|
|
working-directory: ./firmware/
|
2022-04-11 10:54:18 -07:00
|
|
|
# todo: we have code duplication with gen_config.sh here :(
|
2020-07-14 07:28:26 -07:00
|
|
|
run: |
|
2023-02-20 20:28:16 -08:00
|
|
|
if [ "${{ matrix.build-target }}" = "subaru_eg33_f7" ]; then
|
2022-04-11 10:54:18 -07:00
|
|
|
bash config/boards/subaru_eg33/config/gen_subaru_config.sh
|
2021-02-18 15:18:13 -08:00
|
|
|
[ $? -eq 0 ] || { echo "ERROR generating board subaru_eg33 subaru_eg33_f7"; exit 1; }
|
2023-02-16 15:48:48 -08:00
|
|
|
elif [ "${{ matrix.ini-file }}" = "" ]; then
|
|
|
|
echo "ERROR: ${{ matrix.build-target }} is missing ini-file attribute"
|
|
|
|
exit -1
|
2020-07-14 07:28:26 -07:00
|
|
|
else
|
2021-07-17 18:41:45 -07:00
|
|
|
bash gen_config_board.sh ${{matrix.folder}} ${{matrix.build-target}} ${{matrix.ini-file}}
|
2020-07-14 07:28:26 -07:00
|
|
|
fi
|
2020-06-18 15:31:54 -07:00
|
|
|
|
2019-11-20 20:34:55 -08:00
|
|
|
# Build machines don't have arm-none-eabi gcc, so let's download it and put it on the path
|
2023-02-21 10:50:15 -08:00
|
|
|
# - name: Download & Install GCC
|
|
|
|
# env:
|
|
|
|
# ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
|
|
|
|
# run: |
|
|
|
|
# ./firmware/provide_gcc.sh
|
|
|
|
# echo "::add-path::`pwd`/gcc-arm-none-eabi/bin"
|
2020-11-11 05:30:26 -08:00
|
|
|
|
|
|
|
# Make sure the compiler we just downloaded works - just print out the version
|
|
|
|
- name: Test Compiler
|
|
|
|
run: arm-none-eabi-gcc -v
|
|
|
|
|
2023-03-02 01:17:39 -08:00
|
|
|
# - name: Configs Set SSH variables
|
2023-05-02 16:09:54 -07:00
|
|
|
# if: ${{ env.full == 'true' && env.upload == 'true' }}
|
2023-03-02 01:17:39 -08:00
|
|
|
# env:
|
|
|
|
# ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
|
|
|
|
# run: |
|
2023-05-02 16:09:54 -07:00
|
|
|
# echo "::set-env name=RUSEFI_SSH_SERVER::${{secrets.RUSEFI_SSH_SERVER}}";
|
|
|
|
# echo "::set-env name=RUSEFI_SSH_USER::${{secrets.RUSEFI_SSH_USER}}";
|
|
|
|
# echo "::set-env name=RUSEFI_SSH_PASS::${{secrets.RUSEFI_SSH_PASS}}";
|
2020-07-08 08:10:24 -07:00
|
|
|
|
2023-03-02 02:16:16 -08:00
|
|
|
# Build the firmware!
|
|
|
|
- name: Build Firmware
|
|
|
|
run: bash misc/jenkins/compile_other_versions/compile.sh ${{matrix.folder}} ${{matrix.build-target}}
|
|
|
|
|
2020-07-08 08:10:24 -07:00
|
|
|
# Build rusEFI console
|
|
|
|
- name: Build console
|
2023-05-02 16:09:54 -07:00
|
|
|
if: ${{ env.full == 'true' }}
|
2020-07-14 07:28:26 -07:00
|
|
|
run: bash misc/jenkins/build_java_console.sh
|
2023-01-21 17:24:07 -08:00
|
|
|
|
2020-07-08 08:10:24 -07:00
|
|
|
# Build the simulator
|
2023-05-02 16:09:54 -07:00
|
|
|
- name: Build simulator
|
|
|
|
if: ${{ env.full == 'true' }}
|
2023-02-22 20:42:44 -08:00
|
|
|
# 'OS="Windows_NT"' allows us to build Windows executable on unix
|
|
|
|
run: OS="Windows_NT" bash misc/jenkins/build_simulator.sh
|
2020-07-08 08:10:24 -07:00
|
|
|
|
2020-07-14 07:28:26 -07:00
|
|
|
- name: Package Bundle
|
2023-05-02 16:11:00 -07:00
|
|
|
if: ${{ env.full == 'true' }}
|
2023-05-12 00:18:52 -07:00
|
|
|
run: bash misc/jenkins/compile_other_versions/prepare_bundle.sh ${{matrix.build-target}} "${{matrix.ini-file}}" ${{ github.ref_name }}
|
2020-06-16 09:33:49 -07:00
|
|
|
|
2023-03-02 13:41:52 -08:00
|
|
|
# - name: Upload HyperTuner .ini
|
2023-05-02 16:09:54 -07:00
|
|
|
# if: ${{ env.full == 'true' && env.upload == 'true' }}
|
2023-03-02 13:41:52 -08:00
|
|
|
# uses: hyper-tuner/ini-upload-action@v1
|
|
|
|
# with:
|
|
|
|
# api-url: "${{ secrets.HYPER_TUNER_INI_UPLOAD_URL }}"
|
|
|
|
# username: "${{ secrets.HYPER_TUNER_INI_UPLOAD_USERNAME }}"
|
|
|
|
# password: "${{ secrets.HYPER_TUNER_INI_UPLOAD_PASSWORD }}"
|
|
|
|
# path: ./firmware/tunerstudio/generated/${{matrix.ini-file}}
|
|
|
|
# ecosystem: fome
|
|
|
|
|
2023-02-20 20:23:38 -08:00
|
|
|
# - name: Upload .ini files
|
2023-05-02 16:09:54 -07:00
|
|
|
# if: ${{ env.full == 'true' && env.upload == 'true' }}
|
2023-02-20 20:23:38 -08:00
|
|
|
# working-directory: ./firmware/tunerstudio/generated
|
2023-05-02 16:09:54 -07:00
|
|
|
# run: ../upload_ini.sh ${{matrix.ini-file}} ${{ secrets.RUSEFI_ONLINE_FTP_USER }} ${{ secrets.RUSEFI_ONLINE_FTP_PASS }} ${{ secrets.RUSEFI_FTP_SERVER }}
|
2022-08-17 15:29:07 -07:00
|
|
|
|
2023-02-21 10:52:31 -08:00
|
|
|
# - name: Upload build elf
|
2023-05-02 16:09:54 -07:00
|
|
|
# if: ${{ env.full == 'true' && env.upload == 'true' }}
|
2023-02-21 10:52:31 -08:00
|
|
|
# uses: actions/upload-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: fome_${{matrix.build-target}}.elf
|
|
|
|
# path: ./firmware/build/rusefi.elf
|
2020-07-08 08:10:24 -07:00
|
|
|
|
2023-02-21 10:52:31 -08:00
|
|
|
# - name: Upload build bin
|
2023-05-02 16:09:54 -07:00
|
|
|
# if: ${{ env.full == 'true' && env.upload == 'true' }}
|
2023-02-21 10:52:31 -08:00
|
|
|
# uses: actions/upload-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: fome_${{matrix.build-target}}.bin
|
|
|
|
# path: ./firmware/deliver/rusefi*.bin
|
|
|
|
|
|
|
|
# - name: Upload build hex
|
2023-05-02 16:09:54 -07:00
|
|
|
# if: ${{ env.full == 'true' && env.upload == 'true' }}
|
2023-02-21 10:52:31 -08:00
|
|
|
# uses: actions/upload-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: fome_${{matrix.build-target}}.hex
|
|
|
|
# path: ./firmware/deliver/rusefi*.hex
|
|
|
|
|
|
|
|
# - name: Upload build dfu
|
2023-05-02 16:09:54 -07:00
|
|
|
# if: ${{ env.full == 'true' && env.upload == 'true' }}
|
2023-02-21 10:52:31 -08:00
|
|
|
# uses: actions/upload-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: fome_${{matrix.build-target}}.dfu
|
|
|
|
# path: ./firmware/deliver/rusefi*.dfu
|
|
|
|
|
2023-02-22 20:43:58 -08:00
|
|
|
- name: Upload bundle
|
2023-05-02 16:10:19 -07:00
|
|
|
if: ${{ env.full == 'true' && env.upload == 'true' }}
|
2023-02-22 20:42:44 -08:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: fome_bundle_${{matrix.build-target}}.zip
|
2023-03-02 02:16:16 -08:00
|
|
|
path: ./artifacts/fome_bundle_${{matrix.build-target}}.zip
|