2016-09-08 21:13:10 +04:00
|
|
|
variables:
|
|
|
|
ocaml_image: alpine_ocaml-4.03.0
|
|
|
|
build_image_name: ocp_tezos_build
|
|
|
|
build_image_id: ${CI_BUILD_REF}
|
|
|
|
build_image: ${build_image_name}:${ocaml_image}
|
|
|
|
|
|
|
|
image: ${build_image}_${build_image_id}
|
|
|
|
|
|
|
|
stages:
|
|
|
|
- build_deps
|
|
|
|
- build
|
|
|
|
- build_test
|
|
|
|
- test
|
|
|
|
- publish
|
|
|
|
- cleanup
|
|
|
|
|
|
|
|
build_deps:
|
|
|
|
stage: build_deps
|
|
|
|
image: ocp:docker
|
|
|
|
tags:
|
|
|
|
- docker_builder
|
|
|
|
script:
|
|
|
|
- ./scripts/create_docker_builder.sh
|
|
|
|
${build_image_name} ${ocaml_image} "_${build_image_id}"
|
|
|
|
|
|
|
|
build:
|
|
|
|
stage: build
|
|
|
|
tags:
|
|
|
|
- tezos_builder
|
|
|
|
script:
|
|
|
|
- make -j4
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
untracked: true
|
|
|
|
|
|
|
|
build:test:
|
|
|
|
stage: build_test
|
|
|
|
tags:
|
|
|
|
- tezos_builder
|
|
|
|
script:
|
|
|
|
- make -C test build-test -j4
|
|
|
|
dependencies:
|
|
|
|
- build
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
untracked: true
|
|
|
|
|
|
|
|
test:store:
|
|
|
|
stage: test
|
|
|
|
tags:
|
|
|
|
- tezos_builder
|
|
|
|
script:
|
|
|
|
- make -C test run-test-store
|
|
|
|
dependencies:
|
|
|
|
- build
|
|
|
|
- build:test
|
|
|
|
|
|
|
|
test:context:
|
|
|
|
stage: test
|
|
|
|
tags:
|
|
|
|
- tezos_builder
|
|
|
|
script:
|
|
|
|
- make -C test run-test-context
|
|
|
|
dependencies:
|
|
|
|
- build
|
|
|
|
- build:test
|
|
|
|
|
|
|
|
test:state:
|
|
|
|
stage: test
|
|
|
|
tags:
|
|
|
|
- tezos_builder
|
|
|
|
script:
|
|
|
|
- make -C test run-test-state
|
|
|
|
dependencies:
|
|
|
|
- build
|
|
|
|
- build:test
|
|
|
|
|
|
|
|
test:basic:
|
|
|
|
stage: test
|
|
|
|
tags:
|
|
|
|
- tezos_builder
|
|
|
|
script:
|
|
|
|
- make -C test run-test-basic
|
|
|
|
dependencies:
|
|
|
|
- build
|
|
|
|
- build:test
|
|
|
|
|
|
|
|
test:basic.sh:
|
|
|
|
stage: test
|
|
|
|
tags:
|
|
|
|
- tezos_builder
|
|
|
|
script:
|
|
|
|
- make -C test run-test-basic.sh
|
|
|
|
dependencies:
|
|
|
|
- build
|
|
|
|
- build:test
|
|
|
|
|
|
|
|
publish:expurge:
|
|
|
|
stage: publish
|
|
|
|
tags:
|
|
|
|
- tezos_builder
|
|
|
|
only:
|
|
|
|
- master@tezos/tezos
|
|
|
|
script:
|
|
|
|
- echo "${CI_KH}" > ~/.ssh/known_hosts
|
|
|
|
- echo "${CI_PK}" > ~/.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
|
2016-09-21 17:36:45 +04:00
|
|
|
'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'
|
2016-09-08 21:13:10 +04:00
|
|
|
HEAD
|
|
|
|
- git tag ${CI_BUILD_REF}_expurged
|
|
|
|
- git push git@gitlab.ocamlpro.com:${CI_PROJECT_PATH}.git
|
|
|
|
-f --tags HEAD:master-expurged
|
|
|
|
|
|
|
|
publish:github:
|
|
|
|
image: ocaml/opam:${ocaml_image}
|
|
|
|
stage: publish
|
|
|
|
tags:
|
|
|
|
- tezos_builder
|
|
|
|
only:
|
|
|
|
- master@tezos/tezos
|
|
|
|
when: manual
|
|
|
|
script:
|
|
|
|
- echo "${CI_KH}" > ~/.ssh/known_hosts
|
|
|
|
- echo "${CI_PK}" > ~/.ssh/id_rsa
|
|
|
|
- chmod 400 ~/.ssh/id_rsa
|
|
|
|
- git reset ${CI_BUILD_REF}_expurged
|
|
|
|
- git push git@github.com:OCamlPro/tezos.git
|
|
|
|
-f HEAD:master
|
|
|
|
|
|
|
|
cleanup:
|
|
|
|
stage: cleanup
|
|
|
|
image: ocp:docker
|
|
|
|
tags:
|
|
|
|
- docker_builder
|
|
|
|
script:
|
|
|
|
- docker tag ${build_image}_${build_image_id}
|
|
|
|
${build_image}_${CI_PROJECT_NAMESPACE}_${CI_BUILD_REF_NAME}
|
|
|
|
- docker rmi ${build_image}_${build_image_id}
|
|
|
|
when: always
|