d87a6cd556
And minor fix: - introduce configuration file for OCaml and alpine versions - add missing `libssl1.0` in docker image - remove the split call to `install_build_deps` (not required anymore) - rename scripts
191 lines
3.9 KiB
YAML
191 lines
3.9 KiB
YAML
variables:
|
|
image_name: ocp_tezos
|
|
image_id: ${CI_BUILD_REF_NAME}
|
|
build_image_name: ${image_name}_build_deps
|
|
build_image_id: ${CI_BUILD_REF}
|
|
|
|
image: ${build_image_name}:${build_image_id}
|
|
|
|
stages:
|
|
- build_deps
|
|
- build
|
|
- build_test
|
|
- test
|
|
- expurge
|
|
- publish
|
|
- cleanup
|
|
|
|
build_deps:
|
|
stage: build_deps
|
|
image: ocp:docker
|
|
tags:
|
|
- docker_builder
|
|
script:
|
|
- ./scripts/create_build_deps_docker_image.sh
|
|
${build_image_name} ${build_image_id}
|
|
|
|
build:
|
|
stage: build
|
|
tags:
|
|
- tezos_builder
|
|
script:
|
|
- echo "PRODUCTION=yes" > src/Makefile.local
|
|
- 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
|
|
|
|
test:data-encoding:
|
|
stage: test
|
|
tags:
|
|
- tezos_builder
|
|
script:
|
|
- make -C test run-test-data-encoding
|
|
dependencies:
|
|
- build
|
|
- build:test
|
|
|
|
test:p2p-io-scheduler:
|
|
stage: test
|
|
tags:
|
|
- tezos_builder
|
|
script:
|
|
- make -C test run-test-p2p-io-scheduler
|
|
dependencies:
|
|
- build
|
|
- build:test
|
|
|
|
test:p2p-connection:
|
|
stage: test
|
|
tags:
|
|
- tezos_builder
|
|
script:
|
|
- make -C test run-test-p2p-connection
|
|
dependencies:
|
|
- build
|
|
- build:test
|
|
|
|
test:p2p-connection-pool:
|
|
stage: test
|
|
tags:
|
|
- tezos_builder
|
|
script:
|
|
- make -C test run-test-p2p-connection-pool
|
|
dependencies:
|
|
- build
|
|
- build:test
|
|
|
|
publish:docker:
|
|
stage: publish
|
|
image: ocp:docker
|
|
tags:
|
|
- docker_builder
|
|
script:
|
|
- ./scripts/create_docker_image.sh ${image_name} ${build_image_id}
|
|
- docker tag ${image_name}:${build_image_id}
|
|
"$CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME"
|
|
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
|
|
- docker push "$CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME"
|
|
- docker rmi "$CI_REGISTRY_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:OCamlPro/tezos.git -f HEAD:master
|
|
|
|
cleanup:
|
|
stage: cleanup
|
|
image: ocp:docker
|
|
tags:
|
|
- docker_builder
|
|
script:
|
|
- docker tag ${build_image_name}:${build_image_id}
|
|
${build_image_name}:${CI_PROJECT_NAMESPACE}_${CI_BUILD_REF_NAME}
|
|
- docker rmi ${build_image_name}:${build_image_id}
|
|
when: always
|