Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# just -opam tag because make setup will install ocaml compiler
FROM ocaml/opam:ubuntu-22.04-opam AS dev
# make opam 2.2 default for make setup
Comment thread
sim642 marked this conversation as resolved.
RUN sudo ln -sf /usr/bin/opam-2.2 /usr/bin/opam

# TODO: use opam depext
RUN sudo apt-get update \
&& sudo apt-get install -y libgmp-dev libmpfr-dev m4 autoconf gcc-multilib pkg-config ruby gem curl python3-pygments graphviz \
&& sudo rm -rf /var/lib/apt/lists/*

# copy only files for make setup to cache docker layers without code changes
COPY --chown=opam Makefile make.sh goblint.opam goblint.opam.locked /home/opam/docker/analyzer/

RUN sudo gem install parallel os

# remove default Docker <docker@example.com> git credentials added by opam base image: https://github.com/avsm/ocaml-dockerfile/blob/f184554282a3836bf3f1c34d20e77d0530f8349d/src-opam/dockerfile_linux.ml#L24-L28
# this prevents devcontainer from using outside git credentials: https://code.visualstudio.com/docs/remote/containers#_sharing-git-credentials-with-your-container
Expand All @@ -22,13 +22,10 @@ USER opam
# update local opam repository because base image may be outdated
RUN cd /home/opam/opam-repository \
&& git pull origin master \
&& opam update
&& opam update -y

RUN cd /home/opam/docker/analyzer \
&& OPAMWITHTEST=true make setup
# copy only files for make setup to cache docker layers without code changes
COPY --chown=opam Makefile make.sh goblint.opam goblint.opam.locked /home/opam/docker/analyzer/

RUN cd /home/opam/docker/analyzer \
&& eval $(opam env) \
&& opam install -y ocaml-lsp-server ocamlformat dune=3.19.1 \
&& sudo gem install parallel os

&& OPAMWITHTEST=true OPAMWITHDOC=true OPAMWITHDEVSETUP=true make setup
2 changes: 2 additions & 0 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ Goblint includes analyses for assertions, overflows, deadlocks, etc and can be e
conf-gcc ; ensures opam-repository CI installs real gcc from homebrew on MacOS
domain-local-await
domain_shims
(ocaml-lsp-server :with-dev-setup) ; needed for https://github.com/ocamllabs/vscode-ocaml-platform
(ocp-indent :with-dev-setup) ; needed for pre-commit hook
)
(depopts
apron
Expand Down
2 changes: 2 additions & 0 deletions goblint.opam
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ depends: [
"conf-gcc"
"domain-local-await"
"domain_shims"
"ocaml-lsp-server" {with-dev-setup}
"ocp-indent" {with-dev-setup}
]
depopts: ["apron" "z3" "domainslib" "memtrace"]
conflicts: [
Expand Down
16 changes: 14 additions & 2 deletions goblint.opam.locked
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ depends: [
"arg-complete" {= "0.2.1"}
"astring" {= "0.8.5"}
"base-bigarray" {= "base"}
"base-bytes" {= "base"}
"base-bytes" {= "base" & with-dev-setup}
"base-threads" {= "base"}
"base-unix" {= "base"}
"batteries" {= "3.9.0"}
Expand All @@ -41,14 +41,16 @@ depends: [
"camlp-streams" {= "5.0.1"}
"catapult" {= "0.2"}
"catapult-file" {= "0.2"}
"cmdliner" {= "1.3.0" & with-doc}
"chrome-trace" {= "3.19.1" & with-dev-setup}
"cmdliner" {= "1.3.0" & (with-doc | with-dev-setup)}
"conf-autoconf" {= "0.2"}
"conf-findutils" {= "1"}
"conf-gcc" {= "1.0"}
"conf-gmp" {= "5"}
"conf-gmp-paths" {= "1"}
"conf-mpfr-paths" {= "1"}
"conf-perl" {= "2"}
"conf-pkg-config" {= "4"}
"conf-ruby" {= "1.0.0" & with-test}
"cppo" {= "1.6.9"}
"cpu" {= "2.0.0"}
Expand All @@ -62,9 +64,11 @@ depends: [
"dune-build-info" {= "3.19.1"}
"dune-configurator" {= "3.19.1"}
"dune-private-libs" {= "3.19.1"}
"dune-rpc" {= "3.19.1" & with-dev-setup}
"dune-site" {= "3.19.1"}
"dyn" {= "3.19.1"}
"ez-conf-lib" {= "2"}
"fiber" {= "3.7.0" & with-dev-setup}
"fileutils" {= "0.6.4"}
"fmt" {= "0.9.0"}
"fpath" {= "0.7.3"}
Expand All @@ -74,16 +78,21 @@ depends: [
"json-data-encoding" {= "1.0.1"}
"jsonrpc" {= "1.17.0"}
"logs" {= "0.7.0"}
"merlin-lib" {= "4.16-414" & with-dev-setup}
"mlgmpidl" {= "1.3.0"}
"num" {= "1.5"}
"ocaml" {= "4.14.2"}
"ocaml-compiler-libs" {= "v0.12.4"}
"ocaml-config" {= "2"}
"ocaml-lsp-server" {= "1.17.0" & with-dev-setup}
"ocaml-option-flambda" {= "1"}
"ocaml-syntax-shims" {= "1.0.0"}
"ocaml-variants" {= "4.14.2+options"}
"ocamlbuild" {= "0.14.3"}
"ocamlc-loc" {= "3.19.1" & with-dev-setup}
"ocamlfind" {= "1.9.8"}
"ocamlformat-rpc-lib" {= "0.29.0" & with-dev-setup}
"ocp-indent" {= "1.8.1" & with-dev-setup}
"odoc" {= "3.0.0" & with-doc}
"odoc-parser" {= "3.0.0" & with-doc}
"ordering" {= "3.19.1"}
Expand All @@ -95,6 +104,7 @@ depends: [
"ppx_deriving" {= "6.0.2"}
"ppx_deriving_hash" {= "0.1.2"}
"ppx_deriving_yojson" {= "3.8.0"}
"ppx_yojson_conv_lib" {= "v0.16.0" & with-dev-setup}
"ppxlib" {= "0.35.0"}
"ptime" {= "1.2.0" & with-doc}
"qcheck-core" {= "0.25"}
Expand All @@ -105,6 +115,7 @@ depends: [
"seq" {= "base"}
"sexplib0" {= "v0.16.0"}
"sha" {= "1.15.4"}
"spawn" {= "v0.17.0" & with-dev-setup}
"stdlib-shims" {= "0.3.0"}
"stdune" {= "3.19.1"}
"stringext" {= "1.6.0"}
Expand All @@ -114,6 +125,7 @@ depends: [
"uri" {= "4.4.0"}
"uuidm" {= "0.9.8"}
"uutf" {= "1.0.3" & with-doc}
"xdg" {= "3.19.1" & with-dev-setup}
"yaml" {= "3.2.0"}
"yojson" {= "2.2.1"}
"zarith" {= "1.14"}
Expand Down
7 changes: 2 additions & 5 deletions make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,8 @@ rule() {
opam_setup
;; dev)
eval $(opam env)
echo "Installing opam packages for test and doc..."
opam install -y . --deps-only --locked --with-test --with-doc
echo "Installing opam packages for development..."
opam install -y ocaml-lsp-server ocp-indent
# ocaml-lsp-server is needed for https://github.com/ocamllabs/vscode-ocaml-platform
echo "Installing opam packages for test, doc and dev-setup..."
opam install -y . --deps-only --locked --with-test --with-doc --with-dev-setup
Comment thread
sim642 marked this conversation as resolved.
echo "Installing Pre-commit hook..."
cd .git/hooks; ln -sf ../../scripts/hooks/pre-commit; cd -
# Use `git commit -n` to temporarily bypass the hook if necessary.
Expand Down
Loading