From 3accd9f0dc55a336fa6231111ee5332a60749d5a Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 21 Jun 2024 21:37:59 +0200 Subject: [PATCH] Add new GitHub CI action to test code generation Signed-off-by: Steffen Vogel --- .github/workflows/build.yaml | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 00000000..613f5e94 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,46 @@ +name: Build + +on: + pull_request: + push: + branches: + - main + +jobs: + build: + name: Generate code + + runs-on: ubuntu-latest + + strategy: + matrix: + language: + - java + - javascript + - python + - modernpython + - cpp + + schema: + - CGMES_2.4.15_27JAN2020 + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + + - name: Generate code + run: | + pip install . + python -m cimgen.build \ + --outdir=output/${{matrix.language}} \ + --schemadir=cgmes_schema/${{matrix.schema}} \ + --langdir=${{matrix.language}} + + - name: Create artifact + uses: actions/upload-artifact@v4 + with: + name: ${inputs.schema}-${{ matrix.language }} + path: output/${inputs.language}