Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into newparse-datalog
Browse files Browse the repository at this point in the history
  • Loading branch information
mck1117 committed Nov 24, 2023
2 parents df9e9a4 + 57cf158 commit 299f150
Show file tree
Hide file tree
Showing 768 changed files with 70,040 additions and 86,837 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-FOME-console.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand Down
152 changes: 119 additions & 33 deletions .github/workflows/build-firmware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,82 @@ on:
type: string

jobs:
build-libopenblt-linux:
runs-on: ubuntu-latest-selfhost

steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: cmake configure libopenblt
working-directory: ./firmware/ext/openblt/Host/Source/LibOpenBLT/build
run: cmake -DCMAKE_BUILD_TYPE=Release ..

- name: make libopenblt
working-directory: ./firmware/ext/openblt/Host/Source/LibOpenBLT/build
run: make -j8

- name: cmake configure libopenblt_jni
working-directory: ./misc/libopenblt_jni/build
run: cmake -DCMAKE_BUILD_TYPE=Release ..

- name: make libopenblt_jni
working-directory: ./misc/libopenblt_jni/build
run: make -j8

- name: coalesce
run: |
mkdir deliver
cp ./firmware/ext/openblt/Host/libopenblt.so deliver/
cp ./misc/libopenblt_jni/build/libopenblt_jni.so deliver/
- uses: actions/upload-artifact@v3
with:
name: libopenblt-linux
path: |
./deliver/libopenblt.so
./deliver/libopenblt_jni.so
build-libopenblt-macos:
runs-on: macos-13

steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: cmake configure libopenblt
working-directory: ./firmware/ext/openblt/Host/Source/LibOpenBLT/build
run: cmake -DCMAKE_BUILD_TYPE=Release ..

- name: make libopenblt
working-directory: ./firmware/ext/openblt/Host/Source/LibOpenBLT/build
run: make -j8

- name: cmake configure libopenblt_jni
working-directory: ./misc/libopenblt_jni/build
run: cmake -DCMAKE_BUILD_TYPE=Release ..

- name: make libopenblt_jni
working-directory: ./misc/libopenblt_jni/build
run: make -j8

- name: coalesce
run: |
mkdir deliver
cp ./firmware/ext/openblt/Host/libopenblt.dylib deliver/
cp ./misc/libopenblt_jni/build/libopenblt_jni.dylib deliver/
- uses: actions/upload-artifact@v3
with:
name: libopenblt-macos
path: |
./deliver/libopenblt.dylib
./deliver/libopenblt_jni.dylib
build-firmware:
needs: [build-libopenblt-linux, build-libopenblt-macos]
runs-on: ubuntu-latest-selfhost

strategy:
Expand All @@ -32,22 +107,26 @@ jobs:
# folder: config/boards/hellen/hellen81
# ini-file: fome_hellen81.ini

- build-target: alphax-2chan
folder: config/boards/hellen/alphax-2chan
ini-file: fome_alphax-2chan.ini
# - build-target: alphax-2chan
# folder: config/boards/hellen/alphax-2chan
# ini-file: fome_alphax-2chan.ini

- build-target: alphax-4chan
folder: config/boards/hellen/alphax-4chan
ini-file: fome_alphax-4chan.ini
# - build-target: alphax-4chan
# folder: config/boards/hellen/alphax-4chan
# ini-file: fome_alphax-4chan.ini

- build-target: alphax-8chan
folder: config/boards/hellen/alphax-8chan
ini-file: fome_alphax-8chan.ini
# - build-target: alphax-8chan
# folder: config/boards/hellen/alphax-8chan
# ini-file: fome_alphax-8chan.ini

# - build-target: harley81
# folder: config/boards/hellen/harley81
# ini-file: fome_harley81.ini

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

# - build-target: hellen88bmw
# folder: config/boards/hellen/hellen88bmw
# ini-file: fome_hellen88bmw.ini
Expand Down Expand Up @@ -84,9 +163,9 @@ jobs:
# folder: config/boards/hellen/hellen-honda-k
# ini-file: fome_hellen-honda-k.ini

- build-target: hellen154hyundai
folder: config/boards/hellen/hellen154hyundai
ini-file: fome_hellen154hyundai.ini
# - build-target: hellen154hyundai
# folder: config/boards/hellen/hellen154hyundai
# ini-file: fome_hellen154hyundai.ini

# - build-target: frankenso_na6
# folder: config/boards/frankenso
Expand Down Expand Up @@ -156,13 +235,13 @@ jobs:
# folder: config/boards/f429-discovery
# ini-file: fome_f429-discovery.ini

# - build-target: core8
# folder: config/boards/core8
# ini-file: fome_core8.ini
- build-target: core8
folder: config/boards/core8
ini-file: fome_core8.ini

# - build-target: 48way
# folder: config/boards/48way
# ini-file: fome_48way.ini
- build-target: core48
folder: config/boards/core48
ini-file: fome_core48.ini

# - build-target: atlas
# folder: config/boards/atlas
Expand Down Expand Up @@ -190,7 +269,7 @@ jobs:
echo "full=true" >> $GITHUB_ENV
fi
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -211,11 +290,6 @@ jobs:
working-directory: ./firmware/
run: ./gen_live_documentation.sh

# live_data_ids.h is generated above so order of operations is important here!
- name: Generate Enum Strings
working-directory: ./firmware/
run: ./gen_enum_to_string.sh

- name: Generate Configs for build-target
working-directory: ./firmware/
# todo: we have code duplication with gen_config.sh here :(
Expand Down Expand Up @@ -266,19 +340,31 @@ jobs:
# '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:
name: libopenblt-linux
path: ./firmware/ext/openblt/Host/

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

- name: Package Bundle
if: ${{ env.full == 'true' }}
run: bash misc/jenkins/compile_other_versions/prepare_bundle.sh ${{matrix.build-target}} "${{matrix.ini-file}}" ${{ toJSON(inputs.build_name) }}

- name: Upload INI to tunes.fome.tech
if: ${{ env.full == 'true' && env.upload == 'true' }}
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
# - name: Upload INI to tunes.fome.tech
# if: ${{ env.full == 'true' && env.upload == 'true' }}
# 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

# - name: Upload .ini files
# if: ${{ env.full == 'true' && env.upload == 'true' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-simulator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Checkout Submodules
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/delete-all-artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
name: Delete Old Artifacts
runs-on: ubuntu-latest-selfhost
steps:
- uses: actions/github-script@v6
- uses: actions/github-script@v7
id: artifact
with:
# Delete all artifacts
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/gen-configs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Checkout Submodules
run: |
Expand All @@ -26,10 +26,6 @@ jobs:
sudo ./add-ubuntu-latest-apt-mirrors.sh
sudo apt-get install sshpass sshpass mtools
- name: Generate Enum Strings
working-directory: ./firmware/
run: ./gen_enum_to_string.sh

- name: Generate Live Documentation
working-directory: ./firmware/
run: ./gen_live_documentation.sh
Expand Down Expand Up @@ -81,7 +77,7 @@ jobs:
# We need to know what branch this is in order to push to the correct branch
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
id: extract_branch

- name: Push configs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hardware-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
runs-on: ${{matrix.runs-on}}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand Down
54 changes: 29 additions & 25 deletions .github/workflows/readme.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
Here is a diagram of which configure scripts are used for which workflows.
This is not a complete diagram of all workflows, nor does it show everything that these jobs do.

```
Jenkins
+
v
run.bat
+------------+-----------------------+
| | v
| | compile_and_upload.bat
| | +--------------+ +------------------------------+
| | | v v v
| | | gen_config compile.sh
| | | +--------+-------------------+ +
v v | v v v v
Sim Console | ConfigKinetis ConfigDefault ConfigBoard Firmware Package
^ ^ | ^ ^ ^ ^ ^ ^ ^ ^
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | +------+ | |
| | | | | | | | | |
+---+--------+-------------+-------------+--------------+--------------+-----------+
| | | |
+ + + +
Firmware Push Gen Config Unit Tests Firmware PR
```
For up-to-date information check the GitHib workflow actions (GHA) definition files *.yaml

The workflows are triggered by events: push & pull_request

https://github.com/rusefi/rusefi/wiki/Build-Server-and-Automation
```mermaid
flowchart TD
gha_firmware["Firmware"]
firmware_build[["build-firmware.yaml"]]
gha_Console["Console"]
Console_build[["build-FOME-console.yaml"]]
gha_Simulator["Simulator"]
Simulator_build[["build-simulator.yaml"]]
gha_generate_ECU_configs["Generate configs for all supported ECUs"]
generate_ECU_configs[["gen-configs.yaml"]]
gha_UnitTests["Unit tests"]
UnitTests_build[["build-unit-tests.yaml"]]
gha_Hardware_CI["Hardware Continous Integration"]
Hardware_CI[["hardware-ci.yaml"]]
gha_firmware --> firmware_build
gha_generate_ECU_configs ---> generate_ECU_configs
gha_Console ---> Console_build
gha_Simulator ---> Simulator_build
gha_UnitTests ---> UnitTests_build
gha_Hardware_CI ---> Hardware_CI
```
2 changes: 1 addition & 1 deletion .github/workflows/set-date.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
if: ${{ github.repository == 'FOME-Tech/fome-fw' }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Check last date
run: if [ "$(git log -1 --pretty=%B)" = "Update date" ]; then echo "skip=true" >> $GITHUB_ENV; fi
Expand Down
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
branch = rusefi_prod_2021_11_12
[submodule "firmware/ext/openblt"]
path = firmware/ext/openblt
url = https://github.com/rusefi/openblt
branch = rusefi_prod
url = https://github.com/fome-tech/openblt
branch = master
[submodule "misc/hex2dfu"]
path = misc/hex2dfu
url = https://github.com/rusefi/hex2dfu
Expand Down
Loading

0 comments on commit 299f150

Please sign in to comment.