|
| 1 | +name: coverage |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + |
| 6 | + workflow_dispatch: |
| 7 | + |
| 8 | + schedule: |
| 9 | + # nightly |
| 10 | + - cron: '31 1 * * *' # 01:31 UTC, 02:31/03:31 Munich, 03:31/04:31 Tartu |
| 11 | + # GitHub Actions load is high at minute 0, so avoid that |
| 12 | + |
| 13 | +jobs: |
| 14 | + coverage: |
| 15 | + strategy: |
| 16 | + fail-fast: false |
| 17 | + matrix: |
| 18 | + os: |
| 19 | + - ubuntu-latest |
| 20 | + ocaml-compiler: |
| 21 | + - ocaml-variants.4.14.0+options,ocaml-option-flambda # matches opam lock file |
| 22 | + # don't add any other because they won't be used |
| 23 | + |
| 24 | + runs-on: ${{ matrix.os }} |
| 25 | + |
| 26 | + env: |
| 27 | + OCAMLRUNPARAM: b |
| 28 | + |
| 29 | + steps: |
| 30 | + - name: Checkout code |
| 31 | + uses: actions/checkout@v4 |
| 32 | + |
| 33 | + - name: Set up OCaml ${{ matrix.ocaml-compiler }} |
| 34 | + env: |
| 35 | + # otherwise setup-ocaml pins non-locked dependencies |
| 36 | + # https://github.com/ocaml/setup-ocaml/issues/166 |
| 37 | + OPAMLOCKED: locked |
| 38 | + uses: ocaml/setup-ocaml@v2 |
| 39 | + with: |
| 40 | + ocaml-compiler: ${{ matrix.ocaml-compiler }} |
| 41 | + |
| 42 | + - name: Install dependencies |
| 43 | + run: opam install . --deps-only --locked --with-test |
| 44 | + |
| 45 | + - name: Install coverage dependencies |
| 46 | + run: opam install bisect_ppx |
| 47 | + |
| 48 | + - name: Build |
| 49 | + run: ./make.sh coverage |
| 50 | + |
| 51 | + - name: Test regression |
| 52 | + run: ./make.sh headers testci |
| 53 | + |
| 54 | + - name: Test apron regression # skipped by default but CI has apron, so explicitly test group (which ignores skipping -- it's now a feature!) |
| 55 | + run: | |
| 56 | + ruby scripts/update_suite.rb group apron -s |
| 57 | + ruby scripts/update_suite.rb group apron2 -s |
| 58 | +
|
| 59 | + - name: Test apron octagon regression # skipped by default but CI has apron, so explicitly test group (which ignores skipping -- it's now a feature!) |
| 60 | + run: ruby scripts/update_suite.rb group octagon -s |
| 61 | + |
| 62 | + - name: Test apron affeq regression # skipped by default but CI has apron, so explicitly test group (which ignores skipping -- it's now a feature!) |
| 63 | + run: ruby scripts/update_suite.rb group affeq -s |
| 64 | + |
| 65 | + - name: Test apron regression (Mukherjee et. al SAS '17 paper') # skipped by default but CI has apron, so explicitly test group (which ignores skipping -- it's now a feature!) |
| 66 | + run: ruby scripts/update_suite.rb group apron-mukherjee -s |
| 67 | + |
| 68 | + - name: Test apron termination regression # skipped by default but CI has apron, so explicitly test group (which ignores skipping -- it's now a feature!) |
| 69 | + run: ruby scripts/update_suite.rb group termination -s |
| 70 | + |
| 71 | + - name: Test regression cram |
| 72 | + run: opam exec -- dune runtest tests/regression |
| 73 | + |
| 74 | + - name: Test incremental cram |
| 75 | + run: opam exec -- dune runtest tests/incremental |
| 76 | + |
| 77 | + - name: Test unit |
| 78 | + run: opam exec -- dune runtest unittest |
| 79 | + |
| 80 | + - name: Test incremental regression |
| 81 | + run: ruby scripts/update_suite.rb -i |
| 82 | + |
| 83 | + - name: Test incremental regression with cfg comparison |
| 84 | + run: ruby scripts/update_suite.rb -c |
| 85 | + |
| 86 | + - run: opam exec -- bisect-ppx-report send-to Coveralls --coverage-path=. |
| 87 | + env: |
| 88 | + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} |
| 89 | + PULL_REQUEST_NUMBER: ${{ github.event.number }} |
| 90 | + |
| 91 | + - uses: actions/upload-artifact@v3 |
| 92 | + if: always() |
| 93 | + with: |
| 94 | + name: suite_result |
| 95 | + path: tests/suite_result/ |
0 commit comments