Skip to content

Commit 55aa03c

Browse files
Pin vcpkg version (#24284)
### Description Pin vcpkg version. Yesterday vcpkg-tool made a new release that broke all our Linux pipelines. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent bc7b07d commit 55aa03c

19 files changed

+103
-145
lines changed

.github/actions/locate-vcvarsall-and-setup-env/action.yml

+11-19
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,22 @@ outputs:
1212
runs:
1313
using: "composite"
1414
steps:
15-
- name: Download ORT Actions Asset (v0.0.3)
16-
uses: dsaltares/[email protected] # Action to download assets
17-
with:
18-
repo: 'microsoft/onnxruntime-github-actions' # The repo containing the actions
19-
version: 'tags/v0.0.3' # The specific tag/version to use
20-
file: 'onnxruntime-actions-v0.0.3.zip' # The asset filename (matches release workflow output)
21-
target: 'onnxruntime-actions.zip' # Local filename to save as
22-
23-
- name: Unzip ORT Actions (Windows)
24-
shell: pwsh
25-
run: |
26-
# Create a directory to hold them (-Force acts like -p, creates parents if needed)
27-
New-Item -Path '.\.github\_downloaded_actions' -ItemType Directory -Force
28-
# Unzip the archive to the target directory
29-
Expand-Archive -Path '.\onnxruntime-actions.zip' -DestinationPath '.\.github\_downloaded_actions' -Force
30-
Write-Host "Unzipped contents:"
31-
# List the contents recursively (Windows equivalent of ls -lR)
32-
Get-ChildItem -Path '.\.github\_downloaded_actions' -Recurse
3315

3416
- name: Setup VCPKG
35-
uses: ./.github/_downloaded_actions/setup-vcpkg
17+
uses: microsoft/onnxruntime-github-actions/setup-[email protected]
3618
with:
3719
vcpkg-version: '2025.03.19'
3820
vcpkg-hash: '17e96169cd3f266c4716fcdc1bb728e6a64f103941ece463a2834d50694eba4fb48f30135503fd466402afa139abc847ef630733c442595d1c34979f261b0114'
21+
cmake-version: '3.31.6'
22+
cmake-hash: '0f1584e8666cf4a65ec514bd02afe281caabf1d45d2c963f3151c41484f457386aa03273ab25776a670be02725354ce0b46f3a5121857416da37366342a833a0'
23+
add-cmake-to-path: 'true'
24+
disable-terrapin: 'false'
25+
26+
- name: Verify vcpkg setup
27+
shell: pwsh # Use powershell to easily access env var
28+
run: |
29+
Write-Host "VCPKG_INSTALLATION_ROOT is set to: $env:VCPKG_INSTALLATION_ROOT"
30+
& "$env:VCPKG_INSTALLATION_ROOT/vcpkg" version
3931
4032
- name: Find vcvarsall.bat
4133
id: find-vcvarsall

.github/workflows/android.yml

+10
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ jobs:
2929
java-version: '17'
3030
architecture: x64
3131

32+
33+
- uses: microsoft/onnxruntime-github-actions/[email protected]
34+
with:
35+
vcpkg-version: '2025.03.19'
36+
vcpkg-hash: '17e96169cd3f266c4716fcdc1bb728e6a64f103941ece463a2834d50694eba4fb48f30135503fd466402afa139abc847ef630733c442595d1c34979f261b0114'
37+
cmake-version: '3.31.6'
38+
cmake-hash: '42395e20b10a8e9ef3e33014f9a4eed08d46ab952e02d2c1bbc8f6133eca0d7719fb75680f9bbff6552f20fcd1b73d86860f7f39388d631f98fb6f622b37cf04'
39+
add-cmake-to-path: 'true'
40+
disable-terrapin: 'true'
41+
3242
- name: Setup Android NDK
3343
uses: ./.github/actions/setup-android-ndk
3444
with:

.github/workflows/linux-dnnl.yml

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ concurrency:
1616
group: ${{ github.workflow }}-${{ github.ref }}
1717
cancel-in-progress: true
1818

19+
permissions:
20+
contents: read
21+
packages: write
22+
attestations: write
23+
id-token: write
24+
1925
jobs:
2026
build-linux-x64-release-dnnl:
2127
name: Build Linux x64 Release (DNNL EP)

.github/workflows/linux-wasm-ci-build-and-test-workflow.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,14 @@ jobs:
4242
with:
4343
python-version: "3.12"
4444
architecture: ${{ env.buildArch }}
45-
45+
- uses: microsoft/onnxruntime-github-actions/[email protected]
46+
with:
47+
vcpkg-version: '2025.03.19'
48+
vcpkg-hash: '17e96169cd3f266c4716fcdc1bb728e6a64f103941ece463a2834d50694eba4fb48f30135503fd466402afa139abc847ef630733c442595d1c34979f261b0114'
49+
cmake-version: '3.31.6'
50+
cmake-hash: '42395e20b10a8e9ef3e33014f9a4eed08d46ab952e02d2c1bbc8f6133eca0d7719fb75680f9bbff6552f20fcd1b73d86860f7f39388d631f98fb6f622b37cf04'
51+
add-cmake-to-path: 'true'
52+
disable-terrapin: 'true'
4653
- name: Export GitHub Actions cache environment variables
4754
uses: actions/github-script@v7
4855
with:

.github/workflows/linux_ci.yml

+6
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ concurrency:
2929
group: ${{ github.workflow }}-${{ github.ref }}
3030
cancel-in-progress: true
3131

32+
permissions:
33+
contents: read
34+
packages: write
35+
attestations: write
36+
id-token: write
37+
3238
jobs:
3339
# --- x64 Builds ---
3440
build-linux-x64-debug:

.github/workflows/linux_cuda_ci.yml

+15-25
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ concurrency:
1010
group: ${{ github.workflow }}-${{ github.ref }}
1111
cancel-in-progress: true
1212

13+
permissions:
14+
contents: read
15+
packages: write
16+
attestations: write
17+
id-token: write
18+
1319
jobs:
1420
build-linux-cuda-x64-release:
1521
name: Build Linux CUDA x64 Release
@@ -43,30 +49,14 @@ jobs:
4349
- name: Checkout code
4450
uses: actions/checkout@v4
4551

46-
- name: Download ORT Actions Asset (v0.0.2)
47-
uses: dsaltares/[email protected]
48-
with:
49-
repo: 'microsoft/onnxruntime-github-actions'
50-
version: 'tags/v0.0.2'
51-
file: 'onnxruntime-actions-v0.0.2.zip'
52-
target: 'onnxruntime-actions.zip'
53-
env:
54-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55-
56-
- name: Unzip ORT Actions
57-
run: |
58-
mkdir -p ./.github/_downloaded_actions
59-
unzip -q onnxruntime-actions.zip -d ./.github/_downloaded_actions
60-
echo "Unzipped contents:"
61-
ls -lR ./.github/_downloaded_actions
62-
63-
# --- Build the Docker image needed for testing ---
64-
- name: Build Docker Image for Testing
65-
uses: ./.github/_downloaded_actions/build-docker-image # Use downloaded action
52+
- uses: microsoft/onnxruntime-github-actions/[email protected]
53+
id: build_docker_image_step
6654
with:
67-
Dockerfile: tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_cuda
68-
Repository: onnxruntimecuda12manylinuxbuild
69-
DockerBuildArgs: '--build-arg BASEIMAGE=onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20250124.1'
55+
dockerfile: ${{ github.workspace }}/tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_cuda
56+
image-name: ghcr.io/microsoft/onnxruntime/onnxruntimecuda12manylinuxbuild
57+
build-args: '--build-arg BASEIMAGE=onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20250124.1'
58+
push: true
59+
azure-container-registry-name: onnxruntimebuildcache
7060
env:
7161
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Pass token to action
7262

@@ -102,9 +92,9 @@ jobs:
10292
# So build.py --build_dir build/Release inside the container correctly finds the artifacts.
10393
- name: Test ONNX Runtime
10494
id: test_step
105-
uses: ./.github/_downloaded_actions/run-build-script-in-docker # Use downloaded action
95+
uses: microsoft/onnxruntime-github-actions/run-build-script-in-docker@v0.0.5
10696
with:
107-
docker_image: onnxruntimecuda12manylinuxbuild # Use the same image
97+
docker_image: ${{ steps.build_docker_image_step.outputs.full-image-name }}
10898
build_config: Release
10999
mode: 'test' # Set mode to test
110100
execution_providers: 'cuda'

.github/workflows/linux_tensorrt_ci.yml

+16-24
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ concurrency:
1010
group: ${{ github.workflow }}-${{ github.ref }}
1111
cancel-in-progress: true
1212

13+
permissions:
14+
contents: read
15+
packages: write
16+
attestations: write
17+
id-token: write
18+
1319
jobs:
1420
build-linux-TensorRT-x64-release:
1521
name: Build Linux TensorRT x64 Release
@@ -41,32 +47,18 @@ jobs:
4147
packages: read
4248
steps:
4349
- name: Checkout code
44-
uses: actions/checkout@v4
45-
46-
- name: Download ORT Actions Asset (v0.0.2)
47-
uses: dsaltares/[email protected]
48-
with:
49-
repo: 'microsoft/onnxruntime-github-actions'
50-
version: 'tags/v0.0.2'
51-
file: 'onnxruntime-actions-v0.0.2.zip'
52-
target: 'onnxruntime-actions.zip'
53-
env:
54-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55-
56-
- name: Unzip ORT Actions
57-
run: |
58-
mkdir -p ./.github/_downloaded_actions
59-
unzip -q onnxruntime-actions.zip -d ./.github/_downloaded_actions
60-
echo "Unzipped contents:"
61-
ls -lR ./.github/_downloaded_actions
50+
uses: actions/checkout@v4
6251

6352
# --- Build the Docker image needed for testing ---
6453
- name: Build Docker Image for Testing
65-
uses: ./.github/_downloaded_actions/build-docker-image # Use downloaded action
54+
uses: microsoft/onnxruntime-github-actions/[email protected]
55+
id: build_docker_image_step
6656
with:
67-
Dockerfile: tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_cuda
68-
Repository: onnxruntimetensorrt86gpubuild
69-
DockerBuildArgs: '--build-arg BASEIMAGE=onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20250124.1 --build-arg TRT_VERSION=10.9.0.34-1.cuda12.8 --network=host'
57+
dockerfile: ${{ github.workspace }}/tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_cuda
58+
image-name: ghcr.io/microsoft/onnxruntime/onnxruntimetensorrt86gpubuild
59+
build-args: '--build-arg BASEIMAGE=onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20250124.1 --build-arg TRT_VERSION=10.9.0.34-1.cuda12.8 --network=host'
60+
push: true
61+
azure-container-registry-name: onnxruntimebuildcache
7062
env:
7163
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Pass token to action
7264

@@ -102,9 +94,9 @@ jobs:
10294
# So build.py --build_dir build/Release inside the container correctly finds the artifacts.
10395
- name: Test ONNX Runtime
10496
id: test_step
105-
uses: ./.github/_downloaded_actions/run-build-script-in-docker # Use downloaded action
97+
uses: microsoft/onnxruntime-github-actions/run-build-script-in-docker@v0.0.5
10698
with:
107-
docker_image: onnxruntimetensorrt86gpubuild # Use the same image
99+
docker_image: ${{ steps.build_docker_image_step.outputs.full-image-name }}
108100
build_config: Release
109101
mode: 'test' # Set mode to test
110102
execution_providers: 'cuda tensorrt'

.github/workflows/reusable_linux_build.yml

+16-30
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,9 @@ jobs:
7070
- "1ES.Pool=${{ inputs.pool_name }}"
7171
permissions:
7272
contents: read
73-
packages: read
74-
73+
packages: write
74+
attestations: write
75+
id-token: write
7576
steps:
7677
- name: Checkout code
7778
uses: actions/checkout@v4
@@ -81,30 +82,15 @@ jobs:
8182
with:
8283
python-version: ${{ inputs.python_version }}
8384

84-
- name: Download ORT Actions Asset (v0.0.2) # <-- Adjust version as needed
85-
uses: dsaltares/[email protected] # Action to download assets
86-
with:
87-
repo: 'microsoft/onnxruntime-github-actions' # The repo containing the actions
88-
version: 'tags/v0.0.2' # The specific tag/version to use
89-
file: 'onnxruntime-actions-v0.0.2.zip' # The asset filename (matches release workflow output)
90-
target: 'onnxruntime-actions.zip' # Local filename to save as
91-
env:
92-
# Use default token for public repos, provide PAT for private if necessary
93-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94-
95-
- name: Unzip ORT Actions
96-
run: |
97-
mkdir -p ./.github/_downloaded_actions # Create a directory to hold them
98-
unzip onnxruntime-actions.zip -d ./.github/_downloaded_actions
99-
echo "Unzipped contents:"
100-
ls -lR ./.github/_downloaded_actions # Verify structure
101-
10285
- name: Build Docker Image (${{ inputs.architecture }} / ${{ inputs.build_config }})
103-
uses: ./.github/_downloaded_actions/build-docker-image
86+
uses: microsoft/onnxruntime-github-actions/[email protected]
87+
id: build_docker_image_step
10488
with:
105-
Dockerfile: ${{ github.workspace }}/${{ inputs.dockerfile_path }}
106-
Repository: ${{ inputs.docker_image_repo }}
107-
DockerBuildArgs: ${{ inputs.docker_build_args }}
89+
dockerfile: ${{ github.workspace }}/${{ inputs.dockerfile_path }}
90+
image-name: ghcr.io/microsoft/onnxruntime/${{ inputs.docker_image_repo }}
91+
build-args: ${{ inputs.docker_build_args }}
92+
push: true
93+
azure-container-registry-name: onnxruntimebuildcache
10894
env:
10995
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
11096

@@ -117,9 +103,9 @@ jobs:
117103
# ------------- Update Step (CMake Generation) -------------
118104
- name: Generate Build Files (CMake) (${{ inputs.architecture }} / ${{ inputs.build_config }})
119105
id: update_step
120-
uses: ./.github/_downloaded_actions/run-build-script-in-docker
106+
uses: microsoft/onnxruntime-github-actions/run-build-script-in-docker@v0.0.5
121107
with:
122-
docker_image: ${{ inputs.docker_image_repo }}
108+
docker_image: ${{ steps.build_docker_image_step.outputs.full-image-name }}
123109
build_config: ${{ inputs.build_config }}
124110
mode: 'update'
125111
execution_providers: ${{ inputs.execution_providers }} # Pass down EP list
@@ -129,9 +115,9 @@ jobs:
129115
# ------------- Build Step (Compilation) -------------
130116
- name: Build ONNX Runtime (${{ inputs.architecture }} / ${{ inputs.build_config }})
131117
id: build_step
132-
uses: ./.github/_downloaded_actions/run-build-script-in-docker
118+
uses: microsoft/onnxruntime-github-actions/run-build-script-in-docker@v0.0.5
133119
with:
134-
docker_image: ${{ inputs.docker_image_repo }}
120+
docker_image: ${{ steps.build_docker_image_step.outputs.full-image-name }}
135121
build_config: ${{ inputs.build_config }}
136122
mode: 'build'
137123
execution_providers: ${{ inputs.execution_providers }} # Pass down EP list
@@ -142,9 +128,9 @@ jobs:
142128
- name: Test ONNX Runtime (${{ inputs.architecture }} / ${{ inputs.build_config }})
143129
id: test_step
144130
if: inputs.run_tests == true
145-
uses: ./.github/_downloaded_actions/run-build-script-in-docker
131+
uses: microsoft/onnxruntime-github-actions/run-build-script-in-docker@v0.0.5
146132
with:
147-
docker_image: ${{ inputs.docker_image_repo }}
133+
docker_image: ${{ steps.build_docker_image_step.outputs.full-image-name }}
148134
build_config: ${{ inputs.build_config }}
149135
mode: 'test'
150136
execution_providers: ${{ inputs.execution_providers }} # Pass down EP list

.github/workflows/windows_build_x64_asan.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ jobs:
4646
@echo off
4747
echo %PATH%
4848
python -m pip install -r "%GITHUB_WORKSPACE%\tools\ci_build/github/windows\python\requirements.txt"
49-
python "%GITHUB_WORKSPACE%\tools\ci_build\build.py" --config Debug --build_dir "%RUNNER_TEMP%\build" --skip_submodule_sync --parallel --use_vcpkg --use_vcpkg_ms_internal_asset_cache --cmake_generator "Visual Studio 17 2022" --disable_memleak_checker --enable_address_sanitizer
49+
python "%GITHUB_WORKSPACE%\tools\ci_build\build.py" --config Debug --build_dir "%RUNNER_TEMP%\build" --skip_submodule_sync --parallel --use_vcpkg --use_vcpkg_ms_internal_asset_cache --cmake_generator "Visual Studio 17 2022" --disable_memleak_checker --enable_address_sanitizer

.github/workflows/windows_dml.yml

-2
Original file line numberDiff line numberDiff line change
@@ -114,5 +114,3 @@ jobs:
114114
uses: ./.github/actions/install-onnxruntime-wheel
115115
with:
116116
whl-directory: ${{ runner.temp }}\build\RelWithDebInfo\RelWithDebInfo\dist
117-
118-

.github/workflows/windows_openvino.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
Remove-Item -Force $OutputPath
9797
9898
# Confirm success
99-
Write-Output "OpenVINO extracted to $ExtractPath"
99+
Write-Output "OpenVINO extracted to $ExtractPath"
100100
101101
- name: Set OpenVINORootDir
102102
shell: pwsh
@@ -143,7 +143,7 @@ jobs:
143143
144144
Write-Output "Selected environment variables exported successfully"
145145
146-
146+
147147
148148
- name: Generate onnxruntime.sln
149149
shell: pwsh
@@ -169,4 +169,4 @@ jobs:
169169
--build_shared_lib `
170170
--use_openvino CPU `
171171
--use_binskim_compliant_compile_flags `
172-
--test --enable_onnx_tests
172+
--test --enable_onnx_tests

.github/workflows/windows_tensorrt.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
working-directory: ${{ runner.temp }}
8080
run: |
8181
python ${{ github.workspace }}\tools\ci_build\build.py --config RelWithDebInfo --parallel --use_binskim_compliant_compile_flags --build_dir build --skip_submodule_sync --build_shared_lib --build --cmake_generator "Visual Studio 17 2022" --build_wheel --enable_onnx_tests --use_tensorrt --tensorrt_home="${{ runner.temp }}\TensorRT-10.8.0.43.Windows10.x86_64.cuda-12.8" --cuda_home="${{ runner.temp }}\v12.2" --use_vcpkg --use_vcpkg_ms_internal_asset_cache --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86
82-
shell: cmd
82+
shell: cmd
8383

8484
- name: Add build dir to PATH
8585
shell: powershell
@@ -95,7 +95,7 @@ jobs:
9595
- name: Run tests
9696
working-directory: ${{ runner.temp }}
9797
run: |
98-
mklink /D /J ${{ github.workspace }}\RelWithDebInfo\models ${{ github.workspace }}\models
98+
mklink /D /J ${{ github.workspace }}\RelWithDebInfo\models ${{ github.workspace }}\models
9999
python ${{ github.workspace }}\tools\ci_build\build.py --config RelWithDebInfo --parallel --use_binskim_compliant_compile_flags --build_dir build --skip_submodule_sync --build_shared_lib --test --cmake_generator "Visual Studio 17 2022" --build_wheel --enable_onnx_tests --use_tensorrt --tensorrt_home="${{ runner.temp }}\TensorRT-10.8.0.43.Windows10.x86_64.cuda-12.8" --cuda_home="${{ runner.temp }}\v12.2" --use_vcpkg --use_vcpkg_ms_internal_asset_cache --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86
100100
shell: cmd
101-
timeout-minutes: 180
101+
timeout-minutes: 180

0 commit comments

Comments
 (0)