From a82a9cc3f727171e47711f011ef429ef09b40a17 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Wed, 31 Aug 2022 20:53:17 -0400 Subject: [PATCH] reducing code duplication and making CI happier --- .github/workflows/build-android.yaml | 7 ++----- .github/workflows/build-rusEFI-console.yaml | 8 ++------ .github/workflows/build-simulator.yaml | 12 ++---------- .github/workflows/build-unit-tests.yaml | 12 ++---------- .github/workflows/hardware-ci.yaml | 1 + firmware/gen_default_everything.sh | 5 +++++ 6 files changed, 14 insertions(+), 31 deletions(-) mode change 100644 => 100755 firmware/gen_default_everything.sh diff --git a/.github/workflows/build-android.yaml b/.github/workflows/build-android.yaml index 9fb8cb15ee..dca5ce5a7e 100644 --- a/.github/workflows/build-android.yaml +++ b/.github/workflows/build-android.yaml @@ -18,13 +18,10 @@ jobs: - name: Install Tools run: sudo apt-get install mtools - - name: Generate Configs to survive meta info change + - name: Generate Configs, Enums & Live Documentation working-directory: ./firmware/ - run: ./gen_config_default.sh + run: ./gen_default_everything.sh - - name: Generate Live Documentation to survive meta info change - working-directory: ./firmware/ - run: ./gen_live_documentation.sh - name: Test Compiler run: javac -version diff --git a/.github/workflows/build-rusEFI-console.yaml b/.github/workflows/build-rusEFI-console.yaml index d11639d8d4..f9ed503a62 100644 --- a/.github/workflows/build-rusEFI-console.yaml +++ b/.github/workflows/build-rusEFI-console.yaml @@ -22,13 +22,9 @@ jobs: - name: Install Tools run: sudo apt-get install sshpass mtools - - name: Generate Configs to survive meta info change + - name: Generate Configs, Enums & Live Documentation working-directory: ./firmware/ - run: ./gen_config_default.sh - - - name: Generate Live Documentation to survive meta info change - working-directory: ./firmware/ - run: ./gen_live_documentation.sh + run: ./gen_default_everything.sh - name: Generate Java (Antlr) working-directory: ./android diff --git a/.github/workflows/build-simulator.yaml b/.github/workflows/build-simulator.yaml index ca8ce85a97..6137834e2d 100644 --- a/.github/workflows/build-simulator.yaml +++ b/.github/workflows/build-simulator.yaml @@ -25,17 +25,9 @@ jobs: sudo apt-get update sudo apt-get install gcc-multilib g++-multilib mtools dosfstools zip - - name: Generate Configs for simulator + - name: Generate Configs, Enums & Live Documentation working-directory: ./firmware/ - run: ./gen_config_default.sh - - - name: Generate Enums - working-directory: ./firmware/ - run: ./gen_enum_to_string.sh - - - name: Generate Live Documentation - working-directory: ./firmware/ - run: ./gen_live_documentation.sh + run: ./gen_default_everything.sh - name: Compile Simulator working-directory: ./simulator/ diff --git a/.github/workflows/build-unit-tests.yaml b/.github/workflows/build-unit-tests.yaml index 788dc65232..e0747de141 100644 --- a/.github/workflows/build-unit-tests.yaml +++ b/.github/workflows/build-unit-tests.yaml @@ -31,17 +31,9 @@ jobs: run: | brew install mtools zip dosfstools - - name: Generate Configs for unit tests + - name: Generate Configs, Enums & Live Documentation working-directory: ./firmware/ - run: ./gen_config_default.sh - - - name: Generate Enums - working-directory: ./firmware/ - run: ./gen_enum_to_string.sh - - - name: Generate Live Documentation - working-directory: ./firmware/ - run: ./gen_live_documentation.sh + 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 diff --git a/.github/workflows/hardware-ci.yaml b/.github/workflows/hardware-ci.yaml index dbeb13df9d..542541a9d7 100644 --- a/.github/workflows/hardware-ci.yaml +++ b/.github/workflows/hardware-ci.yaml @@ -35,6 +35,7 @@ jobs: - name: Identify Agent run: uname -a +# huh? why do we gen_config_default here if we gen_config_board later? - name: Generate Configs for HW CI working-directory: ./firmware/ run: ./gen_config_default.sh diff --git a/firmware/gen_default_everything.sh b/firmware/gen_default_everything.sh old mode 100644 new mode 100755 index b50809a82a..428e3c6604 --- a/firmware/gen_default_everything.sh +++ b/firmware/gen_default_everything.sh @@ -1,7 +1,12 @@ #!/bin/bash +# is order of operations important here or not really? + echo "gen_enum_to_string.sh as part of everything" ./gen_enum_to_string.sh echo "gen_live_documentation.sh as part of everything" ./gen_live_documentation.sh + +echo "gen_config_default.sh as part of everything" +./gen_config_default.sh \ No newline at end of file