diff --git a/.github/workflows/check_code_generation.yml b/.github/workflows/check_code_generation.yml new file mode 100644 index 000000000..e730e3cb6 --- /dev/null +++ b/.github/workflows/check_code_generation.yml @@ -0,0 +1,36 @@ +name: check tlm_cmd code generation + +on: + push: + branches: + - main + - develop + pull_request: + +jobs: + check_code_generate: + strategy: + fail-fast: false + matrix: + user: + - mobc + - subobc + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: run tlm-cmd-code-generator + working-directory: ./tlm-cmd-code-generator + run: | + cp "./settings_${{ matrix.user }}.json" ./settings.json + python GenerateC2ACode.py + + - name: check diff + run: | + git add . + if ! git diff --exit-code --cached; then + echo "threre are some diff after code generation" + exit 1 + fi diff --git a/tlm-cmd-code-generator/.gitignore b/tlm-cmd-code-generator/.gitignore index abe7f23f5..b49f294d0 100644 --- a/tlm-cmd-code-generator/.gitignore +++ b/tlm-cmd-code-generator/.gitignore @@ -1,3 +1,5 @@ +settings.json + # OSX .DS_Store .AppleDouble