summaryrefslogtreecommitdiff
path: root/.github/actions/run-tests/action.yml
blob: 2b2326699d38216148cad38a47f5740768f19ed8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Run tests
description: Run all available tests
inputs:
  check-examples:
    default: true
  check-python-bindings:
    default: false
  check-unit-tests:
    default: true
  regressions-args:
    default: "--no-check-unsat-cores --no-check-proofs"
  regressions-exclude:
    default: "3-4"
runs:
  using: composite
  steps:
    - name: Run CTest
      shell: bash
      run: |
        make -j${{ env.num_proc }} check
      env:
        ARGS: --output-on-failure -LE regress[${{ inputs.regressions-exclude }}]
        CVC5_REGRESSION_ARGS: --no-early-exit
        RUN_REGRESSION_ARGS: ${{ inputs.regressions-args }}
      working-directory: build

    - name: Run Unit Tests
      shell: bash
      run: |
        if [[ "${{ inputs.check-unit-tests }}" != "true" ]]; then exit 0; fi
        make -j${{ env.num_proc }} apitests units
      working-directory: build

    - name: Install Check
      shell: bash
      run: |
        make -j${{ env.num_proc }} install
        echo -e "#include <cvc5/cvc5.h>\nint main() { cvc5::api::Solver s; return 0; }" > /tmp/test.cpp
        g++ -std=c++17 /tmp/test.cpp -I install/include -L install/lib -lcvc5
      working-directory: build

    - name: Python Install Check
      shell: bash
      run: |
        if [[ "${{ inputs.check-python-bindings }}" != "true" ]]; then exit 0; fi
        export PYTHONPATH="$PYTHONPATH:$(dirname $(find build/install/ -name "pycvc5" -type d))"
        python3 -c "import pycvc5"

    - name: Check Examples
      shell: bash
      run: |
        if [[ "${{ inputs.check-examples }}" != "true" ]]; then exit 0; fi
        mkdir build
        cd build
        cmake .. -DCMAKE_PREFIX_PATH=$(pwd)/../../build/install/lib/cmake
        make -j${{ env.num_proc }}
        ctest -j${{ env.num_proc }} --output-on-failure
      working-directory: examples
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback