Merge branch 'fix-ci' into 'dev'
Try to fix CI again See merge request ligolang/ligo!71
This commit is contained in:
commit
1cda8ca097
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,5 +1,5 @@
|
||||
/_build/
|
||||
/dune-project
|
||||
dune-project
|
||||
*~
|
||||
cache/*
|
||||
Version.ml
|
||||
|
@ -9,7 +9,7 @@ stages:
|
||||
- test
|
||||
|
||||
.website_build: &website_build
|
||||
stage: test # TODO DODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODO restore to build_and_deploy_website
|
||||
stage: build_and_deploy_website
|
||||
image: node:8
|
||||
before_script:
|
||||
- scripts/install_native_dependencies.sh
|
||||
@ -18,18 +18,12 @@ stages:
|
||||
- eval $(opam config env)
|
||||
- scripts/setup_switch.sh
|
||||
- eval $(opam config env)
|
||||
- scripts/debug_show_versions.sh || true
|
||||
- scripts/setup_repos.sh
|
||||
|
||||
# install deps for internal documentation
|
||||
- opam install -y odoc
|
||||
# - vendors/opam-repository-tools/rewrite-local-opam-repository.sh
|
||||
# - opam repository add localrepo "file://$PWD/vendors/ligo-opam-repository-local-generated/"
|
||||
- scripts/install_vendors_deps.sh
|
||||
- opam install -y odoc
|
||||
- scripts/build_ligo_local.sh
|
||||
# - 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
|
||||
@ -67,14 +61,10 @@ stages:
|
||||
- scripts/install_native_dependencies.sh
|
||||
- scripts/install_opam.sh # TODO: or scripts/install_build_environment.sh ?
|
||||
- export PATH="/usr/local/bin${PATH:+:}${PATH:-}"
|
||||
- echo "$PATH"; which ocaml || true
|
||||
- eval $(opam config env)
|
||||
- echo "$PATH"; which ocaml || true
|
||||
- scripts/setup_switch.sh
|
||||
- echo "$PATH"; which ocaml || true
|
||||
- eval $(opam config env)
|
||||
- echo "$PATH"; which ocaml || true
|
||||
- scripts/debug_show_versions.sh || true
|
||||
- scripts/setup_repos.sh
|
||||
|
||||
local-dune-job:
|
||||
<<: *before_script
|
||||
@ -115,7 +105,7 @@ remote-repo-job:
|
||||
|
||||
# Run a docker build without publishing to the registry
|
||||
build-current-docker-image:
|
||||
stage: test # TODO DODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODO restore to build_docker
|
||||
stage: build_docker
|
||||
<<: *docker
|
||||
<<: *docker_build
|
||||
except:
|
||||
@ -125,7 +115,7 @@ build-current-docker-image:
|
||||
# When a MR/PR is merged to dev
|
||||
# take the previous build and publish it to Docker Hub
|
||||
build-and-publish-latest-docker-image:
|
||||
stage: test # TODO DODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODO restore to build_and_deploy_docker
|
||||
stage: build_and_deploy_docker
|
||||
<<: *docker
|
||||
<<: *docker_build
|
||||
after_script:
|
||||
@ -133,9 +123,6 @@ build-and-publish-latest-docker-image:
|
||||
- docker push $LIGO_REGISTRY_IMAGE:next
|
||||
only:
|
||||
- dev
|
||||
- refactor/new-tezos-deps-ci
|
||||
- refactor/new-tezos-deps-cicliexe
|
||||
|
||||
|
||||
# Pages are deployed from both master & dev, be careful not to override 'next'
|
||||
# in case something gets merged into 'dev' while releasing.
|
||||
@ -144,5 +131,3 @@ pages:
|
||||
only:
|
||||
- master
|
||||
- dev
|
||||
- refactor/new-tezos-deps-ci
|
||||
- refactor/new-tezos-deps-cicliexe
|
||||
|
6
Makefile
6
Makefile
@ -10,20 +10,14 @@ install-deps:
|
||||
scripts/install_build_environment.sh # TODO: or scripts/install_opam.sh ?
|
||||
|
||||
build-deps:
|
||||
echo aa
|
||||
export PATH="/usr/local/bin$${PATH:+:}$${PATH:-}"
|
||||
# Create opam dev switch locally for use with Ligo, add merlin/etc
|
||||
if [ -n "`opam switch show | grep -P ".+/ligo"`" ];
|
||||
then :; else scripts/setup_dev_switch.sh;
|
||||
fi
|
||||
echo bb
|
||||
eval $$(opam config env)
|
||||
echo cc
|
||||
# Install OCaml build dependencies for Ligo
|
||||
scripts/install_vendors_deps.sh
|
||||
echo dd
|
||||
scripts/install_ligo_with_dependencies.sh # TODO: rename & cleanup
|
||||
echo ee
|
||||
|
||||
build: build-deps
|
||||
export PATH="/usr/local/bin$${PATH:+:}$${PATH:-}"
|
||||
|
@ -1,6 +1,5 @@
|
||||
# We could use one of the nomadiclab's docker images as a base instead
|
||||
# We're using 4.06 instead of 4.06.1, if this causes problems build a custom 4.06.1 image instead
|
||||
FROM ocaml/opam2:4.06
|
||||
# At the moment, this really means 4.07.1
|
||||
FROM ocaml/opam2:4.07
|
||||
|
||||
USER root
|
||||
|
||||
@ -23,18 +22,14 @@ RUN sh scripts/install_native_dependencies.sh
|
||||
# TODO: or scripts/install_build_environment.sh ?
|
||||
RUN sh scripts/install_opam.sh
|
||||
|
||||
# Creat opam switch
|
||||
RUN sh scripts/setup_switch.sh
|
||||
# Add tezos repository
|
||||
RUN sh scripts/setup_repos.sh
|
||||
|
||||
RUN opam update
|
||||
|
||||
# Install ligo
|
||||
RUN sh scripts/install_vendors_deps.sh
|
||||
RUN sh -c pwd
|
||||
RUN sh scripts/build_ligo_local.sh
|
||||
RUN sh -c pwd
|
||||
RUN ls -l
|
||||
RUN sh -c 'ls -l /ligo/_build/default/src/bin/cli.exe || true'
|
||||
RUN opam install -y ./src
|
||||
|
||||
# Use the ligo binary as a default command
|
||||
ENTRYPOINT [ "/ligo/_build/default/src/bin/cli.exe" ]
|
||||
ENTRYPOINT [ "/home/opam/.opam/4.07/bin/ligo" ]
|
||||
|
@ -2,7 +2,7 @@
|
||||
set -e
|
||||
|
||||
eval $(opam config env)
|
||||
dune build src # TODO: make it work with -p ligo
|
||||
dune build -p ligo
|
||||
|
||||
# TODO: also try instead from time to time:
|
||||
#- (cd ./src/; dune build -p ligo)
|
||||
|
@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
echo "$PATH"
|
||||
opam --version
|
||||
printf '' | ocaml
|
||||
opam switch
|
||||
|
@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cd src
|
||||
opam install . --yes
|
@ -2,11 +2,5 @@
|
||||
set -e
|
||||
|
||||
# Install local dependencies
|
||||
opam install -y ./vendors/ligo-utils/simple-utils
|
||||
opam install -y ./vendors/ligo-utils/tezos-protocol-alpha
|
||||
opam install -y ./vendors/ligo-utils/tezos-protocol-alpha-parameters
|
||||
opam install -y ./vendors/ligo-utils/memory-proto-alpha
|
||||
opam install -y ./vendors/ligo-utils/tezos-utils/michelson-parser
|
||||
opam install -y ./vendors/ligo-utils/tezos-utils
|
||||
opam install -y ./vendors/ligo-utils/proto-alpha-utils
|
||||
opam install -y getopt ppx_deriving menhir
|
||||
opam install -y --deps-only $(find src vendors -name \*.opam)
|
||||
opam install -y $(find vendors -name \*.opam)
|
||||
|
@ -2,6 +2,7 @@
|
||||
set -e
|
||||
|
||||
"$(dirname "$0")"/setup_switch.sh
|
||||
"$(dirname "$0")"/setup_repos.sh
|
||||
|
||||
opam install -y ocp-indent tuareg merlin alcotest-lwt crowbar
|
||||
opam -y user-setup install
|
||||
|
6
scripts/setup_repos.sh
Executable file
6
scripts/setup_repos.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
eval $(opam config env)
|
||||
opam repo add tezos-opam-repository https://gitlab.com/nomadic-labs/tezos-opam-repository.git
|
@ -4,12 +4,3 @@ set -x
|
||||
|
||||
printf '' | opam switch create . 4.07.1 # toto ocaml-base-compiler.4.06.1
|
||||
eval $(opam config env)
|
||||
|
||||
# Add Tezos opam repository
|
||||
opam repo add tezos-opam-repository https://gitlab.com/nomadic-labs/tezos-opam-repository.git
|
||||
|
||||
# TODO: move this to install_vendor_deps.sh
|
||||
# Pin the versions of some dependencies
|
||||
opam pin -y zarith 1.7
|
||||
opam pin -y ipaddr 3.1.0
|
||||
opam pin -y macaddr 3.1.0
|
||||
|
@ -1,2 +0,0 @@
|
||||
(lang dune 1.6)
|
||||
(using menhir 2.0)
|
@ -28,7 +28,7 @@
|
||||
(targets parser_generated.mly)
|
||||
(deps partial_parser.mly pre_parser.mly)
|
||||
(action (system "cat pre_parser.mly partial_parser.mly > parser_generated.mly"))
|
||||
(mode promote-until-clean)
|
||||
(mode (promote (until-clean) (only *)))
|
||||
)
|
||||
|
||||
(rule
|
||||
@ -43,7 +43,7 @@
|
||||
(targets ast_generated.ml)
|
||||
(deps generator.exe)
|
||||
(action (system "./generator.exe ast > ast_generated.ml"))
|
||||
(mode promote-until-clean)
|
||||
(mode (promote (until-clean) (only *)))
|
||||
)
|
||||
|
||||
;; Generating Generator
|
||||
@ -57,4 +57,10 @@
|
||||
lex
|
||||
)
|
||||
(modules generator)
|
||||
(preprocess
|
||||
(pps
|
||||
ppx_let
|
||||
ppx_deriving.std
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -27,16 +27,16 @@
|
||||
; (targets Parser.exe)
|
||||
; (deps ParserMain.exe)
|
||||
; (action (copy ParserMain.exe Parser.exe))
|
||||
; (mode promote-until-clean))
|
||||
; (mode (promote (until-clean) (only *))))
|
||||
|
||||
;(rule
|
||||
; (targets Lexer.exe)
|
||||
; (deps LexerMain.exe)
|
||||
; (action (copy LexerMain.exe Lexer.exe))
|
||||
; (mode promote-until-clean))
|
||||
; (mode (promote (until-clean) (only *))))
|
||||
|
||||
(rule
|
||||
(targets Version.ml)
|
||||
(action
|
||||
(progn (run "sh" "-c" "printf 'let version = \"%s\"'\\\\n \"$(echo UNKNOWN)\" > Version.ml")))
|
||||
(mode promote-until-clean))
|
||||
(mode (promote (until-clean) (only *))))
|
||||
|
@ -25,4 +25,4 @@
|
||||
(targets Version.ml)
|
||||
(action
|
||||
(progn (run "sh" "-c" "printf 'let version = \"%s\"'\\\\n \"$(echo UNKNOWN)\" > Version.ml")))
|
||||
(mode promote-until-clean))
|
||||
(mode (promote (until-clean) (only *))))
|
||||
|
@ -1,2 +0,0 @@
|
||||
(lang dune 1.11)
|
||||
(name tezos-memory-proto-alpha)
|
@ -1 +0,0 @@
|
||||
(lang dune 1.6)
|
@ -18,7 +18,9 @@ depends: [
|
||||
"ezjsonm"
|
||||
"hex"
|
||||
"hidapi"
|
||||
"ipaddr"
|
||||
# opam does not handle tezos' constraints well (why?)
|
||||
"ipaddr" { >= "3.1.0" & < "4.0.0" }
|
||||
"macaddr" { >= "3.1.0" & < "4.0.0" }
|
||||
"irmin"
|
||||
"js_of_ocaml"
|
||||
"lwt"
|
||||
@ -31,7 +33,8 @@ depends: [
|
||||
"stdio"
|
||||
"uri"
|
||||
"uutf"
|
||||
"zarith"
|
||||
# tezos does not constrain their required version
|
||||
"zarith" {= "1.7"}
|
||||
"ocplib-json-typed"
|
||||
"ocplib-json-typed-bson"
|
||||
"tezos-crypto"
|
||||
|
1
vendors/ligo-utils/simple-utils/dune-project
vendored
1
vendors/ligo-utils/simple-utils/dune-project
vendored
@ -1 +0,0 @@
|
||||
(lang dune 1.6)
|
@ -1,2 +0,0 @@
|
||||
(lang dune 1.10)
|
||||
(name tezos-protocol-alpha-parameters)
|
@ -1,2 +0,0 @@
|
||||
(lang dune 1.10)
|
||||
(name tezos-embedded-protocol-alpha)
|
1
vendors/ligo-utils/tezos-utils/dune-project
vendored
1
vendors/ligo-utils/tezos-utils/dune-project
vendored
@ -1 +0,0 @@
|
||||
(lang dune 1.6)
|
@ -1 +0,0 @@
|
||||
(lang dune 1.6)
|
Loading…
Reference in New Issue
Block a user