-
Notifications
You must be signed in to change notification settings - Fork 4k
/
config.yml
74 lines (65 loc) · 2.15 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
version: 2.1
jobs:
build_doc_r:
machine:
image: ubuntu-2004:202111-01
steps:
- checkout
- run:
name: Build documentation
working_directory: docs
command: |
./build-rdoc.sh
- run:
name: Check diff
command: |
set +e
git add .
PATCH_FILE="<< pipeline.git.revision >>.patch"
git --no-pager diff --cached --exit-code > $PATCH_FILE
failed=$?
if [[ "$failed" == "1" ]]; then
cat $PATCH_FILE
MLFLOW_REPO_ID=$(curl -s -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/mlflow/mlflow | jq '.id')
PATCH_FILE_URL="https://${CIRCLE_BUILD_NUM}-${MLFLOW_REPO_ID}-gh.circle-artifacts.com/0/${PATCH_FILE}"
echo "========== Run the following commands to apply the diff above =========="
echo "PATCH_FILE_URL=\"$PATCH_FILE_URL\""
echo 'REDIRECTED_URL=$(curl -Ls -o /dev/null -w %{url_effective} $PATCH_FILE_URL)'
echo 'curl -s $REDIRECTED_URL | git apply --verbose'
echo "========================================================================"
fi
exit $failed
- store_artifacts:
path: << pipeline.git.revision >>.patch
build_doc:
docker:
- image: circleci/python:3.6
steps:
- checkout
- run:
name: Install Java
command: |
sudo apt-get update --yes
sudo apt-get install default-jdk --yes
sudo apt-get install maven --yes
java -version
- run:
name: Install Python dependencies
command: |
pip --version
pip install --progress-bar off -r requirements/doc-requirements.txt .
- run:
name: Build documentation
working_directory: docs
environment:
JAVA_HOME: /usr/lib/jvm/default-java
command: |
make rsthtml
make javadocs
- store_artifacts:
path: docs/build/html
workflows:
build:
jobs:
- build_doc
- build_doc_r