|
| 1 | +config: |
| 2 | + version-candidate: VERSION |
| 3 | + |
| 4 | +build: |
| 5 | + correctness: |
| 6 | + build: |
| 7 | + machine: graknlabs-ubuntu-20.04 |
| 8 | + type: foreground |
| 9 | + script: | |
| 10 | + pyenv global 3.6.10 |
| 11 | + sudo unlink /usr/bin/python3 |
| 12 | + sudo ln -s $(which python3) /usr/bin/python3 |
| 13 | + sudo ln -s /usr/share/pyshared/lsb_release.py /opt/pyenv/versions/3.6.10/lib/python3.6/site-packages/lsb_release.py |
| 14 | + bazel build //... |
| 15 | + test: |
| 16 | + machine: graknlabs-ubuntu-20.04 |
| 17 | + type: foreground |
| 18 | + script: | |
| 19 | + pyenv global 3.6.10 |
| 20 | + sudo unlink /usr/bin/python3 |
| 21 | + sudo ln -s $(which python3) /usr/bin/python3 |
| 22 | + sudo ln -s /usr/share/pyshared/lsb_release.py /opt/pyenv/versions/3.6.10/lib/python3.6/site-packages/lsb_release.py |
| 23 | + bazel test //kglib/... --test_output=streamed --spawn_strategy=standalone |
| 24 | + test-end-to-end: |
| 25 | + machine: graknlabs-ubuntu-20.04 |
| 26 | + type: foreground |
| 27 | + script: | |
| 28 | + pyenv global 3.6.10 |
| 29 | + sudo unlink /usr/bin/python3 |
| 30 | + sudo ln -s $(which python3) /usr/bin/python3 |
| 31 | + sudo ln -s /usr/share/pyshared/lsb_release.py /opt/pyenv/versions/3.6.10/lib/python3.6/site-packages/lsb_release.py |
| 32 | + bazel test //tests/end_to_end/... --test_output=streamed --spawn_strategy=standalone |
| 33 | + test-markdown-link-health: |
| 34 | + machine: graknlabs-ubuntu-20.04 |
| 35 | + type: foreground |
| 36 | + script: | |
| 37 | + pyenv global 3.6.10 |
| 38 | + sudo unlink /usr/bin/python3 |
| 39 | + sudo ln -s $(which python3) /usr/bin/python3 |
| 40 | + sudo ln -s /usr/share/pyshared/lsb_release.py /opt/pyenv/versions/3.6.10/lib/python3.6/site-packages/lsb_release.py |
| 41 | + sudo snap install node --classic |
| 42 | + find . -name \*.md | xargs -L1 npx [email protected] -v |
| 43 | + deploy-pip-snapshot: |
| 44 | + filter: |
| 45 | + owner: graknlabs |
| 46 | + branch: master |
| 47 | + machine: graknlabs-ubuntu-20.04 |
| 48 | + type: foreground |
| 49 | + script: | |
| 50 | + pyenv global 3.6.10 |
| 51 | + sudo unlink /usr/bin/python3 |
| 52 | + sudo ln -s $(which python3) /usr/bin/python3 |
| 53 | + sudo ln -s /usr/share/pyshared/lsb_release.py /opt/pyenv/versions/3.6.10/lib/python3.6/site-packages/lsb_release.py |
| 54 | + export DEPLOY_PIP_USERNAME=$REPO_GRAKN_USERNAME |
| 55 | + export DEPLOY_PIP_PASSWORD=$REPO_GRAKN_PASSWORD |
| 56 | + bazel run --define version=$(git rev-parse HEAD) //:deploy-pip -- snapshot |
| 57 | + test-deployment-pip: |
| 58 | + filter: |
| 59 | + owner: graknlabs |
| 60 | + branch: master |
| 61 | + dependencies: [deploy-pip-snapshot] |
| 62 | + machine: graknlabs-ubuntu-20.04 |
| 63 | + type: foreground |
| 64 | + script: | |
| 65 | + pyenv global 3.6.10 |
| 66 | + sudo unlink /usr/bin/python3 |
| 67 | + sudo ln -s $(which python3) /usr/bin/python3 |
| 68 | + sudo ln -s /usr/share/pyshared/lsb_release.py /opt/pyenv/versions/3.6.10/lib/python3.6/site-packages/lsb_release.py |
| 69 | + bazel run //:grakn-extractor -- dist/grakn-core-all-linux |
| 70 | + nohup ./dist/grakn-core-all-linux/grakn server start |
| 71 | + echo -n "0.0.0-$CIRCLE_SHA1" > VERSION |
| 72 | + sed -i -e "s/KGLIB_VERSION_MARKER/$(cat VERSION)/g" tests/deployment/requirements.txt |
| 73 | + cat tests/deployment/requirements.txt |
| 74 | + pip install -U pip setuptools |
| 75 | + pip install -r tests/deployment/requirements.txt |
| 76 | + ./dist/grakn-core-all-linux/grakn console -k diagnosis -f kglib/utils/grakn/synthetic/examples/diagnosis/schema.gql |
| 77 | + cd tests/deployment/ && python -m unittest kgcn.diagnosis |
| 78 | +
|
| 79 | + execution: |
| 80 | + - build |
| 81 | + - test |
| 82 | + - test-end-to-end |
| 83 | + - test-markdown-link-health |
| 84 | + - deploy-pip-snapshot |
| 85 | + - test-deployment-pip |
| 86 | + |
| 87 | +release: |
| 88 | + filter: |
| 89 | + owner: graknlabs |
| 90 | + branch: master |
| 91 | + validation: |
| 92 | + validate-dependencies: |
| 93 | + machine: graknlabs-ubuntu-20.04 |
| 94 | + script: bazel test //:release-validate-deps --test_output=streamed |
| 95 | + deployment: |
| 96 | + deploy-github: |
| 97 | + machine: graknlabs-ubuntu-20.04 |
| 98 | + script: | |
| 99 | + wget https://github.com/tcnksm/ghr/releases/download/v0.12.0/ghr_v0.12.0_linux_386.tar.gz |
| 100 | + tar xvf ghr_v0.12.0_linux_386.tar.gz |
| 101 | + export VERSION_TAG=$(cat "VERSION") |
| 102 | + curl -X POST --fail --data "{\"tag_name\": \"${VERSION_TAG}\",\"target_commitish\": \"${CIRCLE_SHA1}\",\"name\": \"KGLIB ${VERSION_TAG}\",\"body\": \"\",\"draft\": true,\"prerelease\": false}" https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/releases?access_token=${GITHUB_DEPLOYMENT_TOKEN} |
| 103 | + deploy-pip-release: |
| 104 | + machine: graknlabs-ubuntu-20.04 |
| 105 | + script: | |
| 106 | + export DEPLOY_PIP_USERNAME=$REPO_PYPI_USERNAME |
| 107 | + export DEPLOY_PIP_PASSWORD=$REPO_PYPI_PASSWORD |
| 108 | + bazel run --define version=$(cat VERSION) //:deploy-pip -- release |
0 commit comments