Skip to content

Commit

Permalink
Move workaround for ~/.dgl into examples Makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisCummins committed Mar 6, 2022
1 parent f9d1941 commit c86523f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
8 changes: 1 addition & 7 deletions .github/actions/install-runtime-dependencies/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,5 @@ runs:
if [ "$(uname)" = "Darwin" ]; then
brew install zlib
fi
shell: bash

# DGL creates ~/.dgl on first run and I have found that this will fail
# if run from pytest / bazel. Suppress errors if DGL is not installed.
- name: Initialize DGL
run: |
python3 -c 'import dgl; print(dgl.__version__)' || true
python -m pip install -U pip wheel
shell: bash
9 changes: 7 additions & 2 deletions examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ install:
uninstall:
$(PYTHON) -m pip uninstall -y compiler_gym_examples

test:
# DGL creates ~/.dgl on first run and I have found that this will fail if tests
# are invoked before this file exists. Suppress errors.
dgl-init:
python3 -c 'import dgl; print(dgl.__version__)' &>/dev/null || true

test: dgl-init
pytest --no-success-flaky-report --benchmark-disable -n auto --durations=5 . --cov=compiler_gym --cov-report=xml:$(COV_REPORT) $(PYTEST_ARGS)
$(MAKE) -C makefile_integration clean
SEARCH_TIME=3 $(MAKE) -C makefile_integration test
Expand All @@ -60,4 +65,4 @@ disclean: clean

purge: distclean uninstall

.PHONY: help install uninstall test clean distclean purge
.PHONY: help install uninstall dgl-init test clean distclean purge

0 comments on commit c86523f

Please sign in to comment.