dist: xenial language: python python: - "3.6" branches: only: - master - /^\d+\.\d+(\.\d+)?(-\S*)?$/ # Update the `nvm use` stanza below when updating this. node_js: - "11" env: # Keep this Bazel version in sync with the `versions.check` directive # near the top of our WORKSPACE file. # # Grab the BAZEL_SHA256SUM from the Bazel releases page; e.g.: # bazel-0.20.0-linux-x86_64.sha256 global: - BAZEL=2.1.0 - BAZEL_SHA256SUM=e13581d44faad6ac807dd917e682fef20359d26728166ac35dadd8ee653a580d matrix: - TF_VERSION_ID=tf-nightly - TF_VERSION_ID= # Do not install TensorFlow in this case cache: # Don't cache the Pip directory. We pull in a new `tf-nightly` wheel # every day, and Pip caches are never evicted, so this quickly bloats # to many gigabytes and adds minutes to the CI time. pip: false # Cache directories for Bazel. See ci/bazelrc for details. directories: - $HOME/.cache/tb-bazel-repo - $HOME/.cache/tb-bazel-disk # Each bullet point is displayed in the Travis log as one collapsed line, which # indicates how long it took. Travis will check the return code at the end. We # can't use `set -e` in the YAML file since it might impact Travis internals. # If inline scripts get too long, Travis surprisingly prints them twice. before_install: - elapsed() { TZ=UTC printf "Time %(%T)T %s\n" "$SECONDS" "$1"; } - elapsed "before_install" - ci/download_bazel.sh "${BAZEL}" "${BAZEL_SHA256SUM}" ~/bazel - sudo mv ~/bazel /usr/local/bin/bazel - cp ci/bazelrc ~/.bazelrc - elapsed "before_install (done)" install: - elapsed "install" - "PY3=\"$(python -c 'if __import__(\"sys\").version_info[0] > 2: print(1)')\"" # Older versions of Pip sometimes resolve specifiers like `tf-nightly` # to versions other than the most recent(!). - pip install -U pip # Uninstall older Travis numpy to avoid upgrade-in-place issues. - pip uninstall -y numpy - | pip install \ -r tensorboard/pip_package/requirements.txt \ -r tensorboard/pip_package/requirements_dev.txt \ ; # Keep the node version in sync with node_js key above. - nvm use v11 - | # Install TensorFlow if requested if [ -n "${TF_VERSION_ID}" ]; then pip install -I "${TF_VERSION_ID}" fi # Workaround for https://github.com/travis-ci/travis-ci/issues/7940 - sudo rm -f /etc/boto.cfg - pip freeze # print installed distributions, for debugging purposes - elapsed "install (done)" before_script: # Note: Lint checks happen on GitHub Actions; see .github/workflows/ci.yml. - elapsed "before_script" - | # Specify subset of tests to run depending on TF installation config. # We condition the value of --test_tag_filters so that we can run the # bazel test command unconditionally which produces nicer log output. if [ -z "${TF_VERSION_ID}" ]; then test_tag_filters=support_notf else test_tag_filters= fi - elapsed "before_script (done)" # Commands in this section should only fail if it's our fault. Travis will # categorize them as 'failed', rather than 'error' for other sections. script: - elapsed "script" # Note: bazel test implies fetch+build, but this gives us timing. - elapsed && bazel fetch //tensorboard/... - elapsed && bazel build //tensorboard/... - elapsed && bazel test //tensorboard/... --test_tag_filters="${test_tag_filters}" - elapsed && bazel run //tensorboard/pip_package:test_pip_package -- --tf-version "${TF_VERSION_ID}" # Run manual S3 test - elapsed && bazel test //tensorboard/compat/tensorflow_stub:gfile_s3_test - elapsed && bazel test //tensorboard/summary/writer:event_file_writer_s3_test - elapsed "script (done)" after_script: # Bazel launches daemons unless --batch is used. - elapsed "after_script" - bazel shutdown notifications: email: false