2021-07-24 13:23:03 -07:00
|
|
|
name: Simulator
|
2019-11-20 20:34:55 -08:00
|
|
|
|
2020-07-08 08:10:24 -07:00
|
|
|
on: [push, pull_request]
|
2019-11-20 20:34:55 -08:00
|
|
|
|
|
|
|
jobs:
|
2020-07-08 08:10:24 -07:00
|
|
|
# This is just to ensure the simulator compiles on Linux
|
|
|
|
build-simulator:
|
2019-11-20 20:34:55 -08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
2020-07-08 08:10:24 -07:00
|
|
|
- name: Install multilib
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2021-07-30 17:18:53 -07:00
|
|
|
sudo apt-get install gcc-multilib g++-multilib mtools dosfstools zip
|
2020-06-18 15:31:54 -07:00
|
|
|
|
2021-07-30 16:30:12 -07:00
|
|
|
- name: Generate Configs for simulator
|
2020-09-11 00:34:12 -07:00
|
|
|
working-directory: ./firmware/
|
|
|
|
run: |
|
|
|
|
bash gen_config_default.sh
|
|
|
|
|
2021-01-09 10:03:58 -08:00
|
|
|
- name: Generate Enums
|
|
|
|
working-directory: ./firmware/
|
|
|
|
run: |
|
|
|
|
bash gen_enum_to_string.sh
|
|
|
|
|
2020-07-08 08:10:24 -07:00
|
|
|
- name: Compile Simulator
|
2019-11-20 20:34:55 -08:00
|
|
|
working-directory: ./simulator/
|
2020-08-21 19:46:00 -07:00
|
|
|
run: bash compile.sh
|
2020-07-08 08:10:24 -07:00
|
|
|
|
2021-10-17 17:07:25 -07:00
|
|
|
- name: Run Simulator (10 seconds)
|
|
|
|
working-directory: ./simulator/
|
|
|
|
run: ./build/rusefi_simulator 10
|
|
|
|
|
2020-07-08 08:10:24 -07:00
|
|
|
- name: Upload built simulator
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: rusefi_simulator_linux
|
|
|
|
path: ./simulator/build/rusefi_simulator
|