Skip to content

[Feat][C++] Support building GraphAr with system installed arrow #717

[Feat][C++] Support building GraphAr with system installed arrow

[Feat][C++] Support building GraphAr with system installed arrow #717

Workflow file for this run

# Copyright 2022 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: GraphAr Docs
on:
push:
branches:
- main
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
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
steps:
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Checkout Code
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
submodules: true
fetch-depth: 0
- name: Leave the comment on pull request when started
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'alibaba/GraphAr' }}
uses: actions-cool/maintain-one-comment@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: |
⚡️ Deploying PR Preview ${{ github.event.pull_request.head.sha }} to [surge.sh](https://alibaba-graphar-build-pr-${{ github.event.number }}.surge.sh) ... [Build logs](https://github.com/alibaba/GraphAr/runs/${{ github.run_id }})
<a href="https://github.com/alibaba/GraphAr/actions/runs/${{ github.run_id }}">
<img width="300" src="https://user-images.githubusercontent.com/507615/90240294-8d2abd00-de5b-11ea-8140-4840a0b2d571.gif">
</a>
<sub>🤖 By [surge-preview](https://surge.sh/)</sub>
body-include: '<!-- Sticky Pull Request Comment: Surge Preview build -->'
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y ca-certificates cmake doxygen python3-pip
sudo pip3 install -r docs/requirements.txt
- name: Generate Doc
run: |
pushd docs
make html
popd
- name: Preview using surge
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'alibaba/GraphAr' }}
run: |
npm install -g surge
surge ./docs/_build/html \
alibaba-graphar-build-pr-${{ github.event.number }}.surge.sh \
--token ${{ secrets.SURGE_TOKEN }}
- name: Leave the comment on pull request when succeed
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'alibaba/GraphAr' }}
uses: actions-cool/maintain-one-comment@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: |
🎊 PR Preview ${{ github.event.pull_request.head.sha }} has been successfully built and deployed to https://alibaba-graphar-build-pr-${{ github.event.number }}.surge.sh
<a href="https://github.com/alibaba/GraphAr/actions/runs/${{ github.run_id }}">
<img width="300" src="https://user-images.githubusercontent.com/507615/90250366-88233900-de6e-11ea-95a5-84f0762ffd39.png">
</a>
<sub>🤖 By [surge-preview](https://surge.sh/)</sub>
body-include: '<!-- Sticky Pull Request Comment: Surge Preview build -->'
- name: Leave the comment on pull request when failed
if: ${{ failure() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'alibaba/GraphAr' }}
uses: actions-cool/maintain-one-comment@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: |
😭 Deploy PR Preview ${{ github.event.pull_request.head.sha }} failed. [Build logs](https://github.com/alibaba/GraphAr/runs/${{ github.run_id }})
<a href="https://github.com/alibaba/GraphAr/actions/runs/${{ github.run_id }}">
<img width="300" src="https://user-images.githubusercontent.com/507615/90250824-4e066700-de6f-11ea-8230-600ecc3d6a6b.png">
</a>
<sub>🤖 By [surge-preview](https://surge.sh/)</sub>
body-include: '<!-- Sticky Pull Request Comment: Surge Preview build -->'
- name: Commit Doc
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository == 'alibaba/GraphAr' }}
run: |
git config user.email [email protected]
git config user.name github-actions
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