-
Notifications
You must be signed in to change notification settings - Fork 127
51 lines (42 loc) · 1.53 KB
/
win-cpu-x64-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
on: [ workflow_dispatch, pull_request ]
env:
ort_dir: "onnxruntime-win-x64-1.16.3"
ort_zip: "$(ort_dir).zip"
ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.16.3/$(ort_zip)"
jobs:
job:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup Visual Studio 2022
uses: microsoft/[email protected]
with:
vs-version: '17.5'
- name: Download OnnxRuntime
run: |
$env:ort_url = "https://github.com/microsoft/onnxruntime/releases/download/v1.16.3/onnxruntime-win-x64-1.16.3.zip"
Invoke-WebRequest -Uri $env:ort_url -OutFile $env:ort_zip
- name: Unzip OnnxRuntime
run: |
Expand-Archive $env:ort_zip -DestinationPath .
Remove-Item -Path $env:ort_zip
- name: Rename OnnxRuntime to ort
run: |
Rename-Item -Path $env:ort_dir -NewName ort
- name: Git Submodule Update
run: |
git submodule update --init --recursive
- name: Build with CMake
run: |
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -A x64 .. -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release --parallel
- name: Verify Build Artifacts
run: |
Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\Release -Recurse
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: onnxruntime-genai-win-cpu-x64
path: build/Release/*