Skip to content

Commit

Permalink
Strictly check for errors
Browse files Browse the repository at this point in the history
Sphinx-build options `-n -W` make error checking strict and
fail-fast. Fix an error in code block in allocators.md.

Introduct ci.mk for commands used in CI.
  • Loading branch information
NickVolynkin committed Jul 26, 2022
1 parent 1e6633e commit 2cc1db9
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deloy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ jobs:
steps:
- uses: actions/checkout@v2

- run: sphinx-build -b json source -d build/.doctrees build/json
- run: make -f ci.mk json
- run: bash upload_output.sh
2 changes: 1 addition & 1 deletion .github/workflows/deploy-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
env: ${{env.BRANCH_NAME}}
ref: ${{github.head_ref}}

- run: sphinx-build -b json source -d build/.doctrees build/json
- run: make -f ci.mk json
- run: bash upload_output.sh

- name: update deployment status
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXOPTS = -n -W
SPHINXBUILD = sphinx-build
AUTOBUILD = sphinx-autobuild
SOURCEDIR = source
Expand All @@ -11,7 +11,11 @@ current_dir = $(shell pwd)

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
docker run --rm -it -v $(current_dir):/doc tarantool/doc-builder:slim-4.2 sh -c \
"$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)"

bash:
docker run --rm -it -v $(current_dir):/doc tarantool/doc-builder:slim-4.2 bash

autobuild:
docker run --rm -it -p 8000:8000 -v $(current_dir):/doc tarantool/doc-builder:slim-4.2 sh -c \
Expand Down
27 changes: 27 additions & 0 deletions ci.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS = -n -W
SPHINXBUILD = sphinx-build
SOURCEDIR = source
BUILDDIR = build
current_dir = $(shell pwd)



clean:
rm -rf build

html:
sphinx-build -M html \
source \
build \
$(SPHINXOPTS)

json:
sphinx-build -M json \
-d build/doctrees \
source \
build/json \
$(SPHINXOPTS)
2 changes: 1 addition & 1 deletion source/allocators.md
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,7 @@ matras_alloc(struct matras *m, matras_id_t *result_id)
matras_free_extent(m, extent1);
return 0;
}
extent1[n1] = (void *)extent2;```
extent1[n1] = (void *)extent2;
}
if (extent3_available) {
Expand Down

0 comments on commit 2cc1db9

Please sign in to comment.