Skip to content

Implements Hive Input/Output format to use vineyard as the storage backend #3276

Implements Hive Input/Output format to use vineyard as the storage backend

Implements Hive Input/Output format to use vineyard as the storage backend #3276

Workflow file for this run

# Copyright 2020-2023 Alibaba Group Holding Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Vineyard Docs
on:
push:
branches:
- main
- docs
- dev/docs
pull_request:
branches:
- main
- docs
- dev/docs
concurrency:
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
env:
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
jobs:
docs:
runs-on: ${{ matrix.os }}
if: ${{ github.repository == 'v6d-io/v6d' }}
strategy:
matrix:
os: [ubuntu-20.04]
permissions:
issues: write
pull-requests: write
contents: write
steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
submodules: true
- name: Generate Summary for Submodules
run: |
git submodule > git-modules.txt
cat git-modules.txt
- name: Cache for cccahe
uses: actions/cache@v3
with:
path: ~/.ccache
key: ${{ matrix.os }}-docs-cache-${{ hashFiles('**/git-modules.txt') }}
restore-keys: |
${{ matrix.os }}-docs-cache-
- name: Install Dependencies for Linux
if: runner.os == 'Linux'
run: |
sudo apt update -y
sudo apt install -y ca-certificates \
ccache \
cmake \
doxygen \
libboost-all-dev \
libcurl4-openssl-dev \
libgflags-dev \
libgoogle-glog-dev \
libgmock-dev \
libgrpc-dev \
libgrpc++-dev \
libkrb5-dev \
libmpich-dev \
libprotobuf-dev \
librdkafka-dev \
libgsasl7-dev \
librdkafka-dev \
libssl-dev \
libunwind-dev \
libxml2-dev \
libz-dev \
lsb-release \
pandoc \
protobuf-compiler-grpc \
python3-pip \
uuid-dev \
wget
# install apache-arrow
wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt update
sudo apt install -y libarrow-dev=3.0.0-1
# install latest ccache
wget https://github.com/ccache/ccache/releases/download/v4.7.4/ccache-4.7.4-linux-x86_64.tar.xz
tar -xf ccache-4.7.4-linux-x86_64.tar.xz
sudo mv ccache-4.7.4-linux-x86_64/ccache /usr/bin/ccache
# avoid possible permission errors
ccache -o cache_dir=~/.ccache
sudo mkdir -p ~/.ccache
sudo chmod -R a+wrx ~/.ccache
# install python packages for codegen, and io adaptors
sudo pip3 install -U "Pygments>=2.4.1"
sudo pip3 install -r requirements-setup.txt -r requirements.txt -r requirements-dev.txt
# linters
sudo pip3 install black isort flake8
- name: CMake
run: |
export PATH=/usr/lib/ccache:$PATH
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_VINEYARD_COVERAGE=ON \
-DBUILD_VINEYARD_PYTHON_BINDINGS=ON \
-DBUILD_VINEYARD_BASIC=ON \
-DBUILD_VINEYARD_GRAPH=ON \
-DBUILD_VINEYARD_IO=ON \
-DBUILD_VINEYARD_IO_KAFKA=ON \
-DBUILD_VINEYARD_HOSSEINMOEIN_DATAFRAME=ON \
-DBUILD_VINEYARD_TESTS=ON
- name: Code generation
run: |
pushd build
make vineyard_basic_gen -j
make vineyard_client_python -j
- name: Generate Doc
run: |
cd build
make vineyard_doc
- name: Preview using netlify
uses: netlify/actions/cli@master
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'v6d-io/v6d' }}
with:
args: deploy deploy --dir=docs/_build/html --alias deploy-preview-pr-${{ github.event.number }}
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
- name: Leave the comment on pull request
uses: actions-cool/maintain-one-comment@v3
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'v6d-io/v6d' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: |
🎊 PR Preview ${{ github.event.pull_request.head.sha }} has been successfully built and deployed to https://deploy-preview-pr-${{ github.event.number }}--v6d.netlify.app
<sub>🤖 By [netlify](https://www.netlify.com/)</sub>
body-include: '<!-- Created by actions-cool/maintain-one-comment -->'
- name: Leave the comment on pull request when failed
uses: actions-cool/maintain-one-comment@v3
if: ${{ failure() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'v6d-io/v6d' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: |
😭 Deploy PR Preview ${{ github.event.pull_request.head.sha }} failed. [Build logs](https://github.com/v6d-io/v6d/runs/${{ github.run_id }})
<sub>🤖 By [netlify](https://www.netlify.com/)</sub>
body-include: '<!-- Created by actions-cool/maintain-one-comment -->'
- name: Commit Doc
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'v6d-io/v6d' }}
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git branch -D gh-pages || true
git checkout --orphan gh-pages
shopt -s extglob
rm -rf !(docs)
rm -rf .github .clang-format .gitattributes .gitmodules .gitignore
mv docs/_build/html/* ./
mv docs/_build/html/.nojekyll ./
rm -rf docs
git add -A
git commit -m "Generate latest docs on CI, from commit ${{ github.sha }}."
git push -f origin gh-pages