From b36f497f851a3da91a139e50ff4f73b29100fd65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Fri, 7 Jun 2019 11:56:03 +0200 Subject: [PATCH] add odoc to Ci --- .gitlab-ci.yml | 37 +++++++++++++++++++++++++- scripts/install_native_dependencies.sh | 3 ++- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f6e6b62ed..eb2dc2253 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,13 +12,48 @@ stages: stage: build_and_deploy_website image: node:8 before_script: + - scripts/install_native_dependencies.sh + # TODO: these things are moved to scripts in other branches. + - wget https://github.com/ocaml/opam/releases/download/2.0.1/opam-2.0.1-x86_64-linux -O opam-2.0.1-x86_64-linux + - cp opam-2.0.1-x86_64-linux /usr/local/bin/opam + - chmod +x /usr/local/bin/opam + - export PATH="/usr/local/bin${PATH:+:}${PATH:-}" + + # Initialise opam + - printf '' | opam init --bare + - eval $(opam config env) + + # Create switch + - printf '' | opam switch create toto ocaml-base-compiler.4.06.1 + - eval $(opam config env) + + # Show versions and current switch + - echo "$PATH" + - opam --version + - printf '' | ocaml + - opam switch + + # install deps for internal documentation + - opam install odoc + - vendors/opam-repository-tools/rewrite-local-opam-repository.sh + - opam repository add localrepo "file://$PWD/vendors/ligo-opam-repository-local-generated/" + - opam install -y --build-test --deps-only ./src/ + - dune build -p ligo + # TODO: also try instead from time to time: + #- (cd ./src/; dune build -p ligo) + + # build with odoc + - dune build @doc + - mv build/default/_doc/_html/ gitlab-pages/website/build/ligo/internal + + # npm - cd gitlab-pages/website - npm install script: - npm run version next - npm run build after_script: - - cp -r gitlab-pages/website/build/ligo public + - cp -r gitlab-pages/website/build/ligo public artifacts: paths: - public diff --git a/scripts/install_native_dependencies.sh b/scripts/install_native_dependencies.sh index 04d4ce17f..0b1dafcd3 100755 --- a/scripts/install_native_dependencies.sh +++ b/scripts/install_native_dependencies.sh @@ -1,7 +1,8 @@ +apt-get update -qq apt-get -y install \ libev-dev \ perl \ pkg-config \ libgmp-dev \ libhidapi-dev \ - m4 \ No newline at end of file + m4