ligo/.gitlab-ci.yml

578 lines
12 KiB
YAML
Raw Normal View History

2016-09-08 21:13:10 +04:00
variables:
## Please update `scripts/version.sh` accordingly
2018-07-06 19:12:05 +04:00
build_deps_image_version: 63f06ab145e22aef4cc55b5b9557756d4c868843
build_deps_image_name: registry.gitlab.com/tezos/opam-repository
public_docker_image_name: docker.io/${CI_PROJECT_PATH}
2016-09-08 21:13:10 +04:00
stages:
- build
- test
2018-07-05 14:08:55 +04:00
- packaging
2016-09-08 21:13:10 +04:00
- publish
2017-08-04 20:32:52 +04:00
2018-07-05 14:08:55 +04:00
############################################################
## Stage: build (only MR) ##
############################################################
2016-09-08 21:13:10 +04:00
2018-07-05 14:08:55 +04:00
.build_template: &build_definition
image: ${build_deps_image_name}:${build_deps_image_version}
2018-07-05 14:08:55 +04:00
stage: build
except:
- master
- alphanet
- zeronet
- betanet
2018-07-09 13:28:50 +04:00
- alphanet-staging
- zeronet-staging
- betanet-staging
before_script:
2018-02-05 23:08:28 +04:00
- opam list
- . ./scripts/version.sh
tags:
- gitlab-org
2018-07-05 14:08:55 +04:00
check_opam_deps:
<<: *build_definition
script:
- if [ "${build_deps_image_version}" != "${opam_repository_tag}" ] ; then
echo "Inconsistent dependencies hash between 'scripts/version.sh' and '.gitlab-ci.yml'." ;
exit 1 ;
fi
- ./scripts/opam-check.sh
2018-07-05 14:08:55 +04:00
- ./scripts/check_opam_test.sh
check_indentation:
<<: *build_definition
script:
2018-07-23 17:40:55 +04:00
- dune build @runtest_indent
build:
2018-07-05 14:08:55 +04:00
<<: *build_definition
script:
- make all
- make build-test
artifacts:
paths:
- _build
expire_in: 1 day
2017-08-04 20:32:52 +04:00
2018-07-05 14:08:55 +04:00
############################################################
## Stage: test (only MR) ##
############################################################
2017-08-04 20:32:52 +04:00
.test_template: &test_definition
2018-07-05 14:08:55 +04:00
<<: *build_definition
2017-08-04 20:32:52 +04:00
stage: test
dependencies:
- build
2016-09-08 21:13:10 +04:00
test:stdlib:
2017-08-04 20:32:52 +04:00
<<: *test_definition
2016-09-08 21:13:10 +04:00
script:
2018-07-23 17:40:55 +04:00
- dune build @src/lib_stdlib/runtest
test:stdlib_unix:
<<: *test_definition
script:
2018-07-23 17:40:55 +04:00
- dune build @src/lib_stdlib_unix/runtest
test:data_encoding:
<<: *test_definition
script:
2018-07-23 17:40:55 +04:00
- dune build @src/lib_data_encoding/runtest
test:storage:
<<: *test_definition
script:
2018-07-23 17:40:55 +04:00
- dune build @src/lib_storage/runtest
test:crypto:
<<: *test_definition
script:
2018-07-23 17:40:55 +04:00
- dune build @src/lib_crypto/runtest
2016-09-08 21:13:10 +04:00
test:shell:
2017-08-04 20:32:52 +04:00
<<: *test_definition
2016-09-08 21:13:10 +04:00
script:
2018-07-23 17:40:55 +04:00
- dune build @src/lib_shell/runtest
2017-03-31 03:17:25 +04:00
2017-04-05 20:24:26 +04:00
test:p2p:io-scheduler:
2017-08-04 20:32:52 +04:00
<<: *test_definition
2017-03-31 03:17:25 +04:00
script:
2018-07-23 17:40:55 +04:00
- dune build @src/lib_p2p/runtest_p2p_io_scheduler_ipv4
2016-10-19 17:09:00 +04:00
test:p2p:socket:
2017-08-04 20:32:52 +04:00
<<: *test_definition
2017-01-14 16:14:22 +04:00
script:
2018-07-23 17:40:55 +04:00
- dune build @src/lib_p2p/runtest_p2p_socket_ipv4
2017-01-14 16:14:22 +04:00
test:p2p:pool:
2017-08-04 20:32:52 +04:00
<<: *test_definition
2017-01-14 16:14:22 +04:00
script:
2018-07-23 17:40:55 +04:00
- dune build @src/lib_p2p/runtest_p2p_pool_ipv4
2017-01-14 16:14:22 +04:00
test:proto_alpha:
2018-02-01 02:30:50 +04:00
<<: *test_definition
script:
2018-07-23 17:40:55 +04:00
- dune build @src/proto_alpha/lib_protocol/runtest
2018-02-01 02:30:50 +04:00
test:p2p:peerset:
<<: *test_definition
script:
2018-07-23 17:40:55 +04:00
- dune build @src/lib_p2p/runtest_p2p_peerset
test:p2p:ipv6set:
<<: *test_definition
script:
2018-07-23 17:40:55 +04:00
- dune build @src/lib_p2p/runtest_p2p_ipv6set
test:p2p:banned_peers:
<<: *test_definition
script:
2018-07-23 17:40:55 +04:00
- dune build @src/lib_p2p/runtest_p2p_banned_peers
test:client_alpha:vote:
2017-08-04 20:32:52 +04:00
<<: *test_definition
script:
2018-07-23 17:40:55 +04:00
- dune build @src/proto_alpha/lib_delegate/runtest_vote
2017-04-05 20:24:26 +04:00
test:basic.sh:
2017-08-04 20:32:52 +04:00
<<: *test_definition
2017-01-14 16:14:22 +04:00
script:
2018-07-23 17:40:55 +04:00
- dune build @src/bin_client/runtest_basic.sh
2017-03-05 05:15:14 +04:00
2017-07-24 21:06:40 +04:00
test:contracts.sh:
2017-08-04 20:32:52 +04:00
<<: *test_definition
2017-07-24 21:06:40 +04:00
script:
2018-07-23 17:40:55 +04:00
- dune build @src/bin_client/runtest_contracts.sh
2017-07-24 21:06:40 +04:00
2017-08-09 18:09:41 +04:00
test:multinode.sh:
<<: *test_definition
script:
2018-07-23 17:40:55 +04:00
- dune build @src/bin_client/runtest_multinode.sh
2017-08-09 18:09:41 +04:00
test:inject.sh:
<<: *test_definition
script:
2018-07-23 17:40:55 +04:00
- dune build @src/bin_client/runtest_injection.sh
2017-11-27 09:13:12 +04:00
test:proto:sandbox:
<<: *test_definition
script:
2018-07-23 17:40:55 +04:00
- dune build @runtest_sandbox
test:documentation:
<<: *test_definition
script:
- sudo apk add --no-cache py3-sphinx py3-sphinx_rtd_theme
- sudo ln -s /usr/bin/sphinx-build-3 /usr/bin/sphinx-build
- make doc-html
2018-07-05 14:08:55 +04:00
############################################################
## Stage: building opam packages (only master and *opam*) ##
############################################################
.opam_template: &opam_definition
image: ${build_deps_image_name}:opam--${build_deps_image_version}
2018-07-05 14:08:55 +04:00
stage: packaging
dependencies: []
only:
- master
- /^.*opam.*$/
script:
- ./scripts/opam-pin.sh
- opam depext --yes ${package}
2018-02-05 23:08:28 +04:00
- opam install --yes ${package}
- opam reinstall --yes --with-test ${package}
tags:
- gitlab-org
2018-01-23 16:51:36 +04:00
##BEGIN_OPAM##
opam:00:ocplib-json-typed:
<<: *opam_definition
variables:
package: ocplib-json-typed
2018-05-04 21:46:32 +04:00
opam:01:ocplib-json-typed-bson:
<<: *opam_definition
variables:
package: ocplib-json-typed-bson
opam:02:tezos-stdlib:
<<: *opam_definition
variables:
2018-01-23 16:51:36 +04:00
package: tezos-stdlib
2018-05-04 21:46:32 +04:00
opam:03:tezos-data-encoding:
<<: *opam_definition
variables:
package: tezos-data-encoding
2018-05-04 21:46:32 +04:00
opam:04:ocplib-resto:
<<: *opam_definition
variables:
package: ocplib-resto
2018-05-04 21:46:32 +04:00
opam:05:tezos-error-monad:
2018-04-19 16:29:27 +04:00
<<: *opam_definition
variables:
package: tezos-error-monad
2018-05-04 21:46:32 +04:00
opam:06:ocplib-resto-directory:
2018-04-19 16:29:27 +04:00
<<: *opam_definition
variables:
package: ocplib-resto-directory
2018-05-04 21:46:32 +04:00
opam:07:blake2:
<<: *opam_definition
variables:
package: blake2
2018-05-06 16:59:41 +04:00
opam:08:hacl:
2018-05-04 21:46:32 +04:00
<<: *opam_definition
variables:
2018-05-06 16:59:41 +04:00
package: hacl
2018-05-04 21:46:32 +04:00
2018-05-06 16:59:41 +04:00
opam:09:secp256k1:
<<: *opam_definition
variables:
2018-05-06 16:59:41 +04:00
package: secp256k1
2018-05-06 16:59:41 +04:00
opam:10:tezos-clic:
<<: *opam_definition
variables:
2018-05-06 16:59:41 +04:00
package: tezos-clic
2018-05-06 16:59:41 +04:00
opam:11:tezos-rpc:
<<: *opam_definition
variables:
2018-05-06 16:59:41 +04:00
package: tezos-rpc
2018-06-05 21:27:58 +04:00
opam:12:uecc:
<<: *opam_definition
variables:
package: uecc
opam:13:tezos-crypto:
<<: *opam_definition
variables:
2018-04-19 16:29:27 +04:00
package: tezos-crypto
2018-06-05 21:27:58 +04:00
opam:14:tezos-micheline:
<<: *opam_definition
variables:
2018-04-19 16:29:27 +04:00
package: tezos-micheline
2018-06-05 21:27:58 +04:00
opam:15:lmdb:
2018-05-24 15:32:00 +04:00
<<: *opam_definition
variables:
package: lmdb
2018-06-05 21:27:58 +04:00
opam:16:pbkdf:
<<: *opam_definition
variables:
2018-05-24 15:32:15 +04:00
package: pbkdf
2018-06-05 21:27:58 +04:00
opam:17:ocplib-resto-cohttp:
2018-02-16 17:33:10 +04:00
<<: *opam_definition
variables:
2018-05-24 15:32:15 +04:00
package: ocplib-resto-cohttp
2018-02-16 17:33:10 +04:00
2018-06-05 21:27:58 +04:00
opam:18:tezos-base:
<<: *opam_definition
variables:
2018-05-24 15:32:15 +04:00
package: tezos-base
2018-06-05 21:27:58 +04:00
opam:19:irmin-lmdb:
2018-02-02 19:26:02 +04:00
<<: *opam_definition
variables:
2018-05-24 15:32:00 +04:00
package: irmin-lmdb
2018-02-02 19:26:02 +04:00
2018-06-05 21:27:58 +04:00
opam:20:bip39:
2018-04-03 13:39:09 +04:00
<<: *opam_definition
variables:
2018-05-24 15:32:15 +04:00
package: bip39
2018-04-03 13:39:09 +04:00
2018-06-05 21:27:58 +04:00
opam:21:tezos-rpc-http:
<<: *opam_definition
variables:
2018-05-24 15:32:15 +04:00
package: tezos-rpc-http
2018-06-05 21:27:58 +04:00
opam:22:tezos-shell-services:
<<: *opam_definition
variables:
2018-05-24 15:32:15 +04:00
package: tezos-shell-services
2018-06-05 21:27:58 +04:00
opam:23:tezos-stdlib-unix:
<<: *opam_definition
variables:
2018-05-24 15:32:15 +04:00
package: tezos-stdlib-unix
2018-06-05 21:27:58 +04:00
opam:24:tezos-storage:
<<: *opam_definition
variables:
2018-05-24 15:32:15 +04:00
package: tezos-storage
2018-06-05 21:27:58 +04:00
opam:25:tezos-protocol-environment-sigs:
<<: *opam_definition
variables:
2018-05-24 15:32:15 +04:00
package: tezos-protocol-environment-sigs
opam:26:ledgerwallet:
<<: *opam_definition
variables:
package: ledgerwallet
opam:27:tezos-client-base:
2018-05-24 15:32:15 +04:00
<<: *opam_definition
variables:
package: tezos-client-base
opam:28:tezos-protocol-compiler:
<<: *opam_definition
variables:
2018-02-02 19:26:02 +04:00
package: tezos-protocol-compiler
opam:29:ledgerwallet-tezos:
<<: *opam_definition
variables:
package: ledgerwallet-tezos
opam:30:tezos-signer-services:
<<: *opam_definition
variables:
2018-05-24 15:32:15 +04:00
package: tezos-signer-services
opam:31:tezos-protocol-alpha:
<<: *opam_definition
variables:
2018-02-02 19:26:02 +04:00
package: tezos-protocol-alpha
opam:32:tezos-protocol-environment:
<<: *opam_definition
variables:
package: tezos-protocol-environment
opam:33:tezos-signer-backends:
2018-05-24 15:32:15 +04:00
<<: *opam_definition
variables:
package: tezos-signer-backends
opam:34:tezos-client-alpha:
<<: *opam_definition
variables:
package: tezos-client-alpha
opam:35:tezos-client-commands:
<<: *opam_definition
variables:
package: tezos-client-commands
opam:36:tezos-protocol-environment-shell:
2018-04-03 13:39:09 +04:00
<<: *opam_definition
variables:
package: tezos-protocol-environment-shell
opam:37:tezos-baking-alpha:
<<: *opam_definition
variables:
package: tezos-baking-alpha
opam:38:tezos-protocol-genesis:
<<: *opam_definition
variables:
package: tezos-protocol-genesis
opam:39:ocplib-resto-json:
<<: *opam_definition
variables:
2018-04-03 13:39:09 +04:00
package: ocplib-resto-json
opam:40:tezos-protocol-updater:
<<: *opam_definition
variables:
2018-04-03 13:39:09 +04:00
package: tezos-protocol-updater
opam:41:tezos-p2p:
<<: *opam_definition
variables:
2018-04-03 13:39:09 +04:00
package: tezos-p2p
opam:42:tezos-baking-alpha-commands:
2018-01-23 16:51:36 +04:00
<<: *opam_definition
variables:
package: tezos-baking-alpha-commands
opam:43:tezos-client-alpha-commands:
<<: *opam_definition
variables:
package: tezos-client-alpha-commands
2018-01-29 04:26:41 +04:00
opam:44:tezos-client-base-unix:
<<: *opam_definition
variables:
package: tezos-client-base-unix
opam:45:tezos-client-genesis:
2018-01-29 04:26:41 +04:00
<<: *opam_definition
variables:
2018-02-02 19:26:02 +04:00
package: tezos-client-genesis
2018-01-23 16:51:36 +04:00
opam:46:ocplib-ezresto:
2018-04-03 13:39:09 +04:00
<<: *opam_definition
variables:
package: ocplib-ezresto
opam:47:tezos-embedded-protocol-alpha:
<<: *opam_definition
variables:
2018-02-02 19:26:02 +04:00
package: tezos-embedded-protocol-alpha
opam:48:tezos-embedded-protocol-demo:
<<: *opam_definition
variables:
2018-02-02 19:26:02 +04:00
package: tezos-embedded-protocol-demo
opam:49:tezos-embedded-protocol-genesis:
2018-01-29 04:26:41 +04:00
<<: *opam_definition
variables:
2018-02-02 19:26:02 +04:00
package: tezos-embedded-protocol-genesis
2018-01-29 04:26:41 +04:00
opam:50:tezos-shell:
<<: *opam_definition
variables:
package: tezos-shell
opam:51:tezos-endorser-alpha-commands:
<<: *opam_definition
variables:
package: tezos-endorser-alpha-commands
opam:52:tezos-client:
<<: *opam_definition
variables:
package: tezos-client
opam:53:ocplib-ezresto-directory:
<<: *opam_definition
variables:
package: ocplib-ezresto-directory
opam:54:tezos-accuser-alpha:
<<: *opam_definition
variables:
package: tezos-accuser-alpha
opam:55:tezos-endorser-alpha:
<<: *opam_definition
variables:
package: tezos-endorser-alpha
opam:56:tezos-accuser-alpha-commands:
<<: *opam_definition
variables:
package: tezos-accuser-alpha-commands
opam:57:tezos-baker-alpha:
<<: *opam_definition
variables:
package: tezos-baker-alpha
opam:58:tezos-protocol-demo:
<<: *opam_definition
variables:
package: tezos-protocol-demo
opam:59:tezos-signer:
<<: *opam_definition
variables:
package: tezos-signer
opam:60:tezos-node:
<<: *opam_definition
variables:
2018-04-03 13:39:09 +04:00
package: tezos-node
opam:61:ocplib-json-typed-browser:
<<: *opam_definition
variables:
package: ocplib-json-typed-browser
opam:62:tezos-baker-alpha-commands:
<<: *opam_definition
variables:
package: tezos-baker-alpha-commands
2018-07-05 14:08:55 +04:00
##END_OPAM##
2018-01-23 16:51:36 +04:00
2018-07-05 14:08:55 +04:00
############################################################
## Stage: publish ##
############################################################
2017-01-14 16:14:22 +04:00
2018-07-05 14:08:55 +04:00
publish:docker:
image: docker:latest
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
stage: publish
2017-03-05 05:15:14 +04:00
only:
- master
- alphanet
- zeronet
2018-06-30 19:15:03 +04:00
- betanet
2018-07-09 13:28:50 +04:00
- alphanet-staging
- zeronet-staging
- betanet-staging
2018-07-05 14:08:55 +04:00
before_script:
- mkdir ~/.docker || true
- echo "${CI_DOCKER_AUTH}" > ~/.docker/config.json
2017-03-09 17:43:59 +04:00
script:
- ./scripts/create_docker_image.sh
2018-07-07 07:31:31 +04:00
"${public_docker_image_name}" "${CI_COMMIT_REF_NAME}"
2018-07-06 22:35:21 +04:00
- docker push "${public_docker_image_name}:${CI_COMMIT_REF_NAME}"
2018-07-05 14:08:55 +04:00
tags:
- safe_docker
2017-03-09 17:43:59 +04:00
2018-07-05 14:08:55 +04:00
publish:doc:
image: ${build_deps_image_name}:${build_deps_image_version}
stage: publish
only:
2018-07-05 14:08:55 +04:00
- master
- alphanet
- zeronet
- betanet
2018-07-09 13:28:50 +04:00
- alphanet-staging
- zeronet-staging
- betanet-staging
2018-07-05 14:08:55 +04:00
before_script:
- sudo apk add --no-cache py3-sphinx py3-sphinx_rtd_theme openssh-client rsync
- sudo ln -s /usr/bin/sphinx-build-3 /usr/bin/sphinx-build
2018-07-05 14:08:55 +04:00
- echo "${CI_PK_GITLAB_DOC}" > ~/.ssh/id_ed25519
- echo "${CI_KH}" > ~/.ssh/known_hosts
- chmod 400 ~/.ssh/id_ed25519
script:
- make doc-html
- git clone git@gitlab.com:${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAMESPACE}.gitlab.io gitlab.io
- rsync --recursive --links --perms --delete --verbose
--exclude=.doctrees
docs/_build/ gitlab.io/public/"${CI_COMMIT_REF_NAME}"
- cd gitlab.io
- if [ -z "$(git status -s)" ] ; then
echo "Nothing to commit!" ;
else
git add public/"${CI_COMMIT_REF_NAME}" ;
git commit -m "Import doc for ${CI_COMMIT_REF_NAME} (${CI_COMMIT_SHA})" ;
git push origin master ;
fi
tags:
- gitlab-org