Run BNFC dependent tests #39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run BNFC dependent tests | |
| on: | |
| pull_request: | |
| paths: | |
| - '.github/workflows/menhir2bnfc.yml' | |
| - 'asllib/menhir2bnfc/**' | |
| - 'asllib/Parser.mly' | |
| - 'asllib/Lexer.mll' | |
| - 'asllib/Tokens.mly' | |
| - 'asllib/**.asl' | |
| # push: | |
| workflow_dispatch: | |
| schedule: | |
| # Prime the caches every Monday | |
| - cron: 0 1 * * MON | |
| permissions: read-all | |
| # Copy-pasted from https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build and run menhir2bnfc | |
| runs-on: ubuntu-latest | |
| env: | |
| DUNE_CACHE: 'enabled-except-user-rules' | |
| steps: | |
| - name: Checkout tree | |
| uses: actions/checkout@v4 | |
| - name: Set-up OCaml | |
| uses: ocaml/setup-ocaml@v3 | |
| with: | |
| ocaml-compiler: dune,zarith,menhir,conf-which,feat,qcheck,re,logs,cmdliner | |
| dune-cache: true | |
| - name: Update apt database | |
| run: sudo apt-get update --quiet --yes | |
| - name: Install BNFC | |
| run: sudo apt-get install --quiet --yes bnfc | |
| - name: Install herdtools and carpenter dependencies | |
| run: opam install dune zarith menhir feat qcheck re logs cmdliner | |
| - run: opam exec -- make build DUNE_PROFILE=dev | |
| - run: opam exec -- make test DUNE_PROFILE=dev | |
| - run: opam exec -- make test-bnfc DUNE_PROFILE=dev | |
| - run: opam install . |