1#!/bin/bash 2# Copyright (c) Meta Platforms, Inc. and affiliates. 3# All rights reserved. 4# 5# This source code is licensed under the BSD-style license found in the 6# LICENSE file in the root directory of this source tree. 7 8set -exu 9 10# shellcheck source=/dev/null 11source "$(dirname "${BASH_SOURCE[0]}")/utils.sh" 12 13BUILD_TOOL=$1 14if [[ -z "${BUILD_TOOL:-}" ]]; then 15 echo "Missing build tool (require buck2 or cmake), exiting..." 16 exit 1 17else 18 echo "Setup Linux for ${BUILD_TOOL} ..." 19fi 20 21# As Linux job is running inside a Docker container, all of its dependencies 22# have already been installed, so we use PyTorch build from source here instead 23# of nightly. This allows CI to test against latest commits from PyTorch 24install_executorch "use-pt-pinned-commit" 25build_executorch_runner "${BUILD_TOOL}" 26do_not_use_nightly_on_ci 27