Skip to content

Commit

Permalink
ci gh-actions: run setup-python
Browse files Browse the repository at this point in the history
  • Loading branch information
luncliff committed Oct 8, 2023
1 parent e6df79b commit 37fcffa
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ jobs:
VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}/triplets
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- name: "create cache folders"
run: |
mkdir -p ${VCPKG_DOWNLOADS}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ jobs:
VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}/triplets
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- name: "create cache folders"
run: |
mkdir -p ${VCPKG_DOWNLOADS}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}/triplets
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- name: "create cache folders"
run: |
New-Item -Type Directory -Force ${env:VCPKG_DOWNLOADS}
Expand Down
14 changes: 10 additions & 4 deletions ports/libtorch/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ vcpkg_execute_required_process(
find_program(PROTOC NAMES protoc PATHS "${CURRENT_HOST_INSTALLED_DIR}/tools/protobuf" REQUIRED NO_DEFAULT_PATH NO_CMAKE_PATH)
message(STATUS "Using protoc: ${PROTOC}")

vcpkg_find_acquire_program(PYTHON3)
# vcpkg_find_acquire_program(PYTHON3)
find_program(PYTHON3 NAMES python3 python REQUIRED)

Check failure on line 30 in ports/libtorch/portfile.cmake

View workflow job for this annotation

GitHub Actions / windows2022 (x64-windows)

Could not find PYTHON3 using the following names: python3, python
message(STATUS "Using Python3: ${PYTHON3}")
x_vcpkg_get_python_packages(
PYTHON_EXECUTABLE "${PYTHON3}"
PACKAGES typing-extensions pyyaml numpy sympy
)

get_filename_component(PYTHON_PATH "${PYTHON3}" PATH)
vcpkg_add_to_path(PREPEND "${PYTHON_PATH}")

Expand Down Expand Up @@ -115,9 +121,9 @@ vcpkg_cmake_configure(
-DUSE_SYSTEM_LIBS=ON
-DBUILD_PYTHON=OFF
-DUSE_NUMPY=OFF
-DUSE_METAL=OFF
-DUSE_PYTORCH_METAL=OFF
-DUSE_PYTORCH_METAL_EXPORT=OFF
-DUSE_METAL=${VCPKG_TARGET_IS_OSX}
-DUSE_PYTORCH_METAL=${VCPKG_TARGET_IS_OSX}
-DUSE_PYTORCH_METAL_EXPORT=${VCPKG_TARGET_IS_OSX}
-DUSE_GFLAGS=ON
-DUSE_GLOG=ON
-DUSE_LMDB=ON
Expand Down
4 changes: 4 additions & 0 deletions ports/libtorch/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
{
"name": "vcpkg-cmake-config",
"host": true
},
{
"name": "vcpkg-get-python-packages",
"host": true
}
],
"default-features": [
Expand Down

0 comments on commit 37fcffa

Please sign in to comment.