Skip to content

Commit

Permalink
Build with windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jchen351 committed Jan 19, 2024
1 parent 55be208 commit e818af7
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/win-cpu-build.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,43 @@
on: [ workflow_dispatch, push, pull_request]
on: [ workflow_dispatch, push, 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/onnxruntime-win-x64-1.16.3.zip"
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/onnxruntime-win-x64-1.16.3.zip"

jobs:
job:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2

- name: set up Visual Studio 2022
uses: microsoft/[email protected]
with:
vs-version: '17.5'
cmake-version: '3.26'

- 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
Get-ChildItem -Path $env:GITHUB_WORKSPACE
- name: Rename OnnxRuntime to ort
run: |
Rename-Item -Path $env:ort_dir -NewName ort
Get-ChildItem -Path $env:GITHUB_WORKSPACE -Recurse
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 -DORT_ROOT=$env:GITHUB_WORKSPACE\ort ..
cmake --build . --config Release
Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\Release -Filter *.dll -Recurse

0 comments on commit e818af7

Please sign in to comment.