Merge branch 'master' into nrf52_pulsein

This commit is contained in:
hathach 2019-01-10 10:54:40 +07:00
commit ee410b2cf1
4 changed files with 47 additions and 32 deletions

View File

@ -77,7 +77,7 @@ before_script:
- sudo apt-get install -y python3-pip - sudo apt-get install -y python3-pip
- pip3 install --user sh click - pip3 install --user sh click
- ([[ -z "$TRAVIS_TESTS" ]] || sudo pip install --upgrade cpp-coveralls) - ([[ -z "$TRAVIS_TESTS" ]] || sudo pip install --upgrade cpp-coveralls)
- (! var_search "${TRAVIS_TESTS-}" docs || pip install --user 'Sphinx<1.8.0' sphinx-rtd-theme recommonmark) - (! var_search "${TRAVIS_TESTS-}" docs || pip install --user Sphinx sphinx-rtd-theme recommonmark)
- (! var_search "${TRAVIS_TESTS-}" translations || pip3 install --user polib) - (! var_search "${TRAVIS_TESTS-}" translations || pip3 install --user polib)
# report some good version numbers to the build # report some good version numbers to the build
@ -88,47 +88,47 @@ before_script:
script: script:
# Build mpy-cross first because other builds depend on it. # Build mpy-cross first because other builds depend on it.
- echo 'Building mpy-cross' && echo -en 'travis_fold:start:mpy-cross\\r' - echo 'Building mpy-cross' && echo 'travis_fold:start:mpy-cross'
- make -C mpy-cross -j2 - make -C mpy-cross -j2 ; echo $? > status
- echo -en 'travis_fold:end:mpy-cross\\r' - echo 'travis_fold:end:mpy-cross' && tools/print_status.py status
# Use unbuffered output because building all the releases can take a long time. # Use unbuffered output because building all the releases can take a long time.
# Travis will cancel the job if it sees no output for >10 minutes. # Travis will cancel the job if it sees no output for >10 minutes.
- cd tools && python3 -u build_release_files.py - cd tools && python3 -u build_release_files.py
- cd .. - cd ..
- echo 'Building unix' && echo -en 'travis_fold:start:unix\\r' - echo 'Building unix' && echo 'travis_fold:start:unix'
- (! var_search "${TRAVIS_TESTS-}" unix || (make -C ports/unix deplibs -j2 && make -C ports/unix -j2 && make -C ports/unix coverage -j2)) - (! var_search "${TRAVIS_TESTS-}" unix || (make -C ports/unix deplibs -j2 && make -C ports/unix -j2 && make -C ports/unix coverage -j2)) ; echo $? > status
- echo -en 'travis_fold:end:unix\\r' - echo 'travis_fold:end:unix' && tools/print_status.py status
# run tests without coverage info # run tests without coverage info
#- (cd tests && MICROPY_CPYTHON3=python3.4 ./run-tests -j1) #- (cd tests && MICROPY_CPYTHON3=python3.4 ./run-tests -j1)
#- (cd tests && MICROPY_CPYTHON3=python3.4 ./run-tests -j1 --emit native) #- (cd tests && MICROPY_CPYTHON3=python3.4 ./run-tests -j1 --emit native)
# run tests with coverage info # run tests with coverage info
- echo 'Test all' && echo -en 'travis_fold:start:test_all\\r' - echo 'Test all' && echo 'travis_fold:start:test_all'
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1)) - (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1)) ; echo $? > status
- echo -en 'travis_fold:end:test_all\\r' - echo 'travis_fold:end:test_all' && tools/print_status.py status
- echo 'Test threads' && echo -en 'travis_fold:start:test_threads\\r' - echo 'Test threads' && echo 'travis_fold:start:test_threads'
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 -d thread)) - (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 -d thread)) ; echo $? >status
- echo -en 'travis_fold:end:test_threads\\r' - echo 'travis_fold:end:test_threads' && tools/print_status.py status
- echo 'Testing with native' && echo -en 'travis_fold:start:test_native\\r' - echo 'Testing with native' && echo 'travis_fold:start:test_native'
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native)) - (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native)) ; echo $? >status
- echo -en 'travis_fold:end:test_native\\r' - echo 'travis_fold:end:test_native' && tools/print_status.py status
- (echo 'Testing with mpy' && echo -en 'travis_fold:start:test_mpy\\r') - (echo 'Testing with mpy' && echo 'travis_fold:start:test_mpy')
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float)) - (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float)) ; echo $? >status
- echo -en 'travis_fold:end:test_mpy\\r' - echo 'travis_fold:end:test_mpy' && tools/print_status.py status
- (echo 'Building docs' && echo -en 'travis_fold:start:build_docs\\r') - (echo 'Building docs' && echo 'travis_fold:start:build_docs')
- (! var_search "${TRAVIS_TESTS-}" docs || sphinx-build -E -W -b html . _build/html) - (! var_search "${TRAVIS_TESTS-}" docs || sphinx-build -E -W -b html . _build/html) ; echo $? >status
- echo -en 'travis_fold:end:build_docs\\r' - echo 'travis_fold:end:build_docs' && tools/print_status.py status
- (echo 'Building translations' && echo -en 'travis_fold:start:build_translations\\r') - (echo 'Building translations' && echo 'travis_fold:start:build_translations')
- (! var_search "${TRAVIS_TESTS-}" translations || make check-translate) - (! var_search "${TRAVIS_TESTS-}" translations || make check-translate) ; echo $? >status
- echo -en 'travis_fold:end:build_translations\\r' - echo 'travis_fold:end:build_translations' && tools/print_status.py status
# run coveralls coverage analysis (try to, even if some builds/tests failed) # 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) #- (cd ports/unix && coveralls --root ../.. --build-root . --gcov $(which gcov) --gcov-options '\-o build-coverage/' --include py --include extmod)

View File

@ -284,7 +284,7 @@ latex_elements = {
# author, documentclass [howto, manual, or own class]). # author, documentclass [howto, manual, or own class]).
latex_documents = [ latex_documents = [
(master_doc, 'CircuitPython.tex', 'CircuitPython Documentation', (master_doc, 'CircuitPython.tex', 'CircuitPython Documentation',
'Damien P. George, Paul Sokolovsky, and contributors', 'manual'), 'CircuitPython Contributors', 'manual'),
] ]
# The name of an image file (relative to this directory) to place at the top of # The name of an image file (relative to this directory) to place at the top of
@ -314,7 +314,7 @@ latex_documents = [
# (source start file, name, description, authors, manual section). # (source start file, name, description, authors, manual section).
man_pages = [ man_pages = [
('index', 'CircuitPython', 'CircuitPython Documentation', ('index', 'CircuitPython', 'CircuitPython Documentation',
['Damien P. George, Paul Sokolovsky, and contributors'], 1), ['CircuitPython contributors'], 1),
] ]
# If true, show URL addresses after external links. # If true, show URL addresses after external links.
@ -328,7 +328,7 @@ man_pages = [
# dir menu entry, description, category) # dir menu entry, description, category)
texinfo_documents = [ texinfo_documents = [
(master_doc, 'CircuitPython', 'CircuitPython Documentation', (master_doc, 'CircuitPython', 'CircuitPython Documentation',
'Damien P. George, Paul Sokolovsky, and contributors', 'CircuitPython', 'One line description of project.', 'CircuitPython contributors', 'CircuitPython', 'Python for Microcontrollers.',
'Miscellaneous'), 'Miscellaneous'),
] ]

View File

@ -36,10 +36,10 @@ the following links:
> **NOTE**: These board specific readmes may be more up to date than the > **NOTE**: These board specific readmes may be more up to date than the
generic board-neutral documentation further down. generic board-neutral documentation further down.
* Adafruit [Feather nRF52](boards/feather_nrf52832/README.md): 512KB Flash, 64KB SRAM * Adafruit Feather nRF52: boards/feather_nrf52832/README.md: 512KB Flash, 64KB SRAM
* Adafruit [Feather nRF52840](boards/feather_nrf52840_express/README.md): 1MB Flash, 256KB SRAM * Adafruit Feather nRF52840: boards/feather_nrf52840_express/README.md: 1MB Flash, 256KB SRAM
* Nordic PCA10056 see [Feather nRF52840](boards/pca10056/README.md) * Nordic PCA10056 (uses nRF52840): boards/pca10056/README.md
* MakerDiary NRF52840 MDK see [its README](boards/makerdiary_nrf52840_mdk/README.md) * MakerDiary NRF52840 MDK: boards/makerdiary_nrf52840_mdk/README.md
For all other board targets, see the generic notes below. For all other board targets, see the generic notes below.

15
tools/print_status.py Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
import sys
if len(sys.argv) != 2:
print("""\
Usage: print_status.py STATUS_FILENAME
STATUS_FILENAME contains one line with an integer status."""
)
sys.exit(1)
with open(sys.argv[1], 'r') as status_in:
status = int(status_in.readline())
print('{} with status {}'.format(
"\033[32msucceeded\033[0m" if status == 0 else "\033[31mfailed\033[0m",
status))