-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (49 loc) · 1.98 KB
/
windows_engine_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
52
53
54
55
56
57
58
59
60
name: 'Windows Build the Engine'
on:
workflow_run:
workflows: ["Windows Run CMake for the Engine"]
types:
- completed
concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-windows
cancel-in-progress: true
jobs:
on-success:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: 'master'
submodules: true # Checkout submodules
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Download ONNX Runtime
run: |
Invoke-WebRequest -Uri "https://github.com/microsoft/onnxruntime/releases/download/v1.17.1/onnxruntime-win-x64-1.17.1.zip" -OutFile "onnxruntime.zip"
shell: powershell
- name: Unzip ONNX Runtime
run: |
Expand-Archive -Path onnxruntime.zip -DestinationPath onnxruntime
shell: powershell
- name: Get Root Directory
run: |
$rootDir = Get-ChildItem -Path onnxruntime -Directory | Select-Object -First 1 -ExpandProperty FullName
echo "Root directory of the unzipped file is: $rootDir"
echo "ONNXRUNTIME_ROOTDIR=$rootDir" >> $env:GITHUB_ENV
shell: powershell
- name: Run CMake
run: |
cmake -S . -B .build/ -G "Visual Studio 17 2022" -DSAM_STATIC_ANN_ONNX_MODELPATH="dummy.onnx" -DSAM_STATIC_ANN_STANDARDIZE_PARAMS="dummy.pkl" -DSAM_STATIC_CNN_COLORMAP="dummy.npy" -DSAM_ONNXRUNTIME_ROOTDIR="${{ env.ONNXRUNTIME_ROOTDIR }}" -DSAM_STATIC_CNN_ONNX_MODELPATH="dummy.onnx" -DSAM_DYNAMIC_CNN_BIGRU_ONNX_MODELPATH="dummy.onnx" -DSAM_BUILD_TESTS=ON -DSAM_BUILD_CLI_TOOLS=ON -DSAM_LINK_CONSOLE=OFF
shell: powershell
- name: Build the Engine
run: |
cmake --build .build/ --config Debug
shell: powershell
on-failure:
runs-on: windows-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo "The prerequisite workflows failed!"