forked from herd/herdtools7
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (47 loc) · 1.6 KB
/
Copy pathmenhir2bnfc.yml
File metadata and controls
62 lines (47 loc) · 1.6 KB
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
59
60
61
62
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 exec -- dune build asllib/aslref.opam
opam pin asllib
opam install aslref .