Windows Build the Engine #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!" | |