Get MPY cross compiler into the Docker image

This commit is contained in:
Josh Klar 2019-07-20 15:29:56 -07:00
parent a51d11f6e6
commit ffe3fa3c64
No known key found for this signature in database
GPG Key ID: A4A0C7B4E8EEE222
2 changed files with 20 additions and 6 deletions

View File

@ -1,3 +1,4 @@
---
version: 2
jobs:
test:
@ -5,8 +6,8 @@ jobs:
- image: 'kmkfw/base'
environment:
KMK_TEST: 1
PIPENV_VENV_IN_PROJECT: 1
KMK_TEST: 1
PIPENV_VENV_IN_PROJECT: 1
steps:
- checkout

View File

@ -1,9 +1,22 @@
# vim: ft=dockerfile
# Not using python:3.7 here because team-gcc-arm-embedded/ppa does not support
# Ubuntu Cosmic or Debian Stretch, and Alpine, bizarrely, does not seem to
# package GCC cross compilers
FROM python:3.7-alpine
RUN apk update && apk add alpine-sdk curl wget openssh rsync git git-lfs
RUN mkdir -p /app
WORKDIR /app
RUN apk update && apk add alpine-sdk curl gettext git git-lfs openssh rsync wget
RUN pip install pipenv
### Get a local copy of CircuitPython and its dependencies
# Our absolute baseline is 4.0.0, which (as of writing) shares MPY compat
# with all future versions. Our baseline will need to update as MPY compat
# changes
RUN git clone --branch 4.0.0 --depth 1 https://github.com/adafruit/CircuitPython /opt/circuitpython
RUN git -C /opt/circuitpython submodule update --init
### Build the MPY compiler
RUN make -C /opt/circuitpython/mpy-cross
ENV PATH=/opt/circuitpython/mpy-cross:${PATH}