@@ -16,26 +16,59 @@ jobs:
1616 path : source
1717 - name : Add name of current branch to environment as BRANCH_NAME
181819- - name : Retrieve build environment if cached # STEP 2
20- id : opam-cache
19+ - name : Set-up OCaml
20+ uses : ocaml/setup-ocaml@v3
21+ with :
22+ ocaml-compiler : 5.0.0
23+ dune-cache : true
24+ - name : Retrieve the switch environment if cached
25+ id : opam-cache-switch
2126 uses : actions/cache@v4
2227 with :
23- path : ' /home/runner/.opam/ '
24- key : ${{ runner.os }}-modules-${{ hashFiles('./source/opam.export ') }}
28+ path : " _opam "
29+ key : ${{ runner.os }}-modules-${{ hashFiles('./source/hazel. opam.locked ') }}
2530 - name : Add opam repository archive
2631 run : |
2732 eval $(opam env)
2833 export OPAMYES=1
2934 opam repo add archive git+https://github.com/ocaml/opam-repository-archive
30- - name : Install dependencies and build tylr # STEP 3
35+ - name : Install dependencies
3136 run : |
32- sudo apt --assume-yes install opam
37+ eval $( opam env)
3338 export OPAMYES=1
34- opam init --compiler=ocaml-base-compiler.5.0.0
39+ export DUNE_CACHE=enabled
40+ opam install . --deps-only --with-test --locked
41+ working-directory : ./source
42+ - name : Clean opam switch
43+ run : |
3544 eval $(opam env)
36- make deps
37- make release
45+ export OPAMYES=1
46+ opam clean --all-switches --download-cache --logs --repo-cache --unused-repositories
47+ - name : Build Release
48+ run : |
49+ export DUNE_CACHE=enabled
50+ opam exec -- dune build @src/fmt --auto-promote src --profile release
3851 working-directory : ./source
52+ # - name: Retrieve build environment if cached # STEP 2
53+ # id: opam-cache
54+ # uses: actions/cache@v4
55+ # with:
56+ # path: '/home/runner/.opam/'
57+ # key: ${{ runner.os }}-modules-${{ hashFiles('./source/opam.export') }}
58+ # - name: Add opam repository archive
59+ # run: |
60+ # eval $(opam env)
61+ # export OPAMYES=1
62+ # opam repo add archive git+https://github.com/ocaml/opam-repository-archive
63+ # - name: Install dependencies and build tylr # STEP 3
64+ # run: |
65+ # sudo apt --assume-yes install opam
66+ # export OPAMYES=1
67+ # opam init --compiler=ocaml-base-compiler.5.0.0
68+ # eval $(opam env)
69+ # make deps
70+ # make release
71+ # working-directory: ./source
3972 - name : Checkout website build artifacts repo # STEP 4
4073 uses : actions/checkout@v2
4174 with :
0 commit comments