Skip to content

Commit

Permalink
Update make/Docker for new directory structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
95-martin-orion committed Feb 20, 2020
1 parent 066c8f3 commit ad95ab8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ qsim:

.PHONY: pybind
pybind:
$(MAKE) -C interfaces/ pybind
$(MAKE) -C pybind_interface/ pybind

.PHONY: cxx-tests
tests:
Expand All @@ -33,10 +33,11 @@ tests:
run-cxx-tests: cxx-tests
$(MAKE) -C tests/ run-all

# TODO: support python tests
PYTESTS = $(shell find interfaces/tests/ -name '*_test.py')

.PHONY: run-py-tests
run-py-tests: pybind
$(MAKE) -C interfaces/ run-tests
for exe in $(PYTESTS); do if ! python3 -m pytest $$exe; then exit 1; fi; done

.PHONY: run-tests
run-tests: $(TESTS)
Expand All @@ -45,4 +46,4 @@ run-tests: $(TESTS)
clean:
-$(MAKE) -C apps/ clean
-$(MAKE) -C tests/ clean
-$(MAKE) -C interfaces/ clean
-$(MAKE) -C pybind_interface/ clean
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ services:
container_name: qsim-py-tests
build:
context: ./
dockerfile: interfaces/Dockerfile
dockerfile: pybind_interface/Dockerfile
depends_on:
- qsim
2 changes: 2 additions & 0 deletions interfaces/Dockerfile → pybind_interface/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ RUN apt-get install -y python3-dev python3-pybind11 python3-pytest python3-pip
RUN pip3 install cirq

# Copy relevant files
COPY ./pybind_interface/ /qsim/pybind_interface/
COPY ./qsimcirq/ /qsim/qsimcirq/
COPY ./interfaces/ /qsim/interfaces/

WORKDIR /qsim/
Expand Down
File renamed without changes.

0 comments on commit ad95ab8

Please sign in to comment.