-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a local deploy and test ci on MacOS (#512)
- Loading branch information
Showing
6 changed files
with
202 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
name: GraphScope CI on MacOS | ||
|
||
on: | ||
# Trigger the workflow on push or pull request, but only for the main branch | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- 'gnn_engine/**' | ||
- '**.md' | ||
- '**.rst' | ||
- 'docs/**' | ||
- 'research/**' | ||
- 'scripts/**' | ||
- 'tutorials/**' | ||
pull_request: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- 'gnn_engine/**' | ||
- '**.md' | ||
- '**.rst' | ||
- 'docs/**' | ||
- 'research/**' | ||
- 'scripts/**' | ||
- 'tutorials/**' | ||
|
||
jobs: | ||
build: | ||
runs-on: macOS-latest | ||
env: | ||
JAVA_HOME: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home | ||
OPENSSL_ROOT_DIR: /usr/local/opt/openssl | ||
OPENSSL_LIBRARIES: /usr/local/opt/openssl/lib | ||
OPENSSL_SSL_LIBRARY: /usr/local/opt/openssl/lib/libssl.dylib | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Setup tmate session | ||
if: false | ||
uses: mxschmitt/action-tmate@v2 | ||
|
||
- name: Install Dependencies for MacOS | ||
run: | | ||
pushd ${GITHUB_WORKSPACE} | ||
brew install llvm@9 | ||
# write envs to .env | ||
{ | ||
echo "export CC=/usr/local/opt/llvm@9/bin/clang" | ||
echo "export CXX=/usr/local/opt/llvm@9/bin/clang++" | ||
echo "export LDFLAGS=-L/usr/local/opt/llvm@9/lib" | ||
echo "export CPPFLAGS=-I/usr/local/opt/llvm@9/include" | ||
echo "export PATH=/usr/local/opt/llvm@9/bin:${JAVA_HOME}/bin:$PATH" | ||
} >> .env | ||
# install dependency | ||
source .env | ||
/bin/bash ./scripts/install_dependencies.sh | ||
popd | ||
- name: Install libgrape-lite | ||
run: | | ||
source ${GITHUB_WORKSPACE}/.env | ||
git clone -b master --single-branch --depth=1 https://github.com/alibaba/libgrape-lite.git | ||
cd libgrape-lite | ||
mkdir build && cd build | ||
cmake .. | ||
make -j$(sysctl -n hw.ncpu) | ||
sudo make install | ||
- name: Setup tmate session | ||
if: false | ||
uses: mxschmitt/action-tmate@v2 | ||
|
||
- name: Install libvineyard | ||
run: | | ||
source ${GITHUB_WORKSPACE}/.env | ||
git clone -b main-v0.2.5 --single-branch --depth=1 https://github.com/alibaba/libvineyard.git | ||
cd libvineyard | ||
git submodule update --init | ||
mkdir build && pushd build | ||
cmake .. -DBUILD_VINEYARD_PYTHON_BINDINGS=ON -DBUILD_SHARED_LIBS=ON -DBUILD_VINEYARD_IO_OSS=ON -DBUILD_VINEYARD_TESTS=OFF | ||
make -j$(sysctl -n hw.ncpu) | ||
make vineyard_client_python -j$(sysctl -n hw.ncpu) | ||
sudo make install | ||
popd | ||
python3 setup.py bdist_wheel | ||
pip3 install ./dist/*.whl | ||
- name: Build GraphScope | ||
run: | | ||
source ${GITHUB_WORKSPACE}/.env | ||
export PATH=/usr/local/opt/gnu-sed/libexec/gnubin:${PATH}:/usr/local/zookeeper/bin | ||
# builde and install gae and gie | ||
make gae gie | ||
pushd python | ||
pip3 install -U setuptools --user | ||
pip3 install -r requirements.txt -r requirements-dev.txt --user | ||
python3 setup.py bdist_wheel | ||
pip3 install -U ./dist/*.whl --user | ||
popd | ||
pushd coordinator | ||
pip3 install -r requirements.txt -r requirements-dev.txt --user | ||
python3 setup.py bdist_wheel | ||
pip3 install -U ./dist/*.whl --user | ||
popd | ||
- name: DEBUG | ||
if: false | ||
uses: mxschmitt/action-tmate@v2 | ||
|
||
- name: Run Local Test | ||
run: | | ||
source ${GITHUB_WORKSPACE}/.env | ||
# prelaunch the etcd | ||
/usr/local/bin/etcd --data-dir=/tmp/default.etcd& | ||
export PATH=/usr/local/opt/gnu-sed/libexec/gnubin:${JAVA_HOME}/bin:${PATH}:/usr/local/zookeeper/bin | ||
export GRAPHSCOPE_PREFIX=/usr/local | ||
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib | ||
export GS_TEST_DIR=${GITHUB_WORKSPACE}/gstest | ||
git clone -b master --single-branch --depth=1 https://github.com/7br/gstest.git ${GS_TEST_DIR} | ||
python3 -m pytest -s -v ${GITHUB_WORKSPACE}/python/tests/test_run_locally.py | ||
# delete etcd dir | ||
rm -fr /tmp/default.etcd || true | ||
- name: Upload GIE Log | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: gie-log | ||
path: /tmp/graphscope/ | ||
|
||
- name: Setup tmate session debug | ||
if: false | ||
uses: mxschmitt/action-tmate@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters