diff --git a/.github/actions/run_tests.yml b/.github/actions/run_tests.yml new file mode 100644 index 0000000..42e766c --- /dev/null +++ b/.github/actions/run_tests.yml @@ -0,0 +1,23 @@ +name: "run-tests" +description: "Download a previously-generated psyc and try to compile some stuff with it." + +inputs: + build_config: + required: true + type: string + compiler: + required: true + type: string + +runs: + using: "composite" + steps: + - uses: actions/checkout@v4 + + - name: Retrieve psyc + uses: actions/download-artifact@v4 + with: + name: psyc_${{ inputs.compiler }}_${{ inputs.build_config }} + + - name: scratchpad.psy + run: psyc -v ./samples/scratchpad.psy --dump-ast --dump-ir \ No newline at end of file diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 04e4523..967c442 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -44,7 +44,7 @@ jobs: path: ./cpp/build/ci_${{ matrix.build_config }}/psyc - name: 'Run Tests' - uses: Harrand/psyc/.github/workflows/build_linux.yml@master + uses: ./.github/actions/run_tests.yml with: compiler: ${{ matrix.compiler }} build_config: ${{ matrix.build_config }} \ No newline at end of file diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml deleted file mode 100644 index 7535b3a..0000000 --- a/.github/workflows/run_tests.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: "run-tests" -on: - workflow_call: - inputs: - build_config: - required: true - type: string - compiler: - required: true - type: string - -jobs: - run-tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Retrieve psyc - uses: actions/download-artifact@v4 - with: - name: psyc_${{ inputs.compiler }}_${{ inputs.build_config }} - - - name: scratchpad.psy - run: psyc -v ./samples/scratchpad.psy --dump-ast --dump-ir \ No newline at end of file