Update gradle version to 8.7 #32874
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows_CI | |
on: | |
push: | |
branches: | |
- main | |
- rel-* | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
AZCOPY_AUTO_LOGIN_TYPE: MSI | |
AZCOPY_MSI_CLIENT_ID: 63b63039-6328-442f-954b-5a64d124e5b4 | |
jobs: | |
Windows-CUDA-12: | |
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-mms"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: false | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11.x' | |
architecture: 'x64' | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Download cuda | |
run: azcopy.exe cp --recursive "https://lotusscus.blob.core.windows.net/models/cuda_sdk/v12.2" cuda_sdk | |
- name: Delete build folder | |
run: | | |
if (Test-Path D:\b) { Remove-Item -Recurse -Force D:\b } | |
&tools\ci_build\github\windows\install_third_party_deps.ps1 -cpu_arch x64 -install_prefix D:\b\Debug\installed -build_config Debug | |
# The build machine doesn't have a GPU. So the value of CMAKE_CUDA_ARCHITECTURES doesn't matter. | |
- name: Build code | |
run: python tools\ci_build\build.py --windows_sdk_version 10.0.22621.0 --enable_training --build_java --config Debug --build_dir D:\b --skip_submodule_sync --build_csharp --update --build --parallel --cmake_generator "Visual Studio 17 2022" --build_shared_lib --enable_pybind --use_cuda --cuda_home=${{ github.workspace }}\cuda_sdk\v12.2 --enable_cuda_profiling --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=75 | |
Vcpkg: | |
runs-on: "windows-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11.x' | |
architecture: 'x64' | |
- name: "Run vcpkg(x64-windows)" | |
uses: lukka/run-vcpkg@v11 | |
with: | |
vcpkgDirectory: "C:/vcpkg" # use VCPKG_INSTALLATION_ROOT of the image | |
runVcpkgInstall: true | |
vcpkgJsonGlob: "cmake/vcpkg.json" | |
vcpkgConfigurationJsonGlob: "cmake/vcpkg-configuration.json" | |
env: | |
VCPKG_INSTALLED_DIR: "${{ github.workspace }}/.build" | |
VCPKG_DEFAULT_TRIPLET: "x64-windows" | |
# VCPKG_BINARY_SOURCES: "default" # https://learn.microsoft.com/en-us/vcpkg/reference/binarycaching | |
- name: "Run compile_schema.py" | |
run: | | |
# Runner's host triplet should be x64-windows or arm64-windows | |
$FLATC_DIR="${{ github.workspace }}/.build/${{ runner.arch }}-windows/tools/flatbuffers" | |
$env:PATH="$FLATC_DIR;$env:PATH" | |
flatc --version | |
$FLATC_PATH = Join-Path "$FLATC_DIR" "flatc.exe" | |
python onnxruntime/core/flatbuffers/schema/compile_schema.py --flatc "$FLATC_PATH" | |
python onnxruntime/lora/adapter_format/compile_schema.py --flatc "$FLATC_PATH" | |
shell: pwsh | |
- name: "Detect protoc" | |
id: protoc-detect | |
run: | | |
$PROTOC_DIR="${{ github.workspace }}/.build/${{ runner.arch }}-windows/tools/protobuf" | |
$env:PATH="$PROTOC_DIR;$env:PATH" | |
protoc --version | |
$PROTOC_PATH = Join-Path "$PROTOC_DIR" "protoc.exe" | |
"protoc_path=$PROTOC_PATH" >> $env:GITHUB_OUTPUT | |
shell: pwsh | |
- name: "Run build.py(x64-windows)" | |
run: | | |
python tools\ci_build\build.py ` | |
--build_dir "cmake_build/x64-windows" ` | |
--skip_submodule_sync ` | |
--skip_tests ` | |
--compile_no_warning_as_error ` | |
--parallel ` | |
--path_to_protoc_exe "${{ steps.protoc-detect.outputs.protoc_path }}" ` | |
--use_vcpkg ` | |
--cmake_extra_defines "CMAKE_TOOLCHAIN_FILE:FILEPATH=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" ` | |
--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" | |
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 | |
vcpkgJsonGlob: "cmake/vcpkg.json" | |
vcpkgConfigurationJsonGlob: "cmake/vcpkg-configuration.json" | |
env: | |
VCPKG_INSTALLED_DIR: "${{ github.workspace }}/.build" | |
VCPKG_DEFAULT_TRIPLET: "arm64-windows" | |
# VCPKG_BINARY_SOURCES: "default" # https://learn.microsoft.com/en-us/vcpkg/reference/binarycaching | |
- name: "Run build.py(arm64-windows)" | |
run: | | |
python tools\ci_build\build.py ` | |
--build_dir "cmake_build/arm64-windows" --arm64 ` | |
--skip_submodule_sync ` | |
--skip_tests ` | |
--compile_no_warning_as_error ` | |
--parallel ` | |
--path_to_protoc_exe "${{ steps.protoc-detect.outputs.protoc_path }}" ` | |
--use_vcpkg ` | |
--cmake_extra_defines "CMAKE_TOOLCHAIN_FILE:FILEPATH=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" ` | |
--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" | |
shell: pwsh |