From 6fa843f03c3e3a75ae6d1027d8d77d02c1ca993d Mon Sep 17 00:00:00 2001 From: sommersoft Date: Wed, 8 May 2019 16:55:55 -0500 Subject: [PATCH 1/4] add '.env/' to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) 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/* From 3c51a8bffffb1df895e2a9c4c810c7ece6e54e0e Mon Sep 17 00:00:00 2001 From: sommersoft Date: Wed, 8 May 2019 16:57:57 -0500 Subject: [PATCH 2/4] include a test matrix for PRs; one for the whole bundle, and one for a single library. --- .travis.yml | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) 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 . From 1079f0b0413127138ca55b059015047117e0121a Mon Sep 17 00:00:00 2001 From: sommersoft Date: Wed, 8 May 2019 17:07:50 -0500 Subject: [PATCH 3/4] README: add local test example, and CoC link. --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 169ab91..3178433 100644 --- a/README.md +++ b/README.md @@ -56,3 +56,20 @@ 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 +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. From 67abd08f717eefd6427a5645c06488c9de8adef1 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Wed, 8 May 2019 17:28:17 -0500 Subject: [PATCH 4/4] missed local testing step: build mpy-cross's --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3178433..5960bea 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ locally like so: 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 ```