This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Move link check from jenkins to github action (#20526)
- Loading branch information
Showing
2 changed files
with
77 additions
and
1 deletion.
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,70 @@ | ||
name: link check | ||
|
||
on: [push, pull_request] | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
linkcheck: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Compilation cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.ccache | ||
# We include the commit sha in the cache key, as new cache entries are | ||
# only created if there is no existing entry for the key yet. | ||
key: ${{ runner.os }}-ccache-${{ github.sha }} | ||
# Restore any ccache cache entry, if none for | ||
# ${{ runner.os }}-ccache-${{ github.sha }} exists | ||
restore-keys: | | ||
${{ runner.os }}-ccache | ||
- name: Setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.6' | ||
architecture: x64 | ||
|
||
- name: Install Dependencies | ||
run: | | ||
sudo apt-get install -y libopenblas-dev ninja-build ccache python3-sphinx \ | ||
pandoc gcc-7 g++-7 libopencv-dev protobuf-compiler libprotobuf-dev | ||
ccache -M 500M # Limit the ccache size; Github's overall cache limit is 5GB | ||
python -m pip install -r docs/python_docs/requirements | ||
python -m pip install docs/python_docs/themes/mx-theme | ||
shell: bash | ||
|
||
- name: Build project | ||
env: | ||
CC: gcc-7 | ||
CXX: g++-7 | ||
run: | | ||
git submodule update --init --recursive | ||
mkdir build; cd build | ||
CXXFLAGS="-Wno-error=strict-overflow" cmake \ | ||
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \ | ||
-DUSE_ONEDNN=OFF \ | ||
-DUSE_CUDA=OFF \ | ||
-G Ninja .. | ||
ninja | ||
cd .. | ||
shell: bash | ||
|
||
- name: Setup Python | ||
run: | | ||
python -m pip install --user -e python | ||
- name: Link Check | ||
run: | | ||
cd docs/python_docs/python | ||
make clean | ||
make linkcheck EVAL=0 | ||
shell: bash |
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