|
58 | 58 | fi |
59 | 59 | } |
60 | 60 |
|
61 | | -build_ccache_wrappers() { |
62 | | - set -ex |
63 | | - |
64 | | - if [ -z ${CC+x} ]; then |
65 | | - echo "No \$CC set, defaulting to gcc"; |
66 | | - export CC=gcc |
67 | | - fi |
68 | | - if [ -z ${CXX+x} ]; then |
69 | | - echo "No \$CXX set, defaulting to g++"; |
70 | | - export CXX=g++ |
71 | | - fi |
72 | | - |
73 | | - # Recommended by CCache: https://ccache.samba.org/manual.html#_run_modes |
74 | | - # Add to the beginning of path to ensure this redirection is picked up instead |
75 | | - # of the original ones. Especially CUDA/NVCC appends itself to the beginning of the |
76 | | - # path and thus this redirect is ignored. This change fixes this problem |
77 | | - # This hacky approach with symbolic links is required because underlying build |
78 | | - # systems of our submodules ignore our CMake settings. If they use Makefile, |
79 | | - # we can't influence them at all in general and NVCC also prefers to hardcode their |
80 | | - # compiler instead of respecting the settings. Thus, we take this brutal approach |
81 | | - # and just redirect everything of this installer has been called. |
82 | | - # In future, we could do these links during image build time of the container. |
83 | | - # But in the beginning, we'll make this opt-in. In future, loads of processes like |
84 | | - # the scala make step or numpy compilation and other pip package generations |
85 | | - # could be heavily sped up by using ccache as well. |
86 | | - mkdir -p /tmp/ccache-redirects |
87 | | - export PATH=/tmp/ccache-redirects:$PATH |
88 | | - CCACHE=`which ccache` |
89 | | - ln -sf $CCACHE /tmp/ccache-redirects/gcc |
90 | | - ln -sf $CCACHE /tmp/ccache-redirects/gcc-8 |
91 | | - ln -sf $CCACHE /tmp/ccache-redirects/g++ |
92 | | - ln -sf $CCACHE /tmp/ccache-redirects/g++-8 |
93 | | - ln -sf $CCACHE /tmp/ccache-redirects/clang++-3.9 |
94 | | - ln -sf $CCACHE /tmp/ccache-redirects/clang-3.9 |
95 | | - ln -sf $CCACHE /tmp/ccache-redirects/clang++-5.0 |
96 | | - ln -sf $CCACHE /tmp/ccache-redirects/clang-5.0 |
97 | | - ln -sf $CCACHE /tmp/ccache-redirects/clang++-6.0 |
98 | | - ln -sf $CCACHE /tmp/ccache-redirects/clang-6.0 |
99 | | - ln -sf $CCACHE /tmp/ccache-redirects/clang++-10 |
100 | | - ln -sf $CCACHE /tmp/ccache-redirects/clang-10 |
101 | | - #Doesn't work: https://github.com/ccache/ccache/issues/373 |
102 | | - # ln -sf $CCACHE /tmp/ccache-redirects/nvcc |
103 | | - # ln -sf $CCACHE /tmp/ccache-redirects/nvcc |
104 | | - # export NVCC="/tmp/ccache-redirects/nvcc" |
105 | | - |
106 | | - # Uncomment if you would like to debug CCache hit rates. |
107 | | - # You can monitor using tail -f ccache-log |
108 | | - #export CCACHE_LOGFILE=/work/mxnet/ccache-log |
109 | | - #export CCACHE_LOGFILE=/tmp/ccache-log |
110 | | - #export CCACHE_DEBUG=1 |
111 | | -} |
112 | | - |
113 | 61 | build_wheel() { |
114 | 62 |
|
115 | 63 | set -ex |
@@ -787,9 +735,24 @@ build_ubuntu_blc() { |
787 | 735 | # Testing |
788 | 736 |
|
789 | 737 | sanity_check() { |
| 738 | + set -ex |
| 739 | + sanity_license |
| 740 | + sanity_python |
| 741 | + sanity_cpp |
| 742 | +} |
| 743 | + |
| 744 | +sanity_license() { |
790 | 745 | set -ex |
791 | 746 | tools/license_header.py check |
| 747 | +} |
| 748 | + |
| 749 | +sanity_python() { |
| 750 | + set -ex |
792 | 751 | 3rdparty/dmlc-core/scripts/lint.py mxnet cpp include src plugin tests --exclude_path src/operator/contrib/ctc_include include/mkldnn |
| 752 | +} |
| 753 | + |
| 754 | +sanity_cpp() { |
| 755 | + set -ex |
793 | 756 | python3 -m pylint --rcfile=ci/other/pylintrc --ignore-patterns=".*\.so$$,.*\.dll$$,.*\.dylib$$" python/mxnet |
794 | 757 | OMP_NUM_THREADS=$(expr $(nproc) / 4) pytest -n 4 tests/tutorials/test_sanity_tutorials.py |
795 | 758 | } |
|
0 commit comments