-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use setup-ocaml github action (#1341)
- Loading branch information
Showing
10 changed files
with
359 additions
and
225 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,27 +16,33 @@ jobs: | |
path: source | ||
- name: Add the name of the current branch to the environment as BRANCH_NAME | ||
uses: nelonoel/[email protected] | ||
- name: Retrieve the build environment if cached | ||
id: opam-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: '/home/runner/.opam/' | ||
key: ${{ runner.os }}-modules-${{ hashFiles('./source/opam.export') }} | ||
- name: Set-up OCaml | ||
run: | | ||
sudo apt --assume-yes install curl m4 opam | ||
export OPAMYES=1 | ||
opam init --compiler=ocaml-base-compiler.5.2.0 | ||
uses: ocaml/setup-ocaml@v3 | ||
with: | ||
ocaml-compiler: 5.2.0 | ||
dune-cache: true | ||
- name: Retrieve the switch environment if cached | ||
id: opam-cache-switch | ||
uses: actions/cache@v4 | ||
with: | ||
path: '_opam' | ||
key: ${{ runner.os }}-modules-${{ hashFiles('./source/hazel.opam.locked') }} | ||
- name: Install dependencies | ||
run: | | ||
eval $(opam env) | ||
export OPAMYES=1 | ||
make deps | ||
export DUNE_CACHE=enabled | ||
opam install . --deps-only --with-test --locked | ||
working-directory: ./source | ||
- name: Build Release | ||
- name: Clean opam switch | ||
run: | | ||
eval $(opam env) | ||
make release | ||
export OPAMYES=1 | ||
opam clean --all-switches --download-cache --logs --repo-cache --unused-repositories | ||
- name: Build Release | ||
run: | | ||
export DUNE_CACHE=enabled | ||
opam exec -- dune build @src/fmt --auto-promote src --profile release | ||
working-directory: ./source | ||
- name: Checkout the website build artifacts repo | ||
uses: actions/checkout@v2 | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,3 +53,6 @@ setup.log | |
|
||
# unit tests | ||
*.xml | ||
|
||
# Backup of opam lock file | ||
hazel.opam.locked.old |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Instructions for Changing Ocaml Dependencies | ||
|
||
## How to update dependencies | ||
|
||
- Update the dune-project file to reflect the new dependency constraints | ||
- `make change-deps` | ||
- This should generate the hazel.opam file from dune. | ||
- Depending on your installed dependencies you may need to make a new clean switch | ||
- Interrogate the `hazel.opam.locked` file to see what dependencies have changed | ||
- `make release` | ||
- Test in Firefox and Chrome. | ||
- Commit changed files and push |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,44 @@ | ||
(lang dune 3.16) | ||
(using menhir 2.0) | ||
|
||
(name hazel) | ||
|
||
(generate_opam_files true) | ||
|
||
(source | ||
(github hazelgrove/hazel)) | ||
|
||
(authors "Hazel Development Team") | ||
(maintainers "Hazel Development Team") | ||
|
||
(license MIT) | ||
|
||
(package | ||
(name hazel) | ||
(allow_empty) | ||
(synopsis "Hazel, a live functional programming environment with typed holes") | ||
; (description "A longer description") | ||
; (tags | ||
; (topics "to describe" your project)) | ||
(depends | ||
(ocaml | ||
(>= 5.2.0)) | ||
(menhir | ||
(>= 2.0)) | ||
yojson | ||
reason | ||
ppx_yojson_conv_lib | ||
ppx_yojson_conv | ||
incr_dom | ||
(omd (>= 2.0.0~alpha4)) | ||
ezjs_idb | ||
virtual_dom | ||
ppx_deriving | ||
ptmap | ||
uuidm | ||
unionFind | ||
ocamlformat | ||
(junit_alcotest :with-test) | ||
ocaml-lsp-server)) ; After upgrading to opam 2.2 use with-dev https://opam.ocaml.org/blog/opam-2-2-0/ | ||
|
||
; See the complete stanza docs at https://dune.readthedocs.io/en/stable/reference/dune-project/index.html |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.