build-cmake.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. name: CMake
  2. on:
  3. pull_request:
  4. push:
  5. branches:
  6. - nightly
  7. - main
  8. - release/*
  9. workflow_dispatch:
  10. jobs:
  11. linux:
  12. strategy:
  13. matrix:
  14. include:
  15. - runner: linux.12xlarge
  16. gpu-arch-type: cpu
  17. - runner: linux.g5.4xlarge.nvidia.gpu
  18. gpu-arch-type: cuda
  19. gpu-arch-version: "11.8"
  20. fail-fast: false
  21. uses: pytorch/test-infra/.github/workflows/linux_job.yml@release/2.1
  22. with:
  23. repository: pytorch/vision
  24. runner: ${{ matrix.runner }}
  25. gpu-arch-type: ${{ matrix.gpu-arch-type }}
  26. gpu-arch-version: ${{ matrix.gpu-arch-version }}
  27. script: |
  28. set -euo pipefail
  29. export PYTHON_VERSION=3.8
  30. export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}
  31. export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
  32. ./.github/scripts/cmake.sh
  33. macos:
  34. strategy:
  35. matrix:
  36. include:
  37. - runner: macos-12
  38. - runner: macos-m1-12
  39. fail-fast: false
  40. uses: pytorch/test-infra/.github/workflows/macos_job.yml@release/2.1
  41. with:
  42. repository: pytorch/vision
  43. runner: ${{ matrix.runner }}
  44. script: |
  45. set -euo pipefail
  46. export PYTHON_VERSION=3.8
  47. export GPU_ARCH_TYPE=cpu
  48. export GPU_ARCH_VERSION=''
  49. ./.github/scripts/cmake.sh
  50. windows:
  51. strategy:
  52. matrix:
  53. include:
  54. - runner: windows.4xlarge
  55. gpu-arch-type: cpu
  56. - runner: windows.g5.4xlarge.nvidia.gpu
  57. gpu-arch-type: cuda
  58. gpu-arch-version: "11.8"
  59. fail-fast: false
  60. uses: pytorch/test-infra/.github/workflows/windows_job.yml@release/2.1
  61. with:
  62. repository: pytorch/vision
  63. runner: ${{ matrix.runner }}
  64. gpu-arch-type: ${{ matrix.gpu-arch-type }}
  65. gpu-arch-version: ${{ matrix.gpu-arch-version }}
  66. script: |
  67. set -euo pipefail
  68. export PYTHON_VERSION=3.8
  69. export VC_YEAR=2022
  70. export VSDEVCMD_ARGS=""
  71. export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}
  72. export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
  73. ./.github/scripts/cmake.sh