Skip to content

Commit

Permalink
Merge branch 'FOME-Tech:master' into HighRPM
Browse files Browse the repository at this point in the history
  • Loading branch information
mi-hol authored Jan 11, 2025
2 parents 586bc06 + 4b4df2f commit d570e60
Show file tree
Hide file tree
Showing 855 changed files with 143,382 additions and 222,327 deletions.
18 changes: 18 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/cpp
{
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "cd firmware/; ./setup_linux_environment.sh",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
2 changes: 1 addition & 1 deletion .github/workflows/build-FOME-console.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

- name: Attach console junit results
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: console junit
path: ./java_console/build/*.txt
Expand Down
136 changes: 37 additions & 99 deletions .github/workflows/build-firmware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
cp ./firmware/ext/openblt/Host/libopenblt.so deliver/
cp ./misc/libopenblt_jni/build/libopenblt_jni.so deliver/
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: libopenblt-linux
path: |
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
cp ./firmware/ext/openblt/Host/libopenblt.dylib deliver/
cp ./misc/libopenblt_jni/build/libopenblt_jni.dylib deliver/
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: libopenblt-macos
path: |
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:

- build-target: small-can-board
folder: config/boards/hellen/small-can-board
ini-file: rusefi_small-can-board.ini
ini-file: fome_small-can-board.ini

# - build-target: hellen88bmw
# folder: config/boards/hellen/hellen88bmw
Expand All @@ -147,9 +147,9 @@ jobs:
folder: config/boards/hellen/hellen64_miataNA6_94
ini-file: fome_hellenNA6.ini

# - build-target: hellen128
# folder: config/boards/hellen/hellen128
# ini-file: fome_hellen128mercedes.ini
- build-target: hellen128
folder: config/boards/hellen/hellen128
ini-file: fome_hellen128.ini

# - build-target: hellen121vag
# folder: config/boards/hellen/hellen121vag
Expand All @@ -175,30 +175,10 @@ jobs:
folder: config/boards/microrusefi
ini-file: fome_mre_f4.ini

# - build-target: mre_f4_no_openblt
# folder: config/boards/microrusefi
# ini-file: fome_mre_f4.ini

# - build-target: mre_f4_debug
# folder: config/boards/microrusefi
# ini-file: fome_mre_f4.ini

# - build-target: mre_f4_recovery
# folder: config/boards/microrusefi
# ini-file: fome_mre_f4.ini

- build-target: mre_f7
folder: config/boards/microrusefi
ini-file: fome_mre_f7.ini

# - build-target: prometheus_405
# folder: config/boards/prometheus
# ini-file: fome_prometheus_405.ini

# - build-target: prometheus_469
# folder: config/boards/prometheus
# ini-file: fome_prometheus_469.ini

- build-target: proteus_f4
folder: config/boards/proteus
ini-file: fome_proteus_f4.ini
Expand Down Expand Up @@ -243,9 +223,9 @@ jobs:
folder: config/boards/core48
ini-file: fome_core48.ini

# - build-target: atlas
# folder: config/boards/atlas
# ini-file: fome_atlas.ini
- build-target: atlas
folder: config/boards/atlas
ini-file: fome_atlas.ini

# - build-target: tdg-pdm8
# folder: config/boards/tdg-pdm8
Expand All @@ -269,10 +249,18 @@ jobs:
echo "full=true" >> $GITHUB_ENV
fi
- name: Pre-build Cleanup Test
run: |
ls -l firmware
- uses: actions/checkout@v4
with:
submodules: true

- name: Pre-build Cleanup Test 2
run: |
ls -l firmware
# - uses: actions/setup-java@v3
# with:
# distribution: 'zulu'
Expand All @@ -290,45 +278,14 @@ jobs:
working-directory: ./firmware/
run: ./gen_live_documentation.sh

- name: Generate Configs for build-target
working-directory: ./firmware/
# todo: we have code duplication with gen_config.sh here :(
run: |
if [ "${{ 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.ini-file }}" = "" ]; then
echo "ERROR: ${{ matrix.build-target }} is missing ini-file attribute"
exit -1
else
bash gen_config_board.sh ${{matrix.folder}} ${{matrix.build-target}} ${{matrix.ini-file}}
fi
# Build machines don't have arm-none-eabi gcc, so let's download it and put it on the path
# - name: Download & Install GCC
# env:
# ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
# run: |
# ./firmware/provide_gcc.sh
# echo "::add-path::`pwd`/gcc-arm-none-eabi/bin"

# Make sure the compiler we just downloaded works - just print out the version
- name: Test Compiler
run: arm-none-eabi-gcc -v

# - name: Configs Set SSH variables
# if: ${{ env.full == 'true' && env.upload == 'true' }}
# env:
# ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
# run: |
# 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}}";

# Build the firmware!
- name: Build Firmware
run: bash misc/jenkins/compile_other_versions/compile.sh ${{matrix.folder}} ${{matrix.build-target}}

- name: Check for illegal time conversions
working-directory: ./firmware/
run: bash check_illegal_conversion.sh

# Build rusEFI console
- name: Build console
if: ${{ env.full == 'true' }}
Expand All @@ -337,17 +294,18 @@ jobs:
# Build the simulator
- name: Build simulator
if: ${{ env.full == 'true' }}
working-directory: ./simulator/
# 'OS="Windows_NT"' allows us to build Windows executable on unix
run: OS="Windows_NT" SHORT_BOARD_NAME=${{matrix.build-target}} bash misc/jenkins/build_simulator.sh
run: OS="Windows_NT" SHORT_BOARD_NAME=${{matrix.build-target}} ./compile.sh

- name: Download LibOpenBLT Tool (Linux)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: libopenblt-linux
path: ./firmware/ext/openblt/Host/

- name: Download LibOpenBLT Tool (MacOS)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: libopenblt-macos
path: ./firmware/ext/openblt/Host/
Expand All @@ -367,42 +325,22 @@ jobs:
path: ./firmware/tunerstudio/generated/${{matrix.ini-file}}
ecosystem: fome

# - name: Upload .ini files
# if: ${{ env.full == 'true' && env.upload == 'true' }}
# working-directory: ./firmware/tunerstudio/generated
# run: ../upload_ini.sh ${{matrix.ini-file}} ${{ secrets.RUSEFI_ONLINE_FTP_USER }} ${{ secrets.RUSEFI_ONLINE_FTP_PASS }} ${{ secrets.RUSEFI_FTP_SERVER }}

# - name: Upload build elf
# if: ${{ env.full == 'true' && env.upload == 'true' }}
# uses: actions/upload-artifact@v3
# with:
# name: fome_${{matrix.build-target}}.elf
# path: ./firmware/build/rusefi.elf

# - name: Upload build bin
# if: ${{ env.full == 'true' && env.upload == 'true' }}
# uses: actions/upload-artifact@v3
# with:
# name: fome_${{matrix.build-target}}.bin
# path: ./firmware/deliver/rusefi*.bin

# - name: Upload build hex
# if: ${{ env.full == 'true' && env.upload == 'true' }}
# uses: actions/upload-artifact@v3
# with:
# name: fome_${{matrix.build-target}}.hex
# path: ./firmware/deliver/rusefi*.hex
# If not uploading the full bundle, at least upload the bin+ini so you can test off a PR
- name: Upload build bin
uses: actions/upload-artifact@v3
with:
name: fome_${{matrix.build-target}}.bin
path: ./firmware/deliver/fome.bin

# - name: Upload build dfu
# if: ${{ env.full == 'true' && env.upload == 'true' }}
# uses: actions/upload-artifact@v3
# with:
# name: fome_${{matrix.build-target}}.dfu
# path: ./firmware/deliver/rusefi*.dfu
- name: Upload ini
uses: actions/upload-artifact@v3
with:
name: ${{matrix.ini-file}}
path: ./firmware/tunerstudio/generated/${{matrix.ini-file}}

- name: Upload bundle
if: ${{ env.full == 'true' && env.upload == 'true' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: fome_bundle_${{matrix.build-target}}.zip
path: ./artifacts/fome_bundle_${{matrix.build-target}}.zip
6 changes: 1 addition & 5 deletions .github/workflows/build-simulator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ jobs:
sudo ./add-ubuntu-latest-apt-mirrors.sh
sudo apt-get install gcc-multilib g++-multilib mtools dosfstools zip
- name: Generate Configs, Enums & Live Documentation
working-directory: ./firmware/
run: ./gen_default_everything.sh

- name: Compile Linux Simulator
working-directory: ./simulator/
run: SHORT_BOARD_NAME=f407-discovery ./compile.sh
Expand All @@ -47,7 +43,7 @@ jobs:
run: ./build/fome_simulator 10

- name: Upload Linux built simulator
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: fome_simulator_linux
path: ./simulator/build/fome_simulator
7 changes: 2 additions & 5 deletions .github/workflows/build-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ jobs:
run: |
brew install mtools zip dosfstools
- name: Generate Configs, Enums & Live Documentation
working-directory: ./firmware/
run: ./gen_default_everything.sh

- name: Print Compiler version
# NOTE: on mac, this is actually symlink'd to clang, not gcc, but that's ok - we want to build on both
working-directory: .
Expand All @@ -46,7 +42,8 @@ jobs:

- name: Run Tests
working-directory: ./unit_tests/
run: ASAN_OPTIONS=detect_stack_use_after_return=1 build/fome_test
#run: ASAN_OPTIONS=detect_stack_use_after_return=1 build/fome_test
run: build/fome_test

- name: Set FTP variables
env:
Expand Down
33 changes: 13 additions & 20 deletions .github/workflows/hardware-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ jobs:
# openocd-script: ../.github/workflows/openocd_ci_f4_discovery.cfg
# serial-device: /dev/serial/by-id/usb-FOME_FOME_Engine_Management_ECU_2B003B000A51343033393930-if01

- build-target: f407-discovery
runs-on: hw-ci-f4-discovery-2
test-suite: com.rusefi.HwCiF4Discovery
folder: config/boards/f407-discovery
openocd-script: ../.github/workflows/openocd_ci_f4_discovery_2.cfg
serial-device: /dev/serial/by-id/usb-FOME_FOME_Engine_Management_ECU_1E0032000851353238333131-if01

# - build-target: proteus_f4
# runs-on: hw-ci-proteus
# test-suite: com.rusefi.HwCiF4Proteus
# folder: config/boards/proteus
# openocd-script: ../.github/workflows/openocd_ci_proteus.cfg
# serial-device: /dev/serial/by-id/usb-FOME_FOME_Engine_Management_ECU_41003D000451383037343335-if01
# - build-target: f407-discovery
# runs-on: hw-ci-f4-discovery-2
# test-suite: com.rusefi.HwCiF4Discovery
# folder: config/boards/f407-discovery
# openocd-script: ../.github/workflows/openocd_ci_f4_discovery_2.cfg
# serial-device: /dev/serial/by-id/usb-FOME_FOME_Engine_Management_ECU_1E0032000851353238333131-if01

- build-target: proteus_f4
runs-on: hw-ci-proteus
test-suite: com.rusefi.HwCiF4Proteus
folder: config/boards/proteus
openocd-script: ../.github/workflows/openocd_ci_proteus.cfg
serial-device: /dev/serial/by-id/usb-FOME_FOME_Engine_Management_ECU_41003D000451383037343335-if01

runs-on: ${{matrix.runs-on}}

Expand All @@ -40,13 +40,6 @@ jobs:
- name: Identify Agent
run: uname -a

- name: Add compiler to PATH
run: echo "$HOME/.rusefi-tools/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi/bin" >> $GITHUB_PATH

# Make sure the compiler works
- name: Test/Identify Compiler
run: arm-none-eabi-gcc -v

- name: Set EXTRA env
run: |
echo "EXTRA_2_PARAMS=-DHARDWARE_CI" >> $GITHUB_ENV
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/hw-ci/build_for_hw_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ HW_TARGET=$2
# .github/workflows/hw-ci/build_for_hw_ci.sh config/boards/f407-discovery f407-discovery
# .github/workflows/hw-ci/build_for_hw_ci.sh config/boards/proteus proteus_f4

set -e
set -euo pipefail

echo "HW CI build [$HW_FOLDER][$HW_TARGET]"

cd firmware

./gen_live_documentation.sh
./gen_config_board.sh $HW_FOLDER $HW_TARGET

echo "We aren't guaranteed a clean machine every time, so manually clean the output."
make clean
cd ..
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hw-ci/run_hw_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

HW_SUITE=$1

set -e
set -euo pipefail

cd java_tools
./gradlew :autotest:shadowJar
Expand Down
Loading

0 comments on commit d570e60

Please sign in to comment.