Skip to content

Commit

Permalink
[ci] Use Ubuntu Focal image at Travis (#3393)
Browse files Browse the repository at this point in the history
* Use Ubuntu Focal image at Travis

* test gcc

* test Bionic and gcc

* test Focal with another Python version for GPU test

* revert testing changes

* install linkchecker via pip

* simplify linkchecker config
  • Loading branch information
StrikerRUS authored Sep 14, 2020
1 parent dc963d9 commit 164818b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
8 changes: 2 additions & 6 deletions .ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cd $BUILD_DIRECTORY
if [[ $TRAVIS == "true" ]] && [[ $TASK == "check-docs" ]]; then
cd $BUILD_DIRECTORY/docs
conda install -q -y -n $CONDA_ENV -c conda-forge doxygen
pip install --user -r requirements.txt rstcheck
pip install --user -r requirements.txt rstcheck git+git://github.com/linkchecker/linkchecker.git@b9390c9ef63f7e1e210b48bc7fe97f76e8d39501
# check reStructuredText formatting
cd $BUILD_DIRECTORY/python-package
rstcheck --report warning `find . -type f -name "*.rst"` || exit -1
Expand All @@ -26,11 +26,7 @@ if [[ $TRAVIS == "true" ]] && [[ $TASK == "check-docs" ]]; then
make html || exit -1
find ./_build/html/ -type f -name '*.html' -exec \
sed -i'.bak' -e 's;\(\.\/[^.]*\.\)rst\([^[:space:]]*\);\1html\2;g' {} \; # emulate js function
if [[ $OS_NAME == "linux" ]]; then
sudo apt-get update
sudo apt-get install linkchecker
linkchecker --config=.linkcheckerrc ./_build/html/*.html || exit -1
fi
linkchecker --config=.linkcheckerrc ./_build/html/*.html || exit -1
# check the consistency of parameters' descriptions and other stuff
cp $BUILD_DIRECTORY/docs/Parameters.rst $BUILD_DIRECTORY/docs/Parameters-backup.rst
cp $BUILD_DIRECTORY/src/io/config_auto.cpp $BUILD_DIRECTORY/src/io/config_auto-backup.cpp
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ git:
os:
- linux
- osx
dist: bionic
dist: focal
osx_image: xcode12

env:
Expand Down
1 change: 0 additions & 1 deletion docs/.linkcheckerrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ sslverify=0
[filtering]
ignore=
pythonapi/lightgbm\..*\.html.*
http://sphinx-doc.org
ignorewarnings=http-robots-denied,https-certificate-error
checkextern=1

Expand Down

0 comments on commit 164818b

Please sign in to comment.