diff --git a/.gitignore b/.gitignore index d6a2a25..2096062 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ dist circuitpython_build_tools/data/ .eggs version.py +.env/* diff --git a/.travis.yml b/.travis.yml index 2b30e97..902d466 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,11 @@ -sudo: false -dist: trusty +dist: xenial language: python python: - '3.6' -script: -- python3 -m circuitpython_build_tools.scripts.build_mpy_cross circuitpython_build_tools/data/ +before_deploy: + script: + - python3 -u -m circuitpython_build_tools.scripts.build_mpy_cross circuitpython_build_tools/data/ deploy: provider: pypi @@ -15,3 +15,31 @@ deploy: skip_cleanup: true on: tags: true + +matrix: + include: + - python: "3.6" + name: "Test CircuitPython Bundle" + if: type = pull_request + script: + - echo "Building mpy-cross" && echo "travis_fold:start:mpy-cross" + - python3 -u -m circuitpython_build_tools.scripts.build_mpy_cross circuitpython_build_tools/data/ + - echo "travis_fold:end:mpy-cross" + - pip install -e . + - echo "Cloning Adafruit_CircuitPython_Bundle" && echo "travis_fold:start:clone" + - git clone --recurse-submodules https://github.com/adafruit/Adafruit_CircuitPython_Bundle.git + - echo "travis_fold:end:clone" + - cd Adafruit_CircuitPython_Bundle + - circuitpython-build-bundles --filename_prefix test-bundle --library_location libraries --library_depth 2 + + - python: "3.6" + name: "Test Single Library Bundle" + if: type = pull_request + script: + - echo "Building mpy-cross" && echo "travis_fold:start:mpy-cross" + - python3 -u -m circuitpython_build_tools.scripts.build_mpy_cross circuitpython_build_tools/data/ + - echo "travis_fold:end:mpy-cross" + - pip install -e . + - git clone https://github.com/adafruit/Adafruit_CircuitPython_FeatherWing.git + - cd Adafruit_CircuitPython_FeatherWing + - circuitpython-build-bundles --filename_prefix test-single --library_location . diff --git a/README.md b/README.md index 169ab91..5960bea 100644 --- a/README.md +++ b/README.md @@ -56,3 +56,21 @@ source .env/bin/activate pip install circuitpython-build-tools circuitpython-build-bundles --filename_prefix --library_location . ``` + +When making changes to `circuitpython-build-tools` itself, you can test your changes +locally like so: + +```shell +cd circuitpython-build-tools # this will be specific to your storage location +python3 -m venv .env +source .env/bin/activate +python3 -u -m circuitpython_build_tools.scripts.build_mpy_cross circuitpython_build_tools/data/ +pip install -e . # '-e' is pip's "development" install feature +circuitpython-build-bundles --filename_prefix --library_location +``` + +## Contributing + +Contributions are welcome! Please read our [Code of Conduct] +(https://github.com/adafruit/Adafruit_CircuitPython_adabot/blob/master/CODE_OF_CONDUCT.md) +before contributing to help this project stay welcoming.