Skip to content

Commit

Permalink
[ci] try to do runtime tests a bit better
Browse files Browse the repository at this point in the history
  • Loading branch information
harrand committed May 18, 2024
1 parent 46dfa11 commit ed35451
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@ jobs:
run: cmake --build ./build/ci_${{ matrix.build_config }} --target psyc
working-directory: cpp

- name: 'Compile a simple test program'
run: ./cpp/build/ci_${{ matrix.build_config }}/psyc -v ./samples/scratchpad.psy --dump-ast --dump-ir

- name: 'Upload psyc as artifact'
uses: actions/upload-artifact@v4
with:
name: psyc_${{ matrix.compiler }}_${{ matrix.build_config }}
path: ./cpp/build/ci_${{ matrix.build_config }}/psyc
working-directory: cpp

- name: 'Run Tests'
uses: Harrand/psyc/.github/workflows/build_linux.yml@master
with:
compiler: ${{ matrix.compiler }}
build_config: ${{ matrix.build_config }}
24 changes: 24 additions & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
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

0 comments on commit ed35451

Please sign in to comment.