You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/02/15 19:31:08 UTC

[GitHub] [tvm] driazati commented on a change in pull request #10246: [skip ci][ci] Use sccache in builds

driazati commented on a change in pull request #10246:
URL: https://github.com/apache/tvm/pull/10246#discussion_r807238655



##########
File path: tests/scripts/task_build.sh
##########
@@ -15,5 +15,29 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-export VTA_HW_PATH=`pwd`/3rdparty/vta-hw
-cd $1 && cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo && make $2 && cd ..
+set -eux
+
+VTA_HW_PATH=$(pwd)/3rdparty/vta-hw
+export VTA_HW_PATH
+
+pushd "$1"
+
+# Set up sccache to use S3
+export SCCACHE_BUCKET=$3
+export CC=/opt/sccache/cc
+export CXX=/opt/sccache/c++
+echo "$SCCACHE_BUCKET" | wc
+echo "$SCCACHE_BUCKET" | base64
+
+sccache --start-server || echo failed
+sccache --show-stats
+
+# Use ninja as the builder for cmake
+pip install --user ninja

Review comment:
       Yeah installing in the image is definitely better, #10257 adds it (separate PR so we can land the images and then merge this one). I kept it with `pip` since the Ubuntu 18 `ninja-build` is pretty old (1.8, 2017) compared to the binaries in `pip` (1.10, 2020) and they should be equivalent otherwise




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org