Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
03fda7b7
Unverified
Commit
03fda7b7
authored
Dec 06, 2021
by
Sylvain Gugger
Committed by
GitHub
Dec 06, 2021
Browse files
Add a job to test the documentation build (#14645)
* Add a job to the documentation build * Add caching * Test cache
parent
e513c16e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
0 deletions
+72
-0
.github/workflows/build_doc_test.yml
.github/workflows/build_doc_test.yml
+62
-0
.github/workflows/build_documentation.yml
.github/workflows/build_documentation.yml
+10
-0
No files found.
.github/workflows/build_doc_test.yml
0 → 100644
View file @
03fda7b7
name
:
Documentation test build
on
:
pull_request
:
paths
:
-
"
src/**"
-
"
docs/**"
-
"
.github/**"
jobs
:
build_and_package
:
runs-on
:
ubuntu-latest
defaults
:
run
:
shell
:
bash -l {0}
steps
:
-
uses
:
actions/checkout@v2
with
:
repository
:
'
huggingface/doc-builder'
token
:
${{ secrets.HUGGINGFACE_PUSH }}
-
name
:
Clone transformers
run
:
|
git clone https://github.com/huggingface/transformers
-
name
:
Loading cache.
uses
:
actions/cache@v2
id
:
cache
with
:
path
:
~/.cache/pip
key
:
v1-test_build_doc
restore-keys
:
|
v1-test_build_doc-${{ hashFiles('setup.py') }}
v1-test_build_doc
-
name
:
Setup environment
run
:
|
sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev
pip install git+https://github.com/huggingface/doc-builder
pip install git+https://github.com/huggingface/transformers#egg=transformers[dev]
export TORCH_VERSION=$(python -c "from torch import version; print(version.__version__.split('+')[0])")
pip install torch-scatter -f https://data.pyg.org/whl/torch-${TORCH_VERSION}+cpu.html
pip install torchvision
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
sudo apt install tesseract-ocr
pip install pytesseract
pip install pytorch-quantization --extra-index-url https://pypi.ngc.nvidia.com
-
name
:
Setup git
run
:
|
git config --global user.name "Hugging Face"
git config --global user.email transformers@huggingface.co
git pull origin main
-
name
:
Make documentation
run
:
|
doc-builder build transformers ./transformers/docs/source
.github/workflows/build_documentation.yml
View file @
03fda7b7
...
@@ -22,6 +22,16 @@ jobs:
...
@@ -22,6 +22,16 @@ jobs:
run
:
|
run
:
|
git clone https://github.com/huggingface/transformers
git clone https://github.com/huggingface/transformers
-
name
:
Loading cache.
uses
:
actions/cache@v2
id
:
cache
with
:
path
:
~/.cache/pip
key
:
v1-test_build_doc
restore-keys
:
|
v1-test_build_doc-${{ hashFiles('setup.py') }}
v1-test_build_doc
-
name
:
Setup environment
-
name
:
Setup environment
run
:
|
run
:
|
sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev
sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment