Make it easier to have a common environment for running the tests. Start
off with Debian bullseye, which neatly provides Clang 11 with Python 3
bindings.
This could be expanded to test other Clang versions and (with different
requirements.txt files) Sphinx versions, but start simple.
---
Dockerfile | 17 +++++++++++++++++
Makefile.local | 3 +++
2 files changed, 20 insertions(+)
create mode 100644 Dockerfile
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 000000000000..ac1816d674e0
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,17 @@
+FROM debian:bullseye
+
+RUN apt-get update
+RUN apt-get install -y \
+ python3-clang \
+ python3-pip
+RUN apt-get clean
+
+WORKDIR /code
+
+COPY requirements.txt .
+
+RUN pip3 install -r requirements.txt
+
+COPY . .
+
+RUN make test
diff --git a/Makefile.local b/Makefile.local
index 02cf2d7e8a7b..edfc2e4416ec 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -27,6 +27,9 @@ test-upload:
upload:
python3 -m twine upload dist/*
+test-docker:
+ docker build .
+
.PHONY: dist-tools dist test-upload upload
CLEAN := $(CLEAN) build dist hawkmoth.egg-info
--
2.20.1