File tree Expand file tree Collapse file tree 3 files changed +49
-0
lines changed
Expand file tree Collapse file tree 3 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 77 @echo - make docs ------- Make docs
88 @echo - make lint ------- Run lint
99 @echo - make test ------- Run test
10+ @echo - make test-32bit - Run test on 32bit architecture
1011 @echo - make typecheck -- Typecheck
1112 @echo - make venv ------- Create virtual environment
1213
3233test :
3334 pytest
3435
36+ test-32bit :
37+ @make -C docker/i386 test
38+
3539typecheck :
3640 mypy --strict --no-warn-unused-ignores cstruct
3741
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