Skip to content

Commit d58b28f

Browse files
committed
Use new CMake-based OSS c++ gtest workflow
For OSS, we should focus on CMake build. Now we can build c++ tests, we should run them with cmake built tests.
1 parent c69861d commit d58b28f

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

.github/workflows/_unittest.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ on:
1515
jobs:
1616
linux:
1717
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
18-
strategy:
19-
matrix:
20-
include:
21-
- build-tool: buck2
2218
with:
2319
runner: linux.2xlarge
2420
docker-image: ${{ inputs.docker-image }}
@@ -32,23 +28,19 @@ jobs:
3228
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
3329
conda activate "${CONDA_ENV}"
3430
35-
BUILD_TOOL=${{ matrix.build-tool }}
36-
3731
# Setup MacOS dependencies as there is no Docker support on MacOS atm
3832
PYTHON_EXECUTABLE=python \
3933
EXECUTORCH_BUILD_PYBIND=ON \
4034
EXECUTORCH_BUILD_XNNPACK=ON \
41-
.ci/scripts/setup-linux.sh "${BUILD_TOOL}"
35+
.ci/scripts/setup-linux.sh cmake
4236
4337
# Run pytest with coverage
4438
pytest -n auto --cov=./ --cov-report=xml
39+
# Run gtest
40+
sh test/run_oss_cpp_tests.sh
4541
4642
macos:
4743
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
48-
strategy:
49-
matrix:
50-
include:
51-
- build-tool: buck2
5244
with:
5345
runner: macos-m1-stable
5446
python-version: '3.11'
@@ -57,18 +49,16 @@ jobs:
5749
script: |
5850
set -eux
5951
60-
BUILD_TOOL=${{ matrix.build-tool }}
61-
6252
bash .ci/scripts/setup-conda.sh
6353
6454
# Setup MacOS dependencies as there is no Docker support on MacOS atm
6555
PYTHON_EXECUTABLE=python \
6656
EXECUTORCH_BUILD_PYBIND=ON \
6757
CMAKE_ARGS="-DEXECUTORCH_BUILD_COREML=ON -DEXECUTORCH_BUILD_MPS=ON -DEXECUTORCH_BUILD_XNNPACK=ON" \
6858
${CONDA_RUN} --no-capture-output \
69-
.ci/scripts/setup-macos.sh "${BUILD_TOOL}"
59+
.ci/scripts/setup-macos.sh cmake
7060
7161
# Run pytest with coverage
7262
${CONDA_RUN} pytest -n auto --cov=./ --cov-report=xml
7363
# Run gtest
74-
${CONDA_RUN} buck2 test runtime/core/... runtime/platform/...
64+
sh test/run_oss_cpp_tests.sh

0 commit comments

Comments
 (0)