rusefi/.github/workflows/build-simulator.yaml

121 lines
4.2 KiB
YAML
Raw Normal View History

2021-07-24 13:23:03 -07:00
name: Simulator
Use github actions to build and upload bundles (#1583) * add env var to skip upload * remove checking from compile.bat * working on push.yaml * finish sorting * progress * rename push to builds * rename push to builds * Add skip upload env var * fix pull_request name * fixed typo and changed name * fixed indentation and runs-on * try different env var setup * add nucleos and switch to underscore * add quotes * remove boards that were commented * remove boards that were commented * fix project board name * fixed variable name * add ini-file and console-settings * try installing gcc-multilib first * Install g++-multilib as well * remove unnecessary export * fixed exit numbers * change to different env setup * add simulator and console compilation to board bundles * changed OS and added linux simulator build * add checkout and missing colon * add gcc-multilib installes * Install mingw * fixed install * remove mingw from linux sim and call compile directly * change directory * moved envs to command * debug ls * debug ls * set ftp vars * add makefile debug info * removed batchecks * redirect stdout to easier see orrs * change name * remove redirect, add file inpection * Add conditional project name * Try software upgrade * missing char * update ine files * try quotes * add escapes * add quotes * add escapes and quotes * remove quotes and escapes * remove software upgrade * ignore test 2 * update apt * like this then * forgot import * fix case * remove RUSEFI_SKIP_UPLOAD and check RUSEFI_FTP_SERVER instead * break workflow back apart * upload simulator artifact * fixed operator * update apt * change paths * Update build-firmware.yaml * move update bundle to artifacts * fix var name * Install ncftp * set env vars conditionally * remove check so zips are created * try things the github way and copy to primary * re-enable test * missing space
2020-07-08 08:10:24 -07:00
on: [push, pull_request]
jobs:
Use github actions to build and upload bundles (#1583) * add env var to skip upload * remove checking from compile.bat * working on push.yaml * finish sorting * progress * rename push to builds * rename push to builds * Add skip upload env var * fix pull_request name * fixed typo and changed name * fixed indentation and runs-on * try different env var setup * add nucleos and switch to underscore * add quotes * remove boards that were commented * remove boards that were commented * fix project board name * fixed variable name * add ini-file and console-settings * try installing gcc-multilib first * Install g++-multilib as well * remove unnecessary export * fixed exit numbers * change to different env setup * add simulator and console compilation to board bundles * changed OS and added linux simulator build * add checkout and missing colon * add gcc-multilib installes * Install mingw * fixed install * remove mingw from linux sim and call compile directly * change directory * moved envs to command * debug ls * debug ls * set ftp vars * add makefile debug info * removed batchecks * redirect stdout to easier see orrs * change name * remove redirect, add file inpection * Add conditional project name * Try software upgrade * missing char * update ine files * try quotes * add escapes * add quotes * add escapes and quotes * remove quotes and escapes * remove software upgrade * ignore test 2 * update apt * like this then * forgot import * fix case * remove RUSEFI_SKIP_UPLOAD and check RUSEFI_FTP_SERVER instead * break workflow back apart * upload simulator artifact * fixed operator * update apt * change paths * Update build-firmware.yaml * move update bundle to artifacts * fix var name * Install ncftp * set env vars conditionally * remove check so zips are created * try things the github way and copy to primary * re-enable test * missing space
2020-07-08 08:10:24 -07:00
# This is just to ensure the simulator compiles on Linux
build-simulator:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# todo: how to reduce code duplication of submodules list?
- name: Checkout Submodules
run: |
git submodule update --init --depth=1 firmware/ChibiOS
git submodule update --init --depth=1 firmware/ChibiOS-Contrib
git submodule update --init --depth=1 firmware/libfirmware
git submodule update --init --depth=1 firmware/ext/lua
git submodule update --init --depth=1 firmware/controllers/lua/luaaa
git submodule update --init --depth=1 firmware/controllers/can/wideband_firmware
git submodule update --init --depth=1 java_console/luaformatter
git submodule update --init --depth=1 java_console/peak-can-basic
- name: Print GCC version
working-directory: .
run: gcc -v
Use github actions to build and upload bundles (#1583) * add env var to skip upload * remove checking from compile.bat * working on push.yaml * finish sorting * progress * rename push to builds * rename push to builds * Add skip upload env var * fix pull_request name * fixed typo and changed name * fixed indentation and runs-on * try different env var setup * add nucleos and switch to underscore * add quotes * remove boards that were commented * remove boards that were commented * fix project board name * fixed variable name * add ini-file and console-settings * try installing gcc-multilib first * Install g++-multilib as well * remove unnecessary export * fixed exit numbers * change to different env setup * add simulator and console compilation to board bundles * changed OS and added linux simulator build * add checkout and missing colon * add gcc-multilib installes * Install mingw * fixed install * remove mingw from linux sim and call compile directly * change directory * moved envs to command * debug ls * debug ls * set ftp vars * add makefile debug info * removed batchecks * redirect stdout to easier see orrs * change name * remove redirect, add file inpection * Add conditional project name * Try software upgrade * missing char * update ine files * try quotes * add escapes * add quotes * add escapes and quotes * remove quotes and escapes * remove software upgrade * ignore test 2 * update apt * like this then * forgot import * fix case * remove RUSEFI_SKIP_UPLOAD and check RUSEFI_FTP_SERVER instead * break workflow back apart * upload simulator artifact * fixed operator * update apt * change paths * Update build-firmware.yaml * move update bundle to artifacts * fix var name * Install ncftp * set env vars conditionally * remove check so zips are created * try things the github way and copy to primary * re-enable test * missing space
2020-07-08 08:10:24 -07:00
- name: Install multilib
run: |
2023-02-25 15:07:31 -08:00
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
sudo apt-get install gcc-multilib g++-multilib mtools dosfstools zip
- uses: actions/setup-java@v4
2023-10-30 19:13:29 -07:00
with:
distribution: 'zulu'
java-version: '11'
2023-09-27 12:55:06 -07:00
- name: Code generation tools
2023-09-25 18:18:20 -07:00
working-directory: ./java_tools
2023-09-27 12:55:06 -07:00
run: ./gradlew :config_definition:shadowJar
2023-09-25 18:18:20 -07:00
- name: Generate Configs, Enums & Live Documentation
working-directory: ./firmware/
run: ./gen_default_everything.sh
2023-09-25 18:18:20 -07:00
- name: Gradle autotest java Using freshly generated java code
working-directory: ./java_tools
run: ./gradlew :autotest:shadowJar
2023-01-08 12:24:50 -08:00
- name: Compile Linux Simulator
working-directory: ./simulator/
2024-02-06 16:37:06 -08:00
run: make -j$(nproc) -r
Use github actions to build and upload bundles (#1583) * add env var to skip upload * remove checking from compile.bat * working on push.yaml * finish sorting * progress * rename push to builds * rename push to builds * Add skip upload env var * fix pull_request name * fixed typo and changed name * fixed indentation and runs-on * try different env var setup * add nucleos and switch to underscore * add quotes * remove boards that were commented * remove boards that were commented * fix project board name * fixed variable name * add ini-file and console-settings * try installing gcc-multilib first * Install g++-multilib as well * remove unnecessary export * fixed exit numbers * change to different env setup * add simulator and console compilation to board bundles * changed OS and added linux simulator build * add checkout and missing colon * add gcc-multilib installes * Install mingw * fixed install * remove mingw from linux sim and call compile directly * change directory * moved envs to command * debug ls * debug ls * set ftp vars * add makefile debug info * removed batchecks * redirect stdout to easier see orrs * change name * remove redirect, add file inpection * Add conditional project name * Try software upgrade * missing char * update ine files * try quotes * add escapes * add quotes * add escapes and quotes * remove quotes and escapes * remove software upgrade * ignore test 2 * update apt * like this then * forgot import * fix case * remove RUSEFI_SKIP_UPLOAD and check RUSEFI_FTP_SERVER instead * break workflow back apart * upload simulator artifact * fixed operator * update apt * change paths * Update build-firmware.yaml * move update bundle to artifacts * fix var name * Install ncftp * set env vars conditionally * remove check so zips are created * try things the github way and copy to primary * re-enable test * missing space
2020-07-08 08:10:24 -07:00
- name: Run Simulator Functional Test
working-directory: ./java_tools/
run: ./gradlew simulatorFunctionalTestLauncherWithSimulator
- name: Run Linux Simulator for 10 seconds
working-directory: ./simulator/
run: ./build/rusefi_simulator 10
2023-12-10 12:09:49 -08:00
- name: Git Status and Simulator generated folder Status
2023-08-19 17:53:34 -07:00
run: |
2023-12-10 12:09:49 -08:00
git status
ls -l simulator/generated/
2023-08-19 17:53:34 -07:00
2023-09-27 12:55:06 -07:00
- name: Gradle tune-tools
working-directory: ./java_tools
run: ./gradlew :tune-tools:shadowJar
2023-08-19 17:53:34 -07:00
- name: Convert .bin from Linux Simulator into .xml
working-directory: ./simulator/
run: ./write_tune.sh
- name: Commit fresh generated default simulator tune
2023-08-21 14:02:52 -07:00
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub gen-default-tune Action"
echo See https://github.com/rusefi/rusefi/issues/2446
2023-12-10 21:04:52 -08:00
echo "Status 1/3"
2023-12-10 15:20:53 -08:00
git status
2024-03-03 20:13:39 -08:00
# not our place to update live data etc
FILES=$(git status --porcelain | grep -e "\.java" -e "\.ini" -e "\.h"| cut -d' ' -f3)
[ -n "$FILES" ] && git restore $FILES
2023-12-10 21:04:52 -08:00
echo "Status 2/3"
git status
2023-12-10 15:20:53 -08:00
git pull https://github.com/rusefi/rusefi master
git add 'simulator/generated/*msq'
git add 'simulator/generated/canned-tunes/*md'
2024-03-03 20:13:39 -08:00
echo "Status 3/3"
2023-12-10 15:20:53 -08:00
git status
OUT=$(git commit -am "Auto-generated default tune" 2>&1) || echo "commit failed, finding out why"
if echo "$OUT" | grep 'nothing to commit'; then
echo "default tune: looks like nothing to commit"
echo "NOCOMMIT=true" >> $GITHUB_ENV
exit 0
elif echo "$OUT" | grep 'changed'; then
echo "default tune: looks like something has changed"
exit 0
else
echo "default tune: looks like something unexpected"
exit 1
fi
2023-06-16 17:57:43 -07:00
- name: Push fresh default tune
2023-06-18 19:33:18 -07:00
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && env.NOCOMMIT != 'true'}}
uses: ad-m/github-push-action@master
with:
github_token: ${{ github.token }}
branch: ${{ steps.extract_branch.outputs.branch }}
2023-01-08 12:24:50 -08:00
- name: Upload Linux built simulator
uses: actions/upload-artifact@v4
Use github actions to build and upload bundles (#1583) * add env var to skip upload * remove checking from compile.bat * working on push.yaml * finish sorting * progress * rename push to builds * rename push to builds * Add skip upload env var * fix pull_request name * fixed typo and changed name * fixed indentation and runs-on * try different env var setup * add nucleos and switch to underscore * add quotes * remove boards that were commented * remove boards that were commented * fix project board name * fixed variable name * add ini-file and console-settings * try installing gcc-multilib first * Install g++-multilib as well * remove unnecessary export * fixed exit numbers * change to different env setup * add simulator and console compilation to board bundles * changed OS and added linux simulator build * add checkout and missing colon * add gcc-multilib installes * Install mingw * fixed install * remove mingw from linux sim and call compile directly * change directory * moved envs to command * debug ls * debug ls * set ftp vars * add makefile debug info * removed batchecks * redirect stdout to easier see orrs * change name * remove redirect, add file inpection * Add conditional project name * Try software upgrade * missing char * update ine files * try quotes * add escapes * add quotes * add escapes and quotes * remove quotes and escapes * remove software upgrade * ignore test 2 * update apt * like this then * forgot import * fix case * remove RUSEFI_SKIP_UPLOAD and check RUSEFI_FTP_SERVER instead * break workflow back apart * upload simulator artifact * fixed operator * update apt * change paths * Update build-firmware.yaml * move update bundle to artifacts * fix var name * Install ncftp * set env vars conditionally * remove check so zips are created * try things the github way and copy to primary * re-enable test * missing space
2020-07-08 08:10:24 -07:00
with:
name: rusefi_simulator_linux
path: ./simulator/build/rusefi_simulator