|
7 | 7 | required: true |
8 | 8 | type: string |
9 | 9 | description: Name of the docker image to use. |
| 10 | + build-tool: |
| 11 | + required: true |
| 12 | + type: string |
| 13 | + description: Build tool to use, cmake or buck2. |
10 | 14 | python-version: |
11 | 15 | required: false |
12 | 16 | type: string |
|
26 | 30 | timeout: 90 |
27 | 31 | script: | |
28 | 32 | set -eux |
29 | | -
|
30 | | - # The generic Linux job chooses to use base env, not the one setup by the image |
31 | | - CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]") |
32 | | - conda activate "${CONDA_ENV}" |
33 | | -
|
34 | | - # Setup swiftshader and Vulkan SDK which are required to build the Vulkan delegate |
35 | | - source .ci/scripts/setup-vulkan-linux-deps.sh |
36 | | -
|
37 | | - # Setup MacOS dependencies as there is no Docker support on MacOS atm |
38 | | - PYTHON_EXECUTABLE=python \ |
39 | | - EXECUTORCH_BUILD_PYBIND=ON \ |
40 | | - CMAKE_ARGS="-DEXECUTORCH_BUILD_XNNPACK=ON -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON" \ |
41 | | - .ci/scripts/setup-linux.sh cmake |
42 | | -
|
43 | | - # Install llama3_2_vision dependencies. |
44 | | - PYTHON_EXECUTABLE=python ./examples/models/llama3_2_vision/install_requirements.sh |
45 | | -
|
46 | | - # Run pytest with coverage |
47 | | - pytest -n auto --cov=./ --cov-report=xml |
48 | | - # Run gtest |
49 | | - LLVM_PROFDATA=llvm-profdata-12 LLVM_COV=llvm-cov-12 \ |
50 | | - test/run_oss_cpp_tests.sh |
| 33 | + .ci/scripts/unittest-linux.sh "${{ inputs.build-tool }}" |
51 | 34 |
|
52 | 35 | macos: |
53 | 36 | uses: pytorch/test-infra/.github/workflows/macos_job.yml@main |
|
58 | 41 | ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} |
59 | 42 | script: | |
60 | 43 | set -eux |
61 | | -
|
62 | | - bash .ci/scripts/setup-conda.sh |
63 | | -
|
64 | | - # Create temp directory for sccache shims |
65 | | - export TMP_DIR=$(mktemp -d) |
66 | | - export PATH="${TMP_DIR}:$PATH" |
67 | | - trap 'rm -rfv ${TMP_DIR}' EXIT |
68 | | -
|
69 | | - # Setup MacOS dependencies as there is no Docker support on MacOS atm |
70 | | - PYTHON_EXECUTABLE=python \ |
71 | | - EXECUTORCH_BUILD_PYBIND=ON \ |
72 | | - CMAKE_ARGS="-DEXECUTORCH_BUILD_COREML=ON -DEXECUTORCH_BUILD_MPS=ON -DEXECUTORCH_BUILD_XNNPACK=ON -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON" \ |
73 | | - ${CONDA_RUN} --no-capture-output \ |
74 | | - .ci/scripts/setup-macos.sh cmake |
75 | | -
|
76 | | - # Install llama3_2_vision dependencies. |
77 | | - PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \ |
78 | | - ./examples/models/llama3_2_vision/install_requirements.sh |
79 | | -
|
80 | | - # Run pytest with coverage |
81 | | - ${CONDA_RUN} pytest -n auto --cov=./ --cov-report=xml |
82 | | - # Run gtest |
83 | | - LLVM_PROFDATA="xcrun llvm-profdata" LLVM_COV="xcrun llvm-cov" \ |
84 | | - ${CONDA_RUN} test/run_oss_cpp_tests.sh |
| 44 | + .ci/scripts/unittest-macos.sh "${{ inputs.build-tool }}" |
0 commit comments