diff --git a/.github/workflows/test-check-binary.yml b/.github/workflows/test-check-binary.yml new file mode 100644 index 000000000..e29ee7ba9 --- /dev/null +++ b/.github/workflows/test-check-binary.yml @@ -0,0 +1,37 @@ +name: Test check_binary + +on: + push: + branches: + - main + pull_request: + paths: + - .github/workflows/test-check-binary.yml + - check_binary.sh + - test/smoke_test/smoke_test.py + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }} + cancel-in-progress: true + +jobs: + check_binary_linux_cpu: + name: Test check_binary.sh for Linux CPU + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + with: + repository: "pytorch/builder" + docker-image: python:3.11 + script: | + pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu + DESIRED_PYTHON=3.11 DESIRED_CUDA=cpu PACKAGE_TYPE=manywheel ./check_binary.sh + + check_binary_linux_cuda: + name: Test check_binary.sh for Linux CUDA + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + with: + repository: "pytorch/builder" + runner: linux.4xlarge.nvidia.gpu + docker-image: python:3.11 + script: | + pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 + DESIRED_PYTHON=3.11 DESIRED_CUDA=cu121 PACKAGE_TYPE=manywheel ./check_binary.sh diff --git a/check_binary.sh b/check_binary.sh index 2b5f228d6..9a2cf065b 100755 --- a/check_binary.sh +++ b/check_binary.sh @@ -261,7 +261,7 @@ setup_link_flags () { fi } -TEST_CODE_DIR="$(dirname ${BASH_SOURCE[0]})/test_example_code" +TEST_CODE_DIR="$(dirname $(realpath ${BASH_SOURCE[0]}))/test_example_code" build_and_run_example_cpp () { if [[ "$DESIRED_DEVTOOLSET" == *"cxx11-abi"* ]]; then GLIBCXX_USE_CXX11_ABI=1