Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,30 @@ compiler:
git:
depth: 1
env:
- TRAVIS_TEST=unix
- TRAVIS_TEST=docs
- TRAVIS_TEST=translations
- TRAVIS_BOARD=feather_huzzah
- TRAVIS_BOARD=arduino_zero
- TRAVIS_BOARD=circuitplayground_express
- TRAVIS_BOARD=pca10056
- TRAVIS_BOARD=trinket_m0
- TRAVIS_BOARD=feather_m4_express
- TRAVIS_BOARD=arduino_zero
- TRAVIS_BOARD=circuitplayground_express_crickit
- TRAVIS_BOARD=feather_m0_basic
- TRAVIS_BOARD=feather_m0_adalogger
- TRAVIS_BOARD=feather_m0_rfm69
- TRAVIS_BOARD=feather_m0_rfm9x
- TRAVIS_BOARD=feather_m0_express
- TRAVIS_BOARD=feather_m0_express_crickit
- TRAVIS_BOARD=feather_m4_express
- TRAVIS_BOARD=itsybitsy_m0_express
- TRAVIS_BOARD=itsybitsy_m4_express
- TRAVIS_BOARD=metro_m0_express
- TRAVIS_BOARD=metro_m4_express
- TRAVIS_BOARD=pirkey_m0
- TRAVIS_BOARD=trinket_m0
- TRAVIS_BOARD=gemma_m0
- TRAVIS_BOARD=hallowing_m0_express
- TRAVIS_BOARD=feather52832
- TRAVIS_BOARD=pca10056
- TRAVIS_TEST=unix
- TRAVIS_TEST=docs

addons:
artifacts:
Expand Down Expand Up @@ -56,8 +57,10 @@ before_script:
# For huzzah builds
- if [[ $TRAVIS_BOARD = "feather_huzzah" ]]; then wget https://github.com/jepler/esp-open-sdk/releases/download/2018-06-10/xtensa-lx106-elf-standalone.tar.gz && tar xavf xtensa-lx106-elf-standalone.tar.gz; PATH=$(readlink -f xtensa-lx106-elf/bin):$PATH; fi
# For coverage testing (upgrade is used to get latest urllib3 version)
- ([[ -z "$TRAVIS_TEST" ]] || sudo apt-get install -y python3-pip)
- ([[ -z "$TRAVIS_TEST" ]] || sudo pip install --upgrade cpp-coveralls)
- ([[ $TRAVIS_TEST != "docs" ]] || sudo pip install Sphinx sphinx-rtd-theme recommonmark)
- ([[ $TRAVIS_TEST != "translations" ]] || sudo pip3 install polib)
- gcc --version
- ([[ -z "$TRAVIS_BOARD" ]] || arm-none-eabi-gcc --version)
- python3 --version
Expand Down Expand Up @@ -103,6 +106,9 @@ script:
- ([[ $TRAVIS_TEST != "docs" ]] || sphinx-build -E -W -b html . _build/html)
- echo -en 'travis_fold:end:build_docs\\r'

- (echo 'Building translations' && echo -en 'travis_fold:start:build_translations\\r')
- ([[ $TRAVIS_TEST != "translations" ]] || make check-translate)
- echo -en 'travis_fold:end:build_translations\\r'

# run coveralls coverage analysis (try to, even if some builds/tests failed)
#- (cd ports/unix && coveralls --root ../.. --build-root . --gcov $(which gcov) --gcov-options '\-o build-coverage/' --include py --include extmod)
Expand Down
19 changes: 15 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ CONFDIR = .
FORCE = -E
VERBOSE = -v

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the
# full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the
# executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
Expand Down Expand Up @@ -190,3 +189,15 @@ pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."

# phony target so we always run
all-source:

locale/circuitpython.pot: all-source
find . -iname "*.c" | xargs xgettext -L C --keyword=translate -o circuitpython.pot -p locale

translate: locale/circuitpython.pot
for po in $(shell ls locale/*.po); do msgmerge -U $$po locale/circuitpython.pot; done

check-translate: locale/circuitpython.pot $(wildcard locale/*.po)
$(PYTHON) tools/check_translations.py $^
Loading