variables: ## Please update `scripts/version.sh` accordingly build_deps_image_version: 63f06ab145e22aef4cc55b5b9557756d4c868843 build_deps_image_name: registry.gitlab.com/tezos/opam-repository public_docker_image_name: docker.io/${CI_PROJECT_PATH} stages: - build - test - packaging - publish ############################################################ ## Stage: build (only MR) ## ############################################################ .build_template: &build_definition image: ${build_deps_image_name}:${build_deps_image_version} stage: build except: - master - alphanet - zeronet - betanet before_script: - opam list - . ./scripts/version.sh tags: - gitlab-org 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 - ./scripts/check_opam_test.sh check_indentation: <<: *build_definition script: - jbuilder build @runtest_indent build: <<: *build_definition script: - make all - make build-test artifacts: paths: - _build expire_in: 1 day ############################################################ ## Stage: test (only MR) ## ############################################################ .test_template: &test_definition <<: *build_definition stage: test dependencies: - build test:stdlib: <<: *test_definition script: - jbuilder build @src/lib_stdlib/runtest test:stdlib_unix: <<: *test_definition script: - jbuilder build @src/lib_stdlib_unix/runtest test:data_encoding: <<: *test_definition script: - jbuilder build @src/lib_data_encoding/runtest test:storage: <<: *test_definition script: - jbuilder build @src/lib_storage/runtest test:crypto: <<: *test_definition script: - jbuilder build @src/lib_crypto/runtest test:shell: <<: *test_definition script: - jbuilder build @src/lib_shell/runtest test:p2p:io-scheduler: <<: *test_definition script: - jbuilder build @src/lib_p2p/runtest_p2p_io_scheduler_ipv4 test:p2p:socket: <<: *test_definition script: - jbuilder build @src/lib_p2p/runtest_p2p_socket_ipv4 test:p2p:pool: <<: *test_definition script: - jbuilder build @src/lib_p2p/runtest_p2p_pool_ipv4 test:proto_alpha: <<: *test_definition script: - jbuilder build @src/proto_alpha/lib_protocol/runtest test:p2p:peerset: <<: *test_definition script: - jbuilder build @src/lib_p2p/runtest_p2p_peerset test:p2p:ipv6set: <<: *test_definition script: - jbuilder build @src/lib_p2p/runtest_p2p_ipv6set test:p2p:banned_peers: <<: *test_definition script: - jbuilder build @src/lib_p2p/runtest_p2p_banned_peers test:client_alpha:vote: <<: *test_definition script: - jbuilder build @src/proto_alpha/lib_delegate/runtest_vote test:basic.sh: <<: *test_definition script: - jbuilder build @src/bin_client/runtest_basic.sh test:contracts.sh: <<: *test_definition script: - jbuilder build @src/bin_client/runtest_contracts.sh test:multinode.sh: <<: *test_definition script: - jbuilder build @src/bin_client/runtest_multinode.sh test:inject.sh: <<: *test_definition script: - jbuilder build @src/bin_client/runtest_injection.sh test:proto:sandbox: <<: *test_definition script: - jbuilder 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 ############################################################ ## Stage: building opam packages (only master and *opam*) ## ############################################################ .opam_template: &opam_definition image: ${build_deps_image_name}:opam--${build_deps_image_version} stage: packaging dependencies: [] only: - master - /^.*opam.*$/ script: - ./scripts/opam-pin.sh - opam depext --yes ${package} - opam install --yes ${package} - opam reinstall --yes --with-test ${package} tags: - gitlab-org ##BEGIN_OPAM## opam:00:ocplib-json-typed: <<: *opam_definition variables: package: ocplib-json-typed opam:01:ocplib-json-typed-bson: <<: *opam_definition variables: package: ocplib-json-typed-bson opam:02:tezos-stdlib: <<: *opam_definition variables: package: tezos-stdlib opam:03:tezos-data-encoding: <<: *opam_definition variables: package: tezos-data-encoding opam:04:ocplib-resto: <<: *opam_definition variables: package: ocplib-resto opam:05:tezos-error-monad: <<: *opam_definition variables: package: tezos-error-monad opam:06:ocplib-resto-directory: <<: *opam_definition variables: package: ocplib-resto-directory opam:07:blake2: <<: *opam_definition variables: package: blake2 opam:08:hacl: <<: *opam_definition variables: package: hacl opam:09:secp256k1: <<: *opam_definition variables: package: secp256k1 opam:10:tezos-clic: <<: *opam_definition variables: package: tezos-clic opam:11:tezos-rpc: <<: *opam_definition variables: package: tezos-rpc opam:12:uecc: <<: *opam_definition variables: package: uecc opam:13:tezos-crypto: <<: *opam_definition variables: package: tezos-crypto opam:14:tezos-micheline: <<: *opam_definition variables: package: tezos-micheline opam:15:lmdb: <<: *opam_definition variables: package: lmdb opam:16:pbkdf: <<: *opam_definition variables: package: pbkdf opam:17:ocplib-resto-cohttp: <<: *opam_definition variables: package: ocplib-resto-cohttp opam:18:tezos-base: <<: *opam_definition variables: package: tezos-base opam:19:irmin-lmdb: <<: *opam_definition variables: package: irmin-lmdb opam:20:bip39: <<: *opam_definition variables: package: bip39 opam:21:tezos-rpc-http: <<: *opam_definition variables: package: tezos-rpc-http opam:22:tezos-shell-services: <<: *opam_definition variables: package: tezos-shell-services opam:23:tezos-stdlib-unix: <<: *opam_definition variables: package: tezos-stdlib-unix opam:24:tezos-storage: <<: *opam_definition variables: package: tezos-storage opam:25:tezos-protocol-environment-sigs: <<: *opam_definition variables: package: tezos-protocol-environment-sigs opam:26:tezos-client-base: <<: *opam_definition variables: package: tezos-client-base opam:27:tezos-protocol-compiler: <<: *opam_definition variables: package: tezos-protocol-compiler opam:28:tezos-signer-services: <<: *opam_definition variables: package: tezos-signer-services opam:29:tezos-protocol-alpha: <<: *opam_definition variables: package: tezos-protocol-alpha opam:30:tezos-protocol-environment: <<: *opam_definition variables: package: tezos-protocol-environment opam:31:tezos-signer-backends: <<: *opam_definition variables: package: tezos-signer-backends opam:32:tezos-client-alpha: <<: *opam_definition variables: package: tezos-client-alpha opam:33:tezos-client-commands: <<: *opam_definition variables: package: tezos-client-commands opam:34:tezos-protocol-environment-shell: <<: *opam_definition variables: package: tezos-protocol-environment-shell opam:35:tezos-baking-alpha: <<: *opam_definition variables: package: tezos-baking-alpha opam:36:tezos-protocol-genesis: <<: *opam_definition variables: package: tezos-protocol-genesis opam:37:ocplib-resto-json: <<: *opam_definition variables: package: ocplib-resto-json opam:38:tezos-protocol-updater: <<: *opam_definition variables: package: tezos-protocol-updater opam:39:tezos-p2p: <<: *opam_definition variables: package: tezos-p2p opam:40:tezos-baking-alpha-commands: <<: *opam_definition variables: package: tezos-baking-alpha-commands opam:41:tezos-client-alpha-commands: <<: *opam_definition variables: package: tezos-client-alpha-commands opam:42:tezos-client-base-unix: <<: *opam_definition variables: package: tezos-client-base-unix opam:43:tezos-client-genesis: <<: *opam_definition variables: package: tezos-client-genesis opam:44:ocplib-ezresto: <<: *opam_definition variables: package: ocplib-ezresto opam:45:ledgerwallet: <<: *opam_definition variables: package: ledgerwallet opam:46:tezos-embedded-protocol-alpha: <<: *opam_definition variables: package: tezos-embedded-protocol-alpha opam:47:tezos-embedded-protocol-demo: <<: *opam_definition variables: package: tezos-embedded-protocol-demo opam:48:tezos-embedded-protocol-genesis: <<: *opam_definition variables: package: tezos-embedded-protocol-genesis opam:49:tezos-shell: <<: *opam_definition variables: package: tezos-shell opam:50:tezos-endorser-alpha-commands: <<: *opam_definition variables: package: tezos-endorser-alpha-commands opam:51:tezos-client: <<: *opam_definition variables: package: tezos-client opam:52:tezos-endorser-alpha: <<: *opam_definition variables: package: tezos-endorser-alpha opam:53:tezos-accuser-alpha-commands: <<: *opam_definition variables: package: tezos-accuser-alpha-commands opam:54:ocplib-ezresto-directory: <<: *opam_definition variables: package: ocplib-ezresto-directory opam:55:tezos-accuser-alpha: <<: *opam_definition variables: package: tezos-accuser-alpha opam:56:tezos-baker-alpha: <<: *opam_definition variables: package: tezos-baker-alpha opam:57:tezos-protocol-demo: <<: *opam_definition variables: package: tezos-protocol-demo opam:58:tezos-signer: <<: *opam_definition variables: package: tezos-signer opam:59:ledgerwallet-tezos: <<: *opam_definition variables: package: ledgerwallet-tezos opam:60:tezos-node: <<: *opam_definition variables: package: tezos-node opam:59:ocplib-json-typed-browser: <<: *opam_definition variables: package: ocplib-json-typed-browser opam:60:tezos-baker-alpha-commands: <<: *opam_definition variables: package: tezos-baker-alpha-commands ##END_OPAM## ############################################################ ## Stage: publish ## ############################################################ publish:docker: image: docker:latest services: - docker:dind variables: DOCKER_DRIVER: overlay2 stage: publish only: - master - alphanet - zeronet - betanet before_script: - mkdir ~/.docker || true - echo "${CI_DOCKER_AUTH}" > ~/.docker/config.json script: - ./scripts/create_docker_image.sh "${public_docker_image}" "${CI_COMMIT_REF_NAME}" - docker push "${public_docker_image_name}:${CI_COMMIT_REF_NAME}" tags: - safe_docker publish:doc: image: ${build_deps_image_name}:${build_deps_image_version} stage: publish only: - master - alphanet - zeronet - betanet 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 - 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