wip: Add a `docker_simulator_tests` target

This will build a Docker image with all dependencies installed, then run the
simulator tests within it, using the current bundle as a volume.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/851/head
Gergely Nagy 4 years ago
parent e2d8b5a614
commit 3bdb987dcf
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -575,6 +575,13 @@ run_simulator_tests() {
${MAKE:-make}
}
docker_simulator_tests() {
docker build -t kaleidoscope/simulator test
docker run --rm -it \
-v ${BOARD_HARDWARE_PATH}/keyboardio:/kaleidoscope/hardware/keyboardio \
kaleidoscope/simulator
}
usage () {
cat <<- EOF
Usage: $0 SKETCH commands...

@ -0,0 +1,20 @@
FROM debian:stable-slim
LABEL maintainer="Gergely Nagy"
RUN apt-get -qq update
RUN apt-get -qq install -y xz-utils curl git-core make build-essential libxtst-dev
ENV ARDUINO_VERSION "1.8.13"
WORKDIR /usr/local
RUN curl https://downloads.arduino.cc/arduino-${ARDUINO_VERSION}-linux64.tar.xz | \
xzcat | tar xf - && \
ln -s arduino-${ARDUINO_VERSION} arduino
RUN curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | \
sh
RUN /usr/local/bin/arduino-cli core install arduino:avr
VOLUME ["/kaleidoscope/hardware/keyboardio"]
ENV BOARD_HARDWARE_PATH "/kaleidoscope/hardware"
WORKDIR /kaleidoscope/hardware/keyboardio/avr/libraries/Kaleidoscope
ENTRYPOINT ["make", "run-simulator-tests"]
Loading…
Cancel
Save