|
14 | 14 | exit 1 |
15 | 15 | fi |
16 | 16 |
|
| 17 | +BUILD_MODE=$2 |
| 18 | +if [[ "${BUILD_MODE:-}" =~ ^(Debug|Release)$ ]]; then |
| 19 | + echo "Running tests in build mode ${BUILD_MODE} ..." |
| 20 | +else |
| 21 | + echo "Unsupported build mode ${BUILD_MODE}, options are Debug or Release." |
| 22 | + exit 1 |
| 23 | +fi |
| 24 | + |
17 | 25 | # The generic Linux job chooses to use base env, not the one setup by the image |
18 | 26 | eval "$(conda shell.bash hook)" |
19 | 27 | CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]") |
20 | 28 | conda activate "${CONDA_ENV}" |
21 | 29 |
|
22 | | -# Setup swiftshader and Vulkan SDK which are required to build the Vulkan delegate |
23 | | -source .ci/scripts/setup-vulkan-linux-deps.sh |
| 30 | +if [[ "$BUILD_TOOL" == "cmake" ]]; then |
| 31 | + # Setup swiftshader and Vulkan SDK which are required to build the Vulkan delegate |
| 32 | + source .ci/scripts/setup-vulkan-linux-deps.sh |
24 | 33 |
|
25 | | -PYTHON_EXECUTABLE=python \ |
26 | | -EXECUTORCH_BUILD_PYBIND=ON \ |
27 | | -CMAKE_ARGS="-DEXECUTORCH_BUILD_XNNPACK=ON -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON" \ |
28 | | -.ci/scripts/setup-linux.sh "$BUILD_TOOL" |
| 34 | + PYTHON_EXECUTABLE=python \ |
| 35 | + EXECUTORCH_BUILD_PYBIND=ON \ |
| 36 | + CMAKE_ARGS="-DEXECUTORCH_BUILD_XNNPACK=ON -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON" \ |
| 37 | + .ci/scripts/setup-linux.sh "$BUILD_TOOL" "$BUILD_MODE" |
29 | 38 |
|
30 | | -# Install llama3_2_vision dependencies. |
31 | | -PYTHON_EXECUTABLE=python ./examples/models/llama3_2_vision/install_requirements.sh |
| 39 | + # Install llama3_2_vision dependencies. |
| 40 | + PYTHON_EXECUTABLE=python ./examples/models/llama3_2_vision/install_requirements.sh |
32 | 41 |
|
33 | | -if [[ "$BUILD_TOOL" == "cmake" ]]; then |
34 | 42 | .ci/scripts/unittest-linux-cmake.sh |
35 | 43 | elif [[ "$BUILD_TOOL" == "buck2" ]]; then |
| 44 | + # Removing this breaks sccache in the Buck build, apparently |
| 45 | + # because TMPDIR gets messed up? Please feel free to fix this and |
| 46 | + # speed up this CI job! |
| 47 | + PYTHON_EXECUTABLE=python \ |
| 48 | + .ci/scripts/setup-linux.sh "$BUILD_TOOL" "$BUILD_MODE" |
| 49 | + |
36 | 50 | .ci/scripts/unittest-buck2.sh |
37 | 51 | else |
38 | 52 | echo "Unknown build tool $BUILD_TOOL" |
|
0 commit comments