Merge pull request #18 from KMKfw/topic-circle-builds

CircleCI: Ensure all boards can at least compile a hex on each commit
This commit is contained in:
Josh Klar 2018-09-17 16:00:56 -07:00 committed by GitHub
commit 3de95fc330
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 124 additions and 13 deletions

View File

@ -12,17 +12,73 @@ jobs:
- checkout
- restore_cache:
keys:
- v1-kmk-lint-{{ checksum "Pipfile.lock" }}
- v1-kmk-venv-{{ checksum "Pipfile.lock" }}
- run: pip install pipenv==2018.7.1
- run: pipenv install --dev
- run: pipenv run flake8
- run: make lint
- save_cache:
key: v1-kmk-lint-{{ checksum "Pipfile.lock" }}
key: v1-kmk-venv-{{ checksum "Pipfile.lock" }}
paths:
- .venv
build_pyboard:
docker:
- image: 'python:3.7'
environment:
KMK_TEST: 1
PIPENV_VENV_IN_PROJECT: 1
steps:
- checkout
- restore_cache:
keys:
- v1-kmk-venv-{{ checksum "Pipfile.lock" }}
- run: pip install pipenv==2018.7.1
- run: apt-get update && apt-get install -y gcc-arm-none-eabi gettext wget unzip
- run: make BOARD=boards/noop.py build-pyboard
build_feather_nrf52832:
docker:
- image: 'python:3.7'
environment:
KMK_TEST: 1
PIPENV_VENV_IN_PROJECT: 1
steps:
- checkout
- restore_cache:
keys:
- v1-kmk-venv-{{ checksum "Pipfile.lock" }}
- run: pip install pipenv==2018.7.1
- run: apt-get update && apt-get install -y gcc-arm-none-eabi gettext wget unzip
- run: make BOARD=boards/noop.py build-feather-nrf52832
build_teensy_31:
docker:
- image: 'python:3.7'
environment:
KMK_TEST: 1
PIPENV_VENV_IN_PROJECT: 1
steps:
- checkout
- restore_cache:
keys:
- v1-kmk-venv-{{ checksum "Pipfile.lock" }}
- run: pip install pipenv==2018.7.1
- run: apt-get update && apt-get install -y gcc-arm-none-eabi gettext wget unzip
- run: make BOARD=boards/noop.py build-teensy-3.1
workflows:
version: 2
build-deploy:
@ -33,3 +89,27 @@ workflows:
only: /.*/
tags:
only: /.*/
- build_pyboard:
filters:
branches:
only: /.*/
tags:
only: /.*/
requires:
- lint
- build_feather_nrf52832:
filters:
branches:
only: /.*/
tags:
only: /.*/
requires:
- lint
- build_teensy_31:
filters:
branches:
only: /.*/
tags:
only: /.*/
requires:
- lint

3
.gitmodules vendored
View File

@ -1,14 +1,11 @@
[submodule "circuitpython"]
path = vendor/circuitpython
url = https://github.com/adafruit/circuitpython.git
branch = "9b98ad779468676c3d5f1efdc06b454aaed7c407"
ignore = dirty
[submodule "upy-lib"]
path = vendor/upy-lib
url = https://github.com/micropython/micropython-lib.git
branch = "f20d89c6aad9443a696561ca2a01f7ef0c8fb302"
[submodule "micropython"]
path = vendor/micropython
url = https://github.com/micropython/micropython.git
branch = "3cd2c281d7cf990b3afb78287a58cf4ee3f23ca5"
ignore = dirty

View File

@ -32,7 +32,7 @@ lint: devdeps
.micropython-deps: .submodules
@echo "===> Building micropython/mpy-cross"
@make -C vendor/micropython/mpy-cross
@touch .circuitpy-deps
@touch .micropython-deps
circuitpy-deps: .circuitpy-deps
@ -77,15 +77,25 @@ micropython-freeze-kmk-stm32: freeze-stm32-vendor-deps
@rm -rf vendor/micropython/ports/stm32/freeze/kmk*
@cp -av kmk vendor/micropython/ports/stm32/freeze/
circuitpy-flash-nrf:
@echo "===> Building and flashing CircuitPython with KMK and your keymap"
@make -C vendor/circuitpython/ports/nrf BOARD=feather_nrf52832 SERIAL=${AMPY_PORT} SD=s132 FROZEN_MPY_DIR=freeze clean dfu-gen dfu-flash
circuitpy-build-nrf:
@echo "===> Building CircuitPython"
@make -C vendor/circuitpython/ports/nrf BOARD=feather_nrf52832 SERIAL=${AMPY_PORT} SD=s132 FROZEN_MPY_DIR=freeze clean all
micropython-flash-teensy3.1:
circuitpy-flash-nrf: circuitpy-build-nrf
@echo "===> Flashing CircuitPython with KMK and your keymap"
@make -C vendor/circuitpython/ports/nrf BOARD=feather_nrf52832 SERIAL=${AMPY_PORT} SD=s132 FROZEN_MPY_DIR=freeze dfu-gen dfu-flash
micropython-build-teensy3.1:
@cp entrypoints/teensy31.py vendor/micropython/ports/teensy/memzip_files/main.py
@make -C vendor/micropython/ports/teensy/ BOARD=TEENSY_3.1 all
micropython-flash-teensy3.1: micropython-build-teensy3.1
@make -C vendor/micropython/ports/teensy/ BOARD=TEENSY_3.1 deploy
micropython-flash-pyboard:
micropython-build-pyboard:
@make -j4 -C vendor/micropython/ports/stm32/ BOARD=PYBV11 FROZEN_MPY_DIR=freeze all
micropython-flash-pyboard: micropython-build-pyboard
@make -j4 -C vendor/micropython/ports/stm32/ BOARD=PYBV11 FROZEN_MPY_DIR=freeze deploy
micropython-flash-pyboard-entrypoint:
@ -107,8 +117,16 @@ circuitpy-flash-nrf-entrypoint:
ifndef BOARD
build-feather-nrf52832:
@echo "===> Must provide a board (usually from boards/...) to build!"
flash-feather-nrf52832:
@echo "===> Must provide a board (usually from boards/...) to build!"
else
build-feather-nrf52832: lint devdeps circuitpy-deps circuitpy-freeze-kmk-nrf
@echo "===> Preparing keyboard script for bundling into CircuitPython"
@cp -av ${BOARD} vendor/circuitpython/ports/nrf/freeze/kmk_keyboard_user.py
@$(MAKE) circuitpy-build-nrf
flash-feather-nrf52832: lint devdeps circuitpy-deps circuitpy-freeze-kmk-nrf
@echo "===> Preparing keyboard script for bundling into CircuitPython"
@cp -av ${BOARD} vendor/circuitpython/ports/nrf/freeze/kmk_keyboard_user.py
@$(MAKE) circuitpy-flash-nrf circuitpy-flash-nrf-entrypoint
@ -117,8 +135,16 @@ endif
ifndef BOARD
build-teensy-3.1:
@echo "===> Must provide a board (usually from boards/...) to build!"
flash-teensy-3.1:
@echo "===> Must provide a board (usually from boards/...) to build!"
else
build-teensy-3.1: lint devdeps micropython-deps micropython-freeze-kmk-teensy3.1
@echo "===> Preparing keyboard script for bundling into MicroPython"
@cp -av ${BOARD} vendor/micropython/ports/teensy/freeze/kmk_keyboard_user.py
@$(MAKE) ARDUINO=${ARDUINO} micropython-build-teensy3.1
flash-teensy-3.1: lint devdeps micropython-deps micropython-freeze-kmk-teensy3.1
@echo "===> Preparing keyboard script for bundling into MicroPython"
@cp -av ${BOARD} vendor/micropython/ports/teensy/freeze/kmk_keyboard_user.py
@$(MAKE) ARDUINO=${ARDUINO} micropython-flash-teensy3.1
@ -127,8 +153,16 @@ endif
ifndef BOARD
build-pyboard:
@echo "===> Must provide a board (usually from boards/...) to build!"
flash-pyboard:
@echo "===> Must provide a board (usually from boards/...) to build!"
else
build-pyboard: lint devdeps micropython-deps micropython-freeze-kmk-stm32
@echo "===> Preparing keyboard script for bundling into MicroPython"
@cp -av ${BOARD} vendor/micropython/ports/stm32/freeze/kmk_keyboard_user.py
@$(MAKE) AMPY_PORT=/dev/ttyACM0 AMPY_BAUD=115200 micropython-build-pyboard
flash-pyboard: lint devdeps micropython-deps micropython-freeze-kmk-stm32
@echo "===> Preparing keyboard script for bundling into MicroPython"
@cp -av ${BOARD} vendor/micropython/ports/stm32/freeze/kmk_keyboard_user.py
@$(MAKE) AMPY_PORT=/dev/ttyACM0 AMPY_BAUD=115200 micropython-flash-pyboard micropython-flash-pyboard-entrypoint