Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ort-nightly build for genai gha ci #256

Merged
merged 71 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
f9f3e1f
Use ort-nightly build for genai gha ci
jchen351 Apr 10, 2024
ccddc14
Install jq tool
jchen351 Apr 10, 2024
6eb088a
"${{ env.ORT_NIGHTLY_REST_API }}"
jchen351 Apr 10, 2024
88617f7
Update the mac to using ort nightly
jchen351 Apr 10, 2024
640cec8
Update the mac to using ort nightly
jchen351 Apr 10, 2024
7cd2499
--version to -version
jchen351 Apr 10, 2024
4c939e9
update nuget.config
jchen351 Apr 10, 2024
871b3cc
-configFile
jchen351 Apr 10, 2024
12b3cfd
using source instead of
jchen351 Apr 10, 2024
52a095d
Microsoft.ML.OnnxRuntime
jchen351 Apr 10, 2024
e71c312
search source Microsoft.ML.OnnxRuntime
jchen351 Apr 10, 2024
f8dd389
adding nightly to all cpu ci
jchen351 Apr 10, 2024
35c9eeb
adding nightly to linux gpu x64
jchen351 Apr 10, 2024
7b54fde
disable nuget search
jchen351 Apr 10, 2024
8a72bff
-y
jchen351 Apr 10, 2024
d3a2c0a
dotnet
jchen351 Apr 10, 2024
0204f4f
curl
jchen351 Apr 10, 2024
a53f3e8
shell: bash
jchen351 Apr 10, 2024
1edfa25
continue-on-error: true
jchen351 Apr 10, 2024
0edea36
continue-on-error: true
jchen351 Apr 10, 2024
b944951
--package-directory ${{ env.ORT_NIGHTLY_PACKAGE_NAME }}
jchen351 Apr 10, 2024
cba16d3
.
jchen351 Apr 10, 2024
ccef482
rolling back to main
jchen351 Apr 10, 2024
8df7326
NonInteractive
jchen351 Apr 10, 2024
a43029f
NonInteractive
jchen351 Apr 10, 2024
0f18932
to lower@L
jchen351 Apr 10, 2024
9315bac
to lower@L
jchen351 Apr 10, 2024
1ef8525
Merge branch 'refs/heads/main' into Cjian/gha-ort-nightlhy
jchen351 Apr 19, 2024
436aab4
Unix Makefiles
jchen351 Apr 19, 2024
c05cf82
adding * to m
jchen351 Apr 19, 2024
3ba7faa
"ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" | Out-File -FilePa…
jchen351 Apr 19, 2024
bff082c
buildtransitive
jchen351 Apr 19, 2024
7a71f35
buildTransitive
jchen351 Apr 19, 2024
09e5b3b
buildTransitive
jchen351 Apr 20, 2024
22ebbb7
Merge branch 'refs/heads/main' into Cjian/gha-ort-nightlhy
jchen351 Apr 21, 2024
be08ca7
buildTransitive
jchen351 Apr 21, 2024
07279fc
add nuget.config
jchen351 Apr 21, 2024
9a0674b
allow nuget.org
jchen351 Apr 21, 2024
71213b0
${{ env.ORT_NIGHTLY_VERSION }}
jchen351 Apr 21, 2024
7272ac2
libonnxruntime
jchen351 Apr 21, 2024
49d0994
https://api.nuget.org/v3/index.json
jchen351 Apr 21, 2024
741499a
using sln file instead of
jchen351 Apr 21, 2024
35f88b0
ORT_NIGHTLY_PACKAGE_NAME
jchen351 Apr 21, 2024
020f06c
ORT_NIGHTLY_PACKAGE_NAME
jchen351 Apr 21, 2024
8f46580
ls -R test/csharp
jchen351 Apr 21, 2024
0ada328
RestoreSources
jchen351 Apr 21, 2024
7bd6649
Merge branch 'refs/heads/main' into Cjian/gha-ort-nightlhy
jchen351 Apr 21, 2024
d2b4248
try nuget again
jchen351 Apr 21, 2024
cfc0f69
try nuget with mono
jchen351 Apr 21, 2024
8fbae59
update nuget.exe env
jchen351 Apr 21, 2024
2741c6d
remove * after so
jchen351 Apr 22, 2024
c630039
remove * after so
jchen351 Apr 22, 2024
258dc20
remove * after so
jchen351 Apr 22, 2024
751804b
remove * after so
jchen351 Apr 22, 2024
551b634
target linker option
jchen351 Apr 23, 2024
8545ddc
Merge branch 'refs/heads/main' into Cjian/gha-ort-nightlhy
jchen351 Apr 23, 2024
92e71c1
target linker option
jchen351 Apr 23, 2024
4cd8c03
ort_version=$(echo ${{ env.ORT_NIGHTLY_VERSION }} | cut -d. -f1-2)
jchen351 Apr 23, 2024
eec4afa
ort_version=$(echo ${{ env.ORT_NIGHTLY_VERSION }} | cut -d-…
jchen351 Apr 23, 2024
819ca36
libonnxruntime.so
jchen351 Apr 23, 2024
4b861fc
set_property(TARGET python APPEND_STRING PROPERTY LINK_FLAGS " -Xli…
jchen351 Apr 23, 2024
5c58c0b
Merge branch 'refs/heads/main' into Cjian/gha-ort-nightlhy
jchen351 Apr 26, 2024
270b2d0
Merge branch 'refs/heads/main' into Cjian/gha-ort-nightlhy
jchen351 Apr 28, 2024
3cf4c01
Revert some changes.
jchen351 Apr 28, 2024
dc04b39
try nuget/setup-nuget
jchen351 Apr 30, 2024
37e650c
undo mono
jchen351 Apr 30, 2024
07775bd
adding <add key="nuget.org" value="https://api.nuget.org/v3/index.jso…
jchen351 Apr 30, 2024
e3d9974
adding <add key="nuget.org" value="https://api.nuget.org/v3/index.jso…
jchen351 Apr 30, 2024
e40d24a
Merge remote-tracking branch 'refs/remotes/origin/main' into Cjian/gh…
jchen351 Apr 30, 2024
1977ac7
adding <add key="nuget.org" value="https://api.nuget.org/v3/index.jso…
jchen351 Apr 30, 2024
51c7e1c
- name: Build the C# API and Run the C# Tests
jchen351 Apr 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 41 additions & 11 deletions .github/workflows/linux-cpu-x64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
ort_dir: "onnxruntime-linux-x64-1.17.3"
ort_zip: "onnxruntime-linux-x64-1.17.3.tgz"
ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.17.3/onnxruntime-linux-x64-1.17.3.tgz"

ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime&api-version=6.0-preview.1"
ORT_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime"
ORT_NIGHTLY_SOURCE: "https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/nuget/v3/index.json"
NUGET_EXE: "mono /usr/local/bin/nuget.exe"
jobs:
linux_cpu_x64:
runs-on: [ "self-hosted", "1ES.Pool=onnxruntime-genai-Ubuntu2204-AMD-CPU" ]
Expand All @@ -16,19 +16,49 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
- name: install Mono and Nuget
run: |
sudo apt install ca-certificates gnupg
sudo gpg --homedir /tmp --no-default-keyring --keyring /usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install -y mono-devel
sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
sudo chmod +x /usr/local/bin/nuget.exe

- name: Install jq and dotnet
run: |
wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update && sudo apt-get install -y dotnet-sdk-8.0 jq

- name: Download OnnxRuntime
- name: Get the Latest OnnxRuntime Nightly Version
run: |
curl -L -o ${{ env.ort_zip }} ${{ env.ort_url }}
ORT_NIGHTLY_VERSION=$(curl -s "${{ env.ORT_NIGHTLY_REST_API }}" | jq -r '.value[0].versions[0].normalizedVersion')
echo "$ORT_NIGHTLY_VERSION"
echo "ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" >> $GITHUB_ENV

- name: Unzip OnnxRuntime
- name: Download OnnxRuntime Nightly
run: |
tar -xzf ${{ env.ort_zip }}
rm ${{ env.ort_zip }}
${{ env.NUGET_EXE }} install ${{ env.ORT_PACKAGE_NAME }} -version ${{ env.ORT_NIGHTLY_VERSION }} -x
continue-on-error: true

- name: list files
shell: bash
run: |
ls -l
ls -R ${{ env.ORT_PACKAGE_NAME }}
continue-on-error: true

- name: Rename OnnxRuntime to ort
# TODO: Find out why do we need to to have libonnxruntime.so.$ort_version
- name: Extra OnnxRuntime library and header files
run: |
mv ${{ env.ort_dir }} ort
mkdir -p ort/lib
mv ${{ env.ORT_PACKAGE_NAME }}/build/native/include ort/
mv ${{ env.ORT_PACKAGE_NAME }}/runtimes/linux-x64/native/* ort/lib/
ort_version=$(echo ${{ env.ORT_NIGHTLY_VERSION }} | cut -d- -f1-1)
cp ort/lib/libonnxruntime.so ort/lib/libonnxruntime.so.$ort_version

- name: Build with CMake and GCC
run: |
Expand Down
52 changes: 42 additions & 10 deletions .github/workflows/linux-gpu-x64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ concurrency:
cancel-in-progress: true

env:
ort_dir: "onnxruntime-linux-x64-gpu-1.17.3"
ort_zip: "onnxruntime-linux-x64-gpu-1.17.3.tgz"
ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.17.3/onnxruntime-linux-x64-gpu-1.17.3.tgz"
ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime.Gpu.Linux&api-version=6.0-preview.1"
ORT_PACKAGE_NAME: Microsoft.ML.OnnxRuntime.Gpu.Linux
ORT_NIGHTLY_SOURCE: "https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/nuget/v3/index.json"
NUGET_EXE: "mono /usr/local/bin/nuget.exe"


jobs:
linux-cuda-x64-build:
Expand All @@ -29,19 +31,49 @@ jobs:
clean: true
path: manylinux
submodules: true
- name: install Mono and Nuget
run: |
sudo apt install ca-certificates gnupg
sudo gpg --homedir /tmp --no-default-keyring --keyring /usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install -y mono-devel
sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
sudo chmod +x /usr/local/bin/nuget.exe

- name: Install jq and dotnet
run: |
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update && sudo apt-get install -y dotnet-sdk-8.0 jq

- name: Download OnnxRuntime
run: |
curl -L -o ${{ env.ort_zip }} ${{ env.ort_url }}
ORT_NIGHTLY_VERSION=$(curl -s "${{ env.ORT_NIGHTLY_REST_API }}" | jq -r '.value[0].versions[0].normalizedVersion')
echo "$ORT_NIGHTLY_VERSION"
echo "ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" >> $GITHUB_ENV

- name: Unzip OnnxRuntime
- name: Download OnnxRuntime Nightly
run: |
mono /usr/local/bin/nuget.exe install ${{ env.ORT_PACKAGE_NAME }} -version ${{ env.ORT_NIGHTLY_VERSION }} -x
continue-on-error: true
- name: list files
shell: bash
run: |
tar -xzf ${{ env.ort_zip }}
rm ${{ env.ort_zip }}
ls -l
ls -R ${{ env.ORT_PACKAGE_NAME }}
continue-on-error: true

- name: Rename OnnxRuntime to ort
# TODO: Find out why do we need to to have libonnxruntime.so.$ort_version
- name: Extra OnnxRuntime library and header files
run: |
mv ${{ env.ort_dir }} ort
mkdir -p ort/lib
mv ${{ env.ORT_PACKAGE_NAME }}/buildTransitive/native/include ort/
mv ${{ env.ORT_PACKAGE_NAME }}/runtimes/linux-x64/native/* ort/lib/
ort_version=$(echo ${{ env.ORT_NIGHTLY_VERSION }} | cut -d- -f1-1)
cp ort/lib/libonnxruntime.so ort/lib/libonnxruntime.so.$ort_version


- name: Get Docker Image
run: |
Expand Down Expand Up @@ -78,7 +110,7 @@ jobs:
--volume $GITHUB_WORKSPACE:/ort_genai_src \
-w /ort_genai_src onnxruntimecudabuildx64 \
bash -c " \
/usr/bin/cmake --build --preset linux_gcc_cuda_release --parallel $( nproc )"
/usr/bin/cmake --build --preset linux_gcc_cuda_release"

- name: Get HuggingFace Token
run: |
Expand Down
26 changes: 12 additions & 14 deletions .github/workflows/mac-cpu-arm64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
ort_dir: "onnxruntime-osx-arm64-1.17.3"
ort_zip: "onnxruntime-osx-arm64-1.17.3.tgz"
ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.17.3/onnxruntime-osx-arm64-1.17.3.tgz"
ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime&api-version=6.0-preview.1"
ORT_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime"
jobs:
mac-cpu-arm64-build:
runs-on: macos-latest
Expand All @@ -16,22 +15,21 @@ jobs:
with:
submodules: true

- name: Install ninja
- name: Get the Latest OnnxRuntime Nightly Version
run: |
brew install ninja

- name: Download OnnxRuntime
ORT_NIGHTLY_VERSION=$(curl -s "${{ env.ORT_NIGHTLY_REST_API }}" | jq -r '.value[0].versions[0].normalizedVersion')
echo "$ORT_NIGHTLY_VERSION"
echo "ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" >> $GITHUB_ENV
- name: Download OnnxRuntime Nightly
run: |
curl -L -o ${{ env.ort_zip }} ${{ env.ort_url }}
nuget install ${{ env.ORT_PACKAGE_NAME }} -version ${{ env.ORT_NIGHTLY_VERSION }} -x

- name: Unzip OnnxRuntime
- name: Extra OnnxRuntime library and header files
run: |
tar -xzf ${{ env.ort_zip }}
rm ${{ env.ort_zip }}
mkdir -p ort/lib
mv ${{ env.ORT_PACKAGE_NAME }}/build/native/include ort/
mv ${{ env.ORT_PACKAGE_NAME }}/runtimes/osx-arm64/native/* ort/lib/

- name: Rename OnnxRuntime to ort
run: |
mv ${{ env.ort_dir }} ort

- name: Configure CMake
run: |
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/win-cpu-arm64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ jobs:
run: |
cmake --build --preset windows_arm64_cpu_release --parallel

- name: Build the C# API and Run the C# Tests
run: |
cd test\csharp
dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release"

- name: Install the Python Wheel and Test Dependencies
run: |
python -m pip install (Get-ChildItem ("$env:binaryDir\wheel\*.whl"))
Expand All @@ -62,10 +67,7 @@ jobs:
run: |
python test/python/test_onnxruntime_genai.py --cwd "test\python" --test_models "test\test_models"

- name: Build the C# API and Run the C# Tests
run: |
cd test\csharp
dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release"


- name: Verify Build Artifacts
if: always()
Expand Down
44 changes: 29 additions & 15 deletions .github/workflows/win-cpu-x64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
ort_dir: "onnxruntime-win-x64-1.17.3"
ort_zip: "$(ort_dir).zip"
ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.17.3/$(ort_zip)"
binaryDir: 'build/cpu'
ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime&api-version=6.0-preview.1"
ORT_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime"

jobs:
windows-cpu-x64-build:
Expand All @@ -33,19 +32,32 @@ jobs:
with:
vs-version: '17.5'

- name: Download OnnxRuntime
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'

- name : Install jq and nuget
run: |
$env:ort_url = "https://github.com/microsoft/onnxruntime/releases/download/v1.17.3/onnxruntime-win-x64-1.17.3.zip"
Invoke-WebRequest -Uri $env:ort_url -OutFile $env:ort_zip
choco install -y jq curl

- name: Unzip OnnxRuntime
- name: Get the Latest OnnxRuntime Nightly Version
shell: pwsh
run: |
Expand-Archive $env:ort_zip -DestinationPath .
Remove-Item -Path $env:ort_zip
$ORT_NIGHTLY_VERSION = $(curl -s "${{ env.ORT_NIGHTLY_REST_API }}" | jq -r '.value[0].versions[0].normalizedVersion')
echo "$ORT_NIGHTLY_VERSION"
"ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Download OnnxRuntime Nightly
run: |
nuget install ${{ env.ORT_PACKAGE_NAME }} -version ${{ env.ORT_NIGHTLY_VERSION }} -x -NonInteractive

- run: Get-ChildItem ${{ env.ORT_PACKAGE_NAME }} -Recurse
continue-on-error: true

- name: Rename OnnxRuntime to ort
- name: Extra OnnxRuntime library and header files
run: |
Rename-Item -Path $env:ort_dir -NewName ort
mkdir ort/lib
move ${{ env.ORT_PACKAGE_NAME }}/build/native/include ort/
move ${{ env.ORT_PACKAGE_NAME }}/runtimes/win-x64/native/* ort/lib/

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand All @@ -60,6 +72,11 @@ jobs:
run: |
cmake --build --preset windows_x64_cpu_release --parallel

- name: Build the C# API and Run the C# Tests
run: |
cd test\csharp
dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release"

- name: Install the python wheel and test dependencies
run: |
python -m pip install (Get-ChildItem ("$env:binaryDir\wheel\*.whl"))
Expand All @@ -76,10 +93,7 @@ jobs:
run: |
python test/python/test_onnxruntime_genai.py --cwd "test\python" --test_models "test\test_models"

- name: Build the C# API and Run the C# Tests
run: |
cd test\csharp
dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release"


- name: Verify Build Artifacts
if: always()
Expand Down
44 changes: 29 additions & 15 deletions .github/workflows/win-cuda-x64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ concurrency:
env:
AZCOPY_AUTO_LOGIN_TYPE: MSI
AZCOPY_MSI_CLIENT_ID: 63b63039-6328-442f-954b-5a64d124e5b4
ort_dir: "onnxruntime-win-x64-gpu-1.17.3"
ort_zip: "onnxruntime-win-x64-gpu-1.17.3.zip"
ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.17.3/onnxruntime-win-x64-gpu-1.17.3.zip"
cuda_dir: "${{ github.workspace }}\\cuda_sdk"
cuda_version: "11.8"
CUDA_PATH: ${{ github.workspace }}\\cuda_sdk\\v11.8
binaryDir: 'build/cuda'

ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime.Gpu.Windows&api-version=6.0-preview.1"
ORT_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime.Gpu.Windows"

jobs:
windows-cuda-x64-build:
Expand All @@ -35,17 +33,32 @@ jobs:
run: |
azcopy.exe cp --recursive "https://lotusscus.blob.core.windows.net/models/cuda_sdk/v${{ env.cuda_version }}" ${{ env.cuda_dir}}

- name: Download OnnxRuntime
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'

- name : Install jq and curl
run: |
Invoke-WebRequest -Uri $env:ort_url -OutFile $env:ort_zip
choco install -y jq curl

- name: Unzip OnnxRuntime
- name: Get the Latest OnnxRuntime Nightly Version
shell: pwsh
run: |
$ORT_NIGHTLY_VERSION=$(curl -s "${{ env.ORT_NIGHTLY_REST_API }}" | jq -r '.value[0].versions[0].normalizedVersion')
echo "$ORT_NIGHTLY_VERSION"
"ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Download OnnxRuntime Nightly
run: |
Expand-Archive $env:ort_zip -DestinationPath .
Remove-Item -Path $env:ort_zip
- name: Rename OnnxRuntime to ort
nuget install ${{ env.ORT_PACKAGE_NAME }} -version ${{ env.ORT_NIGHTLY_VERSION }} -ExcludeVersion -NonInteractive

- run: Get-ChildItem ${{ env.ORT_PACKAGE_NAME }} -Recurse
continue-on-error: true

- name: Extra OnnxRuntime library and header files
run: |
Rename-Item -Path $env:ort_dir -NewName ort
mkdir ort/lib
move ${{ env.ORT_PACKAGE_NAME }}/buildTransitive/native/include ort/
move ${{ env.ORT_PACKAGE_NAME }}/runtimes/win-x64/native/* ort/lib/

- name: Configure CMake
run: |
Expand All @@ -59,6 +72,11 @@ jobs:
run: |
echo "${{ env.cuda_dir }}\\v${{ env.cuda_version }}\\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Build the C# API and Run the C# Tests
run: |
cd test\csharp
dotnet test /p:Configuration=release /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release"

- name: Install the Python Wheel and Test Dependencies
run: |
python -m pip install (Get-ChildItem ("$env:binaryDir\wheel\*.whl"))
Expand All @@ -75,10 +93,6 @@ jobs:
run: |
python test/python/test_onnxruntime_genai.py --cwd "test\python" --test_models "test\test_models"

- name: Build the C# API and Run the C# Tests
run: |
cd test\csharp
dotnet test /p:Configuration=release /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release"

- name: Verify Build Artifacts
if: always()
Expand Down
2 changes: 1 addition & 1 deletion cmake/presets/CMakeMacOSConfigPresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"configurePresets": [
{
"name": "macos_default",
"generator": "Ninja",
"generator": "Unix Makefiles",
"binaryDir": "${sourceDir}/build/cpu",
"cacheVariables": {
"CMAKE_POSITION_INDEPENDENT_CODE": "ON",
Expand Down
Loading
Loading