Skip to content

chore: Improve parallelism in Makefile #18171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 22 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
@@ -75,7 +75,6 @@ PYTHON_SETUP_TARGETS := $(addsuffix -py-setup, $(PYTHON_DIRS))
setup-py: setup-py-toolchain
$(MAKE) $(PYTHON_SETUP_TARGETS)


%-py-setup:
$(MAKE) -C $* setup

@@ -189,19 +188,17 @@ test-e2e:
$(MAKE) -C $(LABWARE_LIBRARY_DIR) test-e2e
$(MAKE) -C $(PROTOCOL_DESIGNER_DIR) test-e2e

.PHONY: test-py-windows
test-py-windows:
$(MAKE) -C $(HARDWARE_DIR) test
$(MAKE) -C $(API_DIR) test
$(MAKE) -C $(SHARED_DATA_DIR) test-py
PYTHON_TEST_TARGETS := $(addsuffix -py-test, $(PYTHON_DIRS))
WINDOWS_PYTHON_TEST_TARGETS := $(addsuffix -py-test, $(HARDWARE_DIR) $(API_DIR) $(SHARED_DATA_DIR)/python)

.PHONY: test-py
test-py: test-py-windows
$(MAKE) -C $(UPDATE_SERVER_DIR) test
$(MAKE) -C $(ROBOT_SERVER_DIR) test
$(MAKE) -C $(SERVER_UTILS_DIR) test
$(MAKE) -C $(G_CODE_TESTING_DIR) test
$(MAKE) -C $(USB_BRIDGE_DIR) test
test-py: $(PYTHON_TEST_TARGETS)

.PHONY: test-py-windows
test-py-windows: $(WINDOWS_PYTHON_TEST_TARGETS)

%-py-test:
$(MAKE) -C $* test

.PHONY: test-js
test-js: test-js-internal
@@ -265,13 +262,20 @@ clean-ts:
yarn tsc --build --clean

# TODO: Ian 2019-12-17 gradually add components and shared-data
JS_CIRCULAR_DEPENDENCIES_ROOTS := \
$(PROTOCOL_DESIGNER_DIR)/src/index.tsx \
$(STEP_GENERATION_DIR)/src/index.ts \
$(LABWARE_LIBRARY_DIR)/src/index.tsx \
$(APP_DIR)/src/index.tsx \
$(COMPONENTS_DIR)/src/index.ts

JS_CIRCULAR_DEPENDENCIES_TARGETS := $(addsuffix -circular-dependencies-js, $(JS_CIRCULAR_DEPENDENCIES_ROOTS))

.PHONY: circular-dependencies-js
circular-dependencies-js:
yarn madge $(and $(CI),--no-spinner --no-color) --circular protocol-designer/src/index.tsx
yarn madge $(and $(CI),--no-spinner --no-color) --circular step-generation/src/index.ts
yarn madge $(and $(CI),--no-spinner --no-color) --circular labware-library/src/index.tsx
yarn madge $(and $(CI),--no-spinner --no-color) --circular app/src/index.tsx
yarn madge $(and $(CI),--no-spinner --no-color) --circular components/src/index.ts
circular-dependencies-js: $(JS_CIRCULAR_DEPENDENCIES_TARGETS)

%-circular-dependencies-js:
yarn madge $(and $(CI),--no-spinner --no-color) --circular $*

.PHONY: test-js-internal
test-js-internal:
Loading
Oops, something went wrong.