Try to fix CI again
This commit is contained in:
parent
7e44886252
commit
e0b5910627
@ -9,7 +9,7 @@ stages:
|
|||||||
- test
|
- test
|
||||||
|
|
||||||
.website_build: &website_build
|
.website_build: &website_build
|
||||||
stage: test # TODO DODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODO restore to build_and_deploy_website
|
stage: build_and_deploy_website
|
||||||
image: node:8
|
image: node:8
|
||||||
before_script:
|
before_script:
|
||||||
- scripts/install_native_dependencies.sh
|
- scripts/install_native_dependencies.sh
|
||||||
@ -18,18 +18,12 @@ stages:
|
|||||||
- eval $(opam config env)
|
- eval $(opam config env)
|
||||||
- scripts/setup_switch.sh
|
- scripts/setup_switch.sh
|
||||||
- eval $(opam config env)
|
- eval $(opam config env)
|
||||||
- scripts/debug_show_versions.sh || true
|
- scripts/setup_repos.sh
|
||||||
|
|
||||||
# install deps for internal documentation
|
# 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
|
- scripts/install_vendors_deps.sh
|
||||||
|
- opam install -y odoc
|
||||||
- scripts/build_ligo_local.sh
|
- 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
|
# build with odoc
|
||||||
- dune build @doc
|
- dune build @doc
|
||||||
@ -67,14 +61,10 @@ stages:
|
|||||||
- scripts/install_native_dependencies.sh
|
- scripts/install_native_dependencies.sh
|
||||||
- scripts/install_opam.sh # TODO: or scripts/install_build_environment.sh ?
|
- scripts/install_opam.sh # TODO: or scripts/install_build_environment.sh ?
|
||||||
- export PATH="/usr/local/bin${PATH:+:}${PATH:-}"
|
- export PATH="/usr/local/bin${PATH:+:}${PATH:-}"
|
||||||
- echo "$PATH"; which ocaml || true
|
|
||||||
- eval $(opam config env)
|
- eval $(opam config env)
|
||||||
- echo "$PATH"; which ocaml || true
|
|
||||||
- scripts/setup_switch.sh
|
- scripts/setup_switch.sh
|
||||||
- echo "$PATH"; which ocaml || true
|
|
||||||
- eval $(opam config env)
|
- eval $(opam config env)
|
||||||
- echo "$PATH"; which ocaml || true
|
- scripts/setup_repos.sh
|
||||||
- scripts/debug_show_versions.sh || true
|
|
||||||
|
|
||||||
local-dune-job:
|
local-dune-job:
|
||||||
<<: *before_script
|
<<: *before_script
|
||||||
@ -115,7 +105,7 @@ remote-repo-job:
|
|||||||
|
|
||||||
# Run a docker build without publishing to the registry
|
# Run a docker build without publishing to the registry
|
||||||
build-current-docker-image:
|
build-current-docker-image:
|
||||||
stage: test # TODO DODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODO restore to build_docker
|
stage: build_docker
|
||||||
<<: *docker
|
<<: *docker
|
||||||
<<: *docker_build
|
<<: *docker_build
|
||||||
except:
|
except:
|
||||||
@ -125,7 +115,7 @@ build-current-docker-image:
|
|||||||
# When a MR/PR is merged to dev
|
# When a MR/PR is merged to dev
|
||||||
# take the previous build and publish it to Docker Hub
|
# take the previous build and publish it to Docker Hub
|
||||||
build-and-publish-latest-docker-image:
|
build-and-publish-latest-docker-image:
|
||||||
stage: test # TODO DODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODODO restore to build_and_deploy_docker
|
stage: build_and_deploy_docker
|
||||||
<<: *docker
|
<<: *docker
|
||||||
<<: *docker_build
|
<<: *docker_build
|
||||||
after_script:
|
after_script:
|
||||||
@ -133,9 +123,6 @@ build-and-publish-latest-docker-image:
|
|||||||
- docker push $LIGO_REGISTRY_IMAGE:next
|
- docker push $LIGO_REGISTRY_IMAGE:next
|
||||||
only:
|
only:
|
||||||
- dev
|
- dev
|
||||||
- refactor/new-tezos-deps-ci
|
|
||||||
- refactor/new-tezos-deps-cicliexe
|
|
||||||
|
|
||||||
|
|
||||||
# Pages are deployed from both master & dev, be careful not to override 'next'
|
# Pages are deployed from both master & dev, be careful not to override 'next'
|
||||||
# in case something gets merged into 'dev' while releasing.
|
# in case something gets merged into 'dev' while releasing.
|
||||||
@ -144,5 +131,3 @@ pages:
|
|||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
- dev
|
- dev
|
||||||
- refactor/new-tezos-deps-ci
|
|
||||||
- refactor/new-tezos-deps-cicliexe
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
# We could use one of the nomadiclab's docker images as a base instead
|
# At the moment, this really means 4.07.1
|
||||||
# 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.07
|
||||||
FROM ocaml/opam2:4.06
|
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
@ -23,18 +22,14 @@ RUN sh scripts/install_native_dependencies.sh
|
|||||||
# TODO: or scripts/install_build_environment.sh ?
|
# TODO: or scripts/install_build_environment.sh ?
|
||||||
RUN sh scripts/install_opam.sh
|
RUN sh scripts/install_opam.sh
|
||||||
|
|
||||||
# Creat opam switch
|
# Add tezos repository
|
||||||
RUN sh scripts/setup_switch.sh
|
RUN sh scripts/setup_repos.sh
|
||||||
|
|
||||||
RUN opam update
|
RUN opam update
|
||||||
|
|
||||||
# Install ligo
|
# Install ligo
|
||||||
RUN sh scripts/install_vendors_deps.sh
|
RUN sh scripts/install_vendors_deps.sh
|
||||||
RUN sh -c pwd
|
RUN opam install -y ./src
|
||||||
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'
|
|
||||||
|
|
||||||
# Use the ligo binary as a default command
|
# 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
|
set -e
|
||||||
|
|
||||||
eval $(opam config env)
|
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:
|
# TODO: also try instead from time to time:
|
||||||
#- (cd ./src/; dune build -p ligo)
|
#- (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
|
set -e
|
||||||
|
|
||||||
# Install local dependencies
|
# Install local dependencies
|
||||||
opam install -y ./vendors/ligo-utils/simple-utils
|
opam install -y --deps-only $(find src vendors -name \*.opam)
|
||||||
opam install -y ./vendors/ligo-utils/tezos-protocol-alpha
|
opam install -y $(find vendors -name \*.opam)
|
||||||
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
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
"$(dirname "$0")"/setup_switch.sh
|
"$(dirname "$0")"/setup_switch.sh
|
||||||
|
"$(dirname "$0")"/setup_repos.sh
|
||||||
|
|
||||||
opam install -y ocp-indent tuareg merlin alcotest-lwt crowbar
|
opam install -y ocp-indent tuareg merlin alcotest-lwt crowbar
|
||||||
opam -y user-setup install
|
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
|
printf '' | opam switch create . 4.07.1 # toto ocaml-base-compiler.4.06.1
|
||||||
eval $(opam config env)
|
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 +1,2 @@
|
|||||||
(lang dune 1.6)
|
(lang dune 1.11)
|
||||||
(using menhir 2.0)
|
(using menhir 2.0)
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
(targets parser_generated.mly)
|
(targets parser_generated.mly)
|
||||||
(deps partial_parser.mly pre_parser.mly)
|
(deps partial_parser.mly pre_parser.mly)
|
||||||
(action (system "cat pre_parser.mly partial_parser.mly > parser_generated.mly"))
|
(action (system "cat pre_parser.mly partial_parser.mly > parser_generated.mly"))
|
||||||
(mode promote-until-clean)
|
(mode (promote (until-clean) (only *)))
|
||||||
)
|
)
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
@ -43,7 +43,7 @@
|
|||||||
(targets ast_generated.ml)
|
(targets ast_generated.ml)
|
||||||
(deps generator.exe)
|
(deps generator.exe)
|
||||||
(action (system "./generator.exe ast > ast_generated.ml"))
|
(action (system "./generator.exe ast > ast_generated.ml"))
|
||||||
(mode promote-until-clean)
|
(mode (promote (until-clean) (only *)))
|
||||||
)
|
)
|
||||||
|
|
||||||
;; Generating Generator
|
;; Generating Generator
|
||||||
@ -57,4 +57,10 @@
|
|||||||
lex
|
lex
|
||||||
)
|
)
|
||||||
(modules generator)
|
(modules generator)
|
||||||
|
(preprocess
|
||||||
|
(pps
|
||||||
|
ppx_let
|
||||||
|
ppx_deriving.std
|
||||||
|
)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
@ -27,16 +27,16 @@
|
|||||||
; (targets Parser.exe)
|
; (targets Parser.exe)
|
||||||
; (deps ParserMain.exe)
|
; (deps ParserMain.exe)
|
||||||
; (action (copy ParserMain.exe Parser.exe))
|
; (action (copy ParserMain.exe Parser.exe))
|
||||||
; (mode promote-until-clean))
|
; (mode (promote (until-clean) (only *))))
|
||||||
|
|
||||||
;(rule
|
;(rule
|
||||||
; (targets Lexer.exe)
|
; (targets Lexer.exe)
|
||||||
; (deps LexerMain.exe)
|
; (deps LexerMain.exe)
|
||||||
; (action (copy LexerMain.exe Lexer.exe))
|
; (action (copy LexerMain.exe Lexer.exe))
|
||||||
; (mode promote-until-clean))
|
; (mode (promote (until-clean) (only *))))
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
(targets Version.ml)
|
(targets Version.ml)
|
||||||
(action
|
(action
|
||||||
(progn (run "sh" "-c" "printf 'let version = \"%s\"'\\\\n \"$(echo UNKNOWN)\" > Version.ml")))
|
(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)
|
(targets Version.ml)
|
||||||
(action
|
(action
|
||||||
(progn (run "sh" "-c" "printf 'let version = \"%s\"'\\\\n \"$(echo UNKNOWN)\" > Version.ml")))
|
(progn (run "sh" "-c" "printf 'let version = \"%s\"'\\\\n \"$(echo UNKNOWN)\" > Version.ml")))
|
||||||
(mode promote-until-clean))
|
(mode (promote (until-clean) (only *))))
|
||||||
|
@ -18,7 +18,9 @@ depends: [
|
|||||||
"ezjsonm"
|
"ezjsonm"
|
||||||
"hex"
|
"hex"
|
||||||
"hidapi"
|
"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"
|
"irmin"
|
||||||
"js_of_ocaml"
|
"js_of_ocaml"
|
||||||
"lwt"
|
"lwt"
|
||||||
@ -31,7 +33,8 @@ depends: [
|
|||||||
"stdio"
|
"stdio"
|
||||||
"uri"
|
"uri"
|
||||||
"uutf"
|
"uutf"
|
||||||
"zarith"
|
# tezos does not constrain their required version
|
||||||
|
"zarith" {= "1.7"}
|
||||||
"ocplib-json-typed"
|
"ocplib-json-typed"
|
||||||
"ocplib-json-typed-bson"
|
"ocplib-json-typed-bson"
|
||||||
"tezos-crypto"
|
"tezos-crypto"
|
||||||
|
Loading…
Reference in New Issue
Block a user