Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,21 @@ jobs:
with:
python-version: ${{ env.python_version }}

- name: "Run Homebrew"
run: brew install autoconf automake autoconf-archive

- name: "Run vcpkg(x64-osx)"
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: "${{ runner.temp }}/vcpkg"
vcpkgGitCommitId: "1de2026f28ead93ff1773e6e680387643e914ea1" # 2024.07.12
runVcpkgInstall: true
vcpkgGitCommitId: "b322364f06308bdd24823f9d8f03fe0cc86fd46f" # 2024.12.16
runVcpkgInstall: true # vcpkg install --x-manifest-root cmake --x-install-root .build --overlay-triplets cmake/vcpkg-triplets
vcpkgJsonGlob: "cmake/vcpkg.json"
vcpkgConfigurationJsonGlob: "cmake/vcpkg-configuration.json"
env:
VCPKG_INSTALLED_DIR: "${{ github.workspace }}/.build"
VCPKG_DEFAULT_TRIPLET: "x64-osx"
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets"
# VCPKG_BINARY_SOURCES: "default" # https://learn.microsoft.com/en-us/vcpkg/reference/binarycaching

- name: "Run compile_schema.py"
Expand Down Expand Up @@ -163,19 +167,22 @@ jobs:
--cmake_extra_defines "VCPKG_TARGET_TRIPLET=x64-osx" \
--cmake_extra_defines "VCPKG_INSTALLED_DIR:PATH=${{ github.workspace }}/.build" \
--cmake_extra_defines "VCPKG_INSTALL_OPTIONS=--x-feature=tests"
env:
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets"
shell: bash

- name: "Run vcpkg(arm64-osx)"
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: "${{ runner.temp }}/vcpkg"
vcpkgGitCommitId: "1de2026f28ead93ff1773e6e680387643e914ea1" # 2024.07.12
runVcpkgInstall: true
doNotUpdateVcpkg: true
runVcpkgInstall: true # vcpkg install --x-manifest-root cmake --x-install-root .build --overlay-triplets cmake/vcpkg-triplets
vcpkgJsonGlob: "cmake/vcpkg.json"
vcpkgConfigurationJsonGlob: "cmake/vcpkg-configuration.json"
env:
VCPKG_INSTALLED_DIR: "${{ github.workspace }}/.build"
VCPKG_DEFAULT_TRIPLET: "arm64-osx"
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets"
# VCPKG_BINARY_SOURCES: "default" # https://learn.microsoft.com/en-us/vcpkg/reference/binarycaching

- name: "Run build.py(arm64-osx)"
Expand All @@ -193,6 +200,8 @@ jobs:
--cmake_extra_defines "VCPKG_TARGET_TRIPLET=arm64-osx" \
--cmake_extra_defines "VCPKG_INSTALLED_DIR:PATH=${{ github.workspace }}/.build" \
--cmake_extra_defines "VCPKG_INSTALL_OPTIONS=--x-feature=tests"
env:
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets"
shell: bash

Objective-C-StaticAnalysis:
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,14 @@ jobs:
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: "C:/vcpkg" # use VCPKG_INSTALLATION_ROOT of the image
runVcpkgInstall: true
vcpkgGitCommitId: "b322364f06308bdd24823f9d8f03fe0cc86fd46f" # 2024.12.16
runVcpkgInstall: true # vcpkg install --x-manifest-root cmake --x-install-root .build --overlay-triplets cmake/vcpkg-triplets
vcpkgJsonGlob: "cmake/vcpkg.json"
vcpkgConfigurationJsonGlob: "cmake/vcpkg-configuration.json"
env:
VCPKG_INSTALLED_DIR: "${{ github.workspace }}/.build"
VCPKG_DEFAULT_TRIPLET: "x64-windows"
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets"
# VCPKG_BINARY_SOURCES: "default" # https://learn.microsoft.com/en-us/vcpkg/reference/binarycaching

- name: "Run compile_schema.py"
Expand Down Expand Up @@ -99,19 +101,22 @@ jobs:
--cmake_extra_defines "VCPKG_TARGET_TRIPLET=x64-windows" `
--cmake_extra_defines "VCPKG_INSTALLED_DIR:PATH=${{ github.workspace }}/.build" `
--cmake_extra_defines "VCPKG_INSTALL_OPTIONS=--x-feature=tests"
env:
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets"
shell: pwsh

- name: "Run vcpkg(arm64-windows)"
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: "C:/vcpkg" # use VCPKG_INSTALLATION_ROOT of the image
doNotUpdateVcpkg: true
runVcpkgInstall: true
runVcpkgInstall: true # vcpkg install --x-manifest-root cmake --x-install-root .build --overlay-triplets cmake/vcpkg-triplets
vcpkgJsonGlob: "cmake/vcpkg.json"
vcpkgConfigurationJsonGlob: "cmake/vcpkg-configuration.json"
env:
VCPKG_INSTALLED_DIR: "${{ github.workspace }}/.build"
VCPKG_DEFAULT_TRIPLET: "arm64-windows"
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets"
# VCPKG_BINARY_SOURCES: "default" # https://learn.microsoft.com/en-us/vcpkg/reference/binarycaching

- name: "Run build.py(arm64-windows)"
Expand All @@ -128,4 +133,6 @@ jobs:
--cmake_extra_defines "VCPKG_TARGET_TRIPLET=arm64-windows" `
--cmake_extra_defines "VCPKG_INSTALLED_DIR:PATH=${{ github.workspace }}/.build" `
--cmake_extra_defines "VCPKG_INSTALL_OPTIONS=--x-feature=tests"
env:
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets"
shell: pwsh
1 change: 1 addition & 0 deletions cmake/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"VCPKG_INSTALLED_DIR": "${sourceParentDir}/.build"
},
"environment": {
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/vcpkg-triplets",
"VCPKG_FEATURE_FLGAS": "manifests,versions"
}
},
Expand Down
2 changes: 1 addition & 1 deletion cmake/vcpkg-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"default-registry": {
"kind": "git",
"repository": "https://github.com/Microsoft/vcpkg",
"baseline": "c82f74667287d3dc386bce81e44964370c91a289"
"baseline": "93570a28ecdf49d3d9676cec8aa0cc72935d43db"
},
"registries": []
}
14 changes: 14 additions & 0 deletions cmake/vcpkg-triplets/arm64-osx.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# https://learn.microsoft.com/en-us/vcpkg/users/triplets
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES arm64)

# provide build options for vcpkg installed packages
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
11 changes: 11 additions & 0 deletions cmake/vcpkg-triplets/arm64-windows.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# https://learn.microsoft.com/en-us/vcpkg/users/triplets
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)

# provide build options for vcpkg installed packages
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
14 changes: 14 additions & 0 deletions cmake/vcpkg-triplets/x64-osx.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# https://learn.microsoft.com/en-us/vcpkg/users/triplets
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES x86_64)

# provide build options for vcpkg installed packages
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
11 changes: 11 additions & 0 deletions cmake/vcpkg-triplets/x64-windows.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# https://learn.microsoft.com/en-us/vcpkg/users/triplets
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)

# provide build options for vcpkg installed packages
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
26 changes: 15 additions & 11 deletions cmake/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
},
"ms-gsl",
"nlohmann-json",
{
"name": "nsync",
"platform": "!windows"
},
{
"name": "nsync",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luncliff , we no longer use nsync. This part can be removed.

@luncliff luncliff Jan 9, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I saw #20413
I will remove the others before working on WebAssembly build

target_compile_options(nsync_cpp PRIVATE ${SMEMORY_FLAG} -Wno-experimental)

"platform": "!windows",
"version>=": "1.26.0"
},
{
"name": "onnx",
"version>=": "1.16.2"
},
"optional-lite",
{
"name": "protobuf",
Expand Down Expand Up @@ -66,12 +66,6 @@
"platform": "windows"
}
],
"overrides": [
{
"name": "flatbuffers",
"version": "23.5.26"
}
],
"features": {
"tests": {
"description": "Build ONNXRuntime unit tests",
Expand All @@ -80,5 +74,15 @@
"gtest"
]
}
}
},
"overrides": [
{
"name": "protobuf",
"version": "3.21.12#4"
},
{
"name": "flatbuffers",
"version": "23.5.26"
}
]
}