-
Notifications
You must be signed in to change notification settings - Fork 76
83 lines (74 loc) · 2.86 KB
/
jane_ocaml5.yml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: jane_ocaml5
on: [push, pull_request]
jobs:
jane_ocaml5:
name: Check that resolved files build
runs-on: ubuntu-latest
steps:
- name: Cache OCaml 4.14, dune, and menhir
uses: actions/cache@v2
id: cache
with:
path: ${{ github.workspace }}/ocaml-414/_install
key: ocaml-414-dune-361-menhir-20231231--v1
- name: Checkout OCaml 4.14
uses: actions/checkout@master
if: steps.cache.outputs.cache-hit != 'true'
with:
repository: 'ocaml/ocaml'
path: 'ocaml-414'
ref: '4.14'
- name: Build OCaml 4.14
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ocaml-414
run: |
./configure --prefix=$GITHUB_WORKSPACE/ocaml-414/_install
make -j $J world.opt
make install
# Remove unneeded parts to shrink cache file
rm -rf $GITHUB_WORKSPACE/ocaml-414/_install/{lib/ocaml/expunge,bin/*.byte}
- name: Checkout dune github repo
uses: actions/checkout@master
if: steps.cache.outputs.cache-hit != 'true'
with:
repository: 'ocaml/dune'
ref: '3.6.1'
path: 'dune'
- name: Build dune
working-directory: dune
if: steps.cache.outputs.cache-hit != 'true'
run: |
PATH=$GITHUB_WORKSPACE/ocaml-414/_install/bin:$PATH make release
cp _boot/dune.exe $GITHUB_WORKSPACE/ocaml-414/_install/bin/dune
- name: Checkout menhir github repo
uses: actions/checkout@master
if: steps.cache.outputs.cache-hit != 'true'
with:
repository: 'LexiFi/menhir'
ref: '20231231'
path: 'menhir'
- name: Build menhir
working-directory: menhir
if: steps.cache.outputs.cache-hit != 'true'
run: |
PATH=$GITHUB_WORKSPACE/ocaml-414/_install/bin:$PATH dune build
cp _build/install/default/bin/menhir $GITHUB_WORKSPACE/ocaml-414/_install/bin/menhir
# Our dune rule uses `menhirLib.mli`, which we can't simply `cp`
# because it's a symbolic link to a relative path.
export TARGET_FILE=$GITHUB_WORKSPACE/ocaml-414/_install/lib/menhirLib/menhirLib.mli
mkdir -p $(dirname $TARGET_FILE)
cat _build/install/default/lib/menhirLib/menhirLib.mli > $TARGET_FILE
- name: Checkout the ocaml-jst repo
uses: actions/checkout@master
with:
path: 'ocaml-jst'
- name: Configure
working-directory: ocaml-jst
run: |
autoconf
./configure --prefix=$GITHUB_WORKSPACE/ocaml-5/_install --with-dune=$GITHUB_WORKSPACE/ocaml-414/_install/bin/dune
- name: Check that resolved files build
working-directory: ocaml-jst
run: |
export PATH=$GITHUB_WORKSPACE/ocaml-414/_install/bin:$PATH
jane/build-resolved-files-for-ci