forked from alibaba/GraphScope
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
149 lines (115 loc) · 4.47 KB
/
.cirrus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# only run for releases
# only_if: $CIRRUS_TAG != ''
env:
MACOSX_DEPLOYMENT_TARGET: "12"
macosx_arm64_wheel_task:
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-base:latest
timeout_in: 120m
# can be manually triggered when needed (nightly or release)
trigger_type: manual
checkout_script:
- git submodule init
- git submodule update
- |
pushd ./learning_engine/graph-learn
git submodule update --init third_party/pybind11
popd
# suppress the warning of `git submodule xxx` with `sudo`.
git config --global --add safe.directory `pwd`
git config --global --add safe.directory `pwd`/learning_engine/graph-learn
git config --global --add safe.directory `pwd`/learning_engine/graph-learn/third_party/pybind11/pybind11
- |
# change the version for nightly release
# e.g. 0.15.0 -> 0.15.0a20220808
time=$(date "+%Y%m%d")
version=$(cat ./VERSION)
if [[ "$CIRRUS_TAG" == "" ]];
then
echo "${version}a${time}" > ./VERSION;
fi
install_deps_script:
- brew update
- brew install coreutils pyenv python
install_graphscope_deps_script: |
brew update || true
brew install bash coreutils
alias bash=$(brew --prefix)/bin/bash
sudo mkdir /opt/graphscope
sudo chown -R $(id -u):$(id -g) /opt/graphscope
# Not sure when the first installation would fail, saying that the lock of python3.10 is taken
# However the second trial would success.
python3 -m pip install click
python3 gsctl.py install-deps dev || true
python3 gsctl.py install-deps dev
brew install openjdk@11
sudo ln -sfn /opt/homebrew/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk
python3 -m pip install -r ./python/requirements.txt
python3 -m pip install -r ./python/requirements-dev.txt
echo "export PATH=/opt/homebrew/opt/coreutils/libexec/gnubin:\$PATH" >> ~/.graphscope_env
# for debugging with "Rerun with Terminal Access" on cirrus CI
bash ./debugging.sh || true
build_graphscope_wheels_script: |
# source environment variable
. ~/.graphscope_env
python3 -m pip install libclang
echo ${CC}
# for grpc-java
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
# for building GLE
git config --global --add safe.directory .
# make sure the python's local bin is in PATH (by `pip install --user`)
export PATH=$HOME/.local/bin:$PATH
# prepare
pushd ./python
python3 setup.py build_proto
popd
pushd ./coordinator
python3 setup.py build_builtin
popd
# build graphscope server wheel
pushd ./k8s/internal
sudo -E env PATH=$PATH make graphscope-py3-package GRAPHSCOPE_HOME=/usr/local
popd
graphscope_artifacts:
path: coordinator/dist/wheelhouse/*.whl
install_various_python_script:
- pyenv install 3.8.16
- pyenv install 3.9.16
- pyenv install 3.10.10
- pyenv install 3.11.2
build_graphscope_client_script: |
. ~/.graphscope_env
# make sure the python's local bin is in PATH (by `pip install --user`)
export PATH=$HOME/.local/bin:$PATH
for py in 3.8.16 3.9.16 3.10.10 3.11.2; do
current_python=$(pyenv root)/versions/$py/bin/python
echo "Python is: $current_python, $($current_python --version)"
$current_python -m pip install delocate numpy wheel
export PATH=$(dirname $current_python):$PATH
python3 -c "import sys; print(sys.version)"
# build graphscope client wheel
pushd ./k8s/internal
sudo -E env PATH=$PATH make graphscope-client-py3-package GRAPHSCOPE_HOME=/usr/local
popd
done
graphscope_client_artifacts:
path: python/dist/wheelhouse/*.whl
run_tests_script: |
pushd python/dist/wheelhouse
for f in * ; do
python3 -m pip install $f --user || true;
done
popd
sudo python3 -m pip install coordinator/dist/wheelhouse/*.whl
# run tests
export GS_TEST_DIR="$(pwd)/gstest"
git clone -b master --single-branch --depth=1 https://github.com/7br/gstest.git ${GS_TEST_DIR}
export JAVA_HOME=$(/usr/libexec/java_home -v11)
export PATH=$JAVA_HOME/bin:$HOME/.local/bin:$PATH
sudo mkdir -p /tmp || true
sudo chmod -R a+wrx /tmp || true
# for debugging with "Rerun with Terminal Access" on cirrus CI
bash ./debugging.sh || true
python3 -c "import sys; print(sys.version)"
python3 -m pytest -s -v $(dirname $(python3 -c "import graphscope; print(graphscope.__file__)"))/tests/minitest