From 2dec5c58694511265ad4d27fc8f942988fe9bcbb Mon Sep 17 00:00:00 2001 From: Andrey Date: Fri, 16 Jun 2023 19:46:09 -0400 Subject: [PATCH] Improve toolset for default tune canned tune generation #4871 --- .github/workflows/build-simulator.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/build-simulator.yaml b/.github/workflows/build-simulator.yaml index cd4ba7bd8a..2271b7377d 100644 --- a/.github/workflows/build-simulator.yaml +++ b/.github/workflows/build-simulator.yaml @@ -46,6 +46,27 @@ jobs: working-directory: ./simulator/ run: ./compile.sh + - name: Commit fresh generated default simulator tune + 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" + git add simulator/generated + 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 "::set-env name=NOCOMMIT::true" + 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 + - name: Run Linux Simulator for 10 seconds working-directory: ./simulator/ run: ./build/rusefi_simulator 10