ligo/.gitlab-ci.yml

234 lines
5.0 KiB
YAML

variables:
public_docker_image: docker.io/tezos/tezos
image: ${CI_REGISTRY_IMAGE}:${CI_BUILD_REF}_build_deps
stages:
- build_deps
- build
- test
- build_docker
- publish
- cleanup
build_deps:
stage: build_deps
image: docker:latest
tags:
- docker_builder
script:
- ./scripts/create_build_deps_docker_image.sh
${CI_REGISTRY_IMAGE} ${CI_BUILD_REF}_build_deps
build:
stage: build
tags:
- tezos_builder
script:
- echo "PRODUCTION=yes" > src/Makefile.local
- make -C src -j4
- make -C test build
artifacts:
expire_in: 1 week
untracked: true
test:utils:data-encoding:
stage: test
tags:
- tezos_builder
script:
- make -C test/utils run-test-data-encoding
dependencies:
- build
test:utils:merkle:
stage: test
tags:
- tezos_builder
script:
- make -C test/utils run-test-merkle
dependencies:
- build
test:shell:store:
stage: test
tags:
- tezos_builder
script:
- make -C test/shell run-test-store
dependencies:
- build
test:shell:context:
stage: test
tags:
- tezos_builder
script:
- make -C test/shell run-test-context
dependencies:
- build
test:shell:state:
stage: test
tags:
- tezos_builder
script:
- make -C test/shell run-test-state
dependencies:
- build
test:p2p:io-scheduler:
stage: test
tags:
- tezos_builder
script:
- make -C test/p2p run-test-p2p-io-scheduler
dependencies:
- build
test:p2p:connection:
stage: test
tags:
- tezos_builder
script:
- make -C test/p2p run-test-p2p-connection
dependencies:
- build
test:p2p:connection-pool:
stage: test
tags:
- tezos_builder
script:
- make -C test/p2p run-test-p2p-connection-pool
dependencies:
- build
test:proto_alpha:transactions:
stage: test
tags:
- tezos_builder
script:
- make -C test/proto_alpha run-test-transaction
dependencies:
- build
test:proto_alpha:origination:
stage: test
tags:
- tezos_builder
script:
- make -C test/proto_alpha run-test-origination
dependencies:
- build
test:proto_alpha:endorsement:
stage: test
tags:
- tezos_builder
script:
- make -C test/proto_alpha run-test-endorsement
dependencies:
- build
test:proto_alpha:vote:
stage: test
tags:
- tezos_builder
script:
- make -C test/proto_alpha run-test-vote
dependencies:
- build
test:basic.sh:
stage: test
tags:
- tezos_builder
script:
- make -C test run-basic.sh
dependencies:
- build
build:docker:
stage: build_docker
image: docker:latest
tags:
- public_docker_builder
script:
- ./scripts/create_docker_image.sh "${CI_REGISTRY_IMAGE}" "${CI_BUILD_REF}" .
- docker login -u gitlab-ci-token -p "$CI_BUILD_TOKEN" "${CI_REGISTRY}"
- docker tag "${CI_REGISTRY_IMAGE}:${CI_BUILD_REF}"
"${CI_REGISTRY_IMAGE}:${CI_BUILD_REF_NAME}"
- docker push "${CI_REGISTRY_IMAGE}:${CI_BUILD_REF_NAME}"
- docker rmi "${CI_REGISTRY_IMAGE}:${CI_BUILD_REF_NAME}"
publish:docker:
stage: publish
image: docker:latest
tags:
- public_docker_builder
only:
- master@tezos/tezos
- alphanet@tezos/tezos
script:
- mkdir -p ~/.docker ;
- echo "$CI_DOCKER_AUTH" > ~/.docker/config.json ;
- docker tag "${CI_REGISTRY_IMAGE}:${CI_BUILD_REF}"
"${public_docker_image}:${CI_BUILD_REF_NAME}"
- docker push "${public_docker_image}:${CI_BUILD_REF_NAME}"
- docker rmi "${public_docker_image}:${CI_BUILD_REF_NAME}"
publish:github:
image: ocaml/opam
stage: publish
tags:
- tezos_builder
only:
- master@tezos/tezos
script:
- echo "${CI_KH}" > ~/.ssh/known_hosts
- echo "${CI_PK_GITHUB}" > ~/.ssh/id_rsa
- chmod 400 ~/.ssh/id_rsa
- rm -fr .git/refs/original
- git filter-branch --prune-empty --index-filter
'git rm -r --cached --ignore-unmatch
.gitlab-ci.yml
"docs/proof of stake.md"
src/client/embedded/bootstrap/mining/'
--env-filter
'if [ $GIT_COMMIT != "f42e9d12ac75d2876a4cf600d44976b7090d4533" ] ; then
export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME" ;
export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL" ;
export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE" ;
export GIT_AUTHOR_NAME="Dynamic Ledger Solutions, Inc." ;
export GIT_AUTHOR_EMAIL="contact@tezos.com" ;
fi'
HEAD
- git push git@github.com:tezos/tezos.git -f HEAD:master
cleanup:
stage: cleanup
image: docker:latest
tags:
- docker_builder
script:
- docker tag "${CI_REGISTRY_IMAGE}:${CI_BUILD_REF}_build_deps"
"${CI_REGISTRY_IMAGE}:${CI_BUILD_REF_NAME}_build_deps"
- docker rmi "${CI_REGISTRY_IMAGE}:${CI_BUILD_REF}_build_deps"
when: always
allow_failure: true
cleanup:public:
stage: cleanup
image: docker:latest
tags:
- public_docker_builder
only:
- master@tezos/tezos
- alphanet@tezos/tezos
script:
- docker rmi "${CI_REGISTRY_IMAGE}:${CI_BUILD_REF}"
when: always
allow_failure: true