Skip to content

Commit 62f3b88

Browse files
Eric Zhangfacebook-github-bot
authored andcommitted
Add github gpu ci tests
Summary: Pull Request resolved: #5292 Add github gpu tests from circleci Reviewed By: wat3rBro Differential Revision: D57582764 fbshipit-source-id: 02c2bb5e5a6435a95b7683603040f33a8dc02526
1 parent e886920 commit 62f3b88

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.github/actions/uninstall_tests/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ runs:
99
# Remove built binaries
1010
rm -rf build/ detectron2/*.so
1111
# Tests that code is importable without installation
12-
PYTHONPATH=. ./.circleci/import-tests.sh
12+
. ./.github/import-tests.sh

.github/import-tests.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash -e
2+
# Copyright (c) Facebook, Inc. and its affiliates.
3+
4+
# Test that import works without building detectron2.
5+
6+
# Check that _C is not importable
7+
python -c "from detectron2 import _C" > /dev/null 2>&1 && {
8+
echo "This test should be run without building detectron2."
9+
exit 1
10+
}
11+
12+
# Check that other modules are still importable, even when _C is not importable
13+
python -c "from detectron2 import modeling"
14+
python -c "from detectron2 import modeling, data"
15+
python -c "from detectron2 import evaluation, export, checkpoint"
16+
python -c "from detectron2 import utils, engine"

0 commit comments

Comments
 (0)