From c1330e7500339e9180a189160a5238be16d181c5 Mon Sep 17 00:00:00 2001 From: Ayrton Chilibeck Date: Sat, 6 Sep 2025 11:58:27 -0600 Subject: [PATCH] ci: Added CI configuration --- .github/workflows/default.yml | 53 +++++++++++++++++++++++++++++++++++ tests/GeneratorCIConfig.json | 19 +++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 .github/workflows/default.yml create mode 100644 tests/GeneratorCIConfig.json diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml new file mode 100644 index 0000000..53ad1fb --- /dev/null +++ b/.github/workflows/default.yml @@ -0,0 +1,53 @@ +name: Gazprea Feature Tests + +on: + push: + branches: + - "**" + paths: + - "include/**" + - "lib/**" + - "src/**" + - "tests/**" + +jobs: + build-artifact: + runs-on: self-hosted + container: ghcr.io/cmput415/gaz-utils:latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Configure + run: cmake -B bin -G Ninja . + + - name: Build + run: cd bin && ninja -j $(nproc) + + - name: Upload generator interpreter artifact + id: upload + uses: actions/upload-artifact@v4 + with: + name: generator-interp + path: bin + + llc-tests: + runs-on: self-hosted + container: ghcr.io/cmput415/dragon-runner:latest + needs: [ build-artifact ] + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Download built artifact + uses: actions/download-artifact@v4 + with: + name: generator-interp + path: ./bin + + - name: Make Executable + run: chmod +x ./bin/generator + + - name: Run llc tests + run: dragon-runner tests/GeneratorCIConfig.json --timeout 10 diff --git a/tests/GeneratorCIConfig.json b/tests/GeneratorCIConfig.json new file mode 100644 index 0000000..2ba7927 --- /dev/null +++ b/tests/GeneratorCIConfig.json @@ -0,0 +1,19 @@ +{ + "testDir": "testfiles", + "testedExecutablePaths": { + "my-name": "../bin/generator" + }, + "toolchains": { + "interpreter": [ + { + "stepName": "generator-interpreter", + "executablePath": "$EXE", + "arguments": [ + "$INPUT", + "$OUTPUT" + ], + "output": "generator.out" + } + ] + } +}