File tree 3 files changed +49
-0
lines changed
3 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 7
7
@echo - make docs ------- Make docs
8
8
@echo - make lint ------- Run lint
9
9
@echo - make test ------- Run test
10
+ @echo - make test-32bit - Run test on 32bit architecture
10
11
@echo - make typecheck -- Typecheck
11
12
@echo - make venv ------- Create virtual environment
12
13
32
33
test :
33
34
pytest
34
35
36
+ test-32bit :
37
+ @make -C docker/i386 test
38
+
35
39
typecheck :
36
40
mypy --strict --no-warn-unused-ignores cstruct
37
41
Original file line number Diff line number Diff line change
1
+ FROM i386/ubuntu
2
+
3
+ RUN apt-get update && \
4
+ apt-get -y install \
5
+ python3.6 \
6
+ python3.6-dev \
7
+ python3.6-distutils \
8
+ curl \
9
+ make && \
10
+ rm -rf /var/lib/apt/lists/*
11
+ RUN curl -sSL https://bootstrap.pypa.io/pip/3.6/get-pip.py -o get-pip.py && \
12
+ python3.6 get-pip.py
13
+ RUN pip install pytest
14
+ WORKDIR /app
Original file line number Diff line number Diff line change
1
+ PROJECT =cstruct
2
+ BASENAME =test-i386
3
+ IMAGE_NAME =${PROJECT}-${BASENAME}
4
+
5
+ .PHONY : help build push all
6
+
7
+ help :
8
+ @echo " - make build Build docker image"
9
+ @echo " - make test Build and run tests"
10
+ @echo " - make shell Run interactive shell"
11
+
12
+ .DEFAULT_GOAL := help
13
+
14
+ build :
15
+ @DOCKER_BUILDKIT=1 docker build --tag ${IMAGE_NAME} :latest .
16
+
17
+ test : build
18
+ @docker run --rm -it \
19
+ --mount type=bind,source=$$ PWD/../..,target=/app \
20
+ --hostname=$(BASENAME ) \
21
+ ${IMAGE_NAME} \
22
+ pytest
23
+
24
+ shell :
25
+ @docker run --rm -it \
26
+ --mount type=bind,source=$$ PWD/../..,target=/app \
27
+ --hostname=$(BASENAME ) \
28
+ ${IMAGE_NAME} \
29
+ bash -i
30
+
31
+ all : build
You can’t perform that action at this time.
0 commit comments