Skip to content

Commit

Permalink
Use ort-nightly build for genai gha ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jchen351 committed Apr 10, 2024
1 parent bc503fb commit f9f3e1f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/linux-cpu-x64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
ort_dir: "onnxruntime-linux-x64-1.17.1"
ort_zip: "onnxruntime-linux-x64-1.17.1.tgz"
ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.17.1/onnxruntime-linux-x64-1.17.1.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_NIGHTLY_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime"
jobs:
linux_cpu_x64:
runs-on: [ "self-hosted", "1ES.Pool=onnxruntime-genai-Ubuntu2204-AMD-CPU" ]
Expand All @@ -16,19 +14,21 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true

- 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].version')
echo "$ORT_NIGHTLY_VERSION"
echo "ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" >> $GITHUB_ENV
- name: Unzip OnnxRuntime
- name: Download OnnxRuntime
run: |
tar -xzf ${{ env.ort_zip }}
rm ${{ env.ort_zip }}
nuget install ${{ env.ORT_NIGHTLY_PACKAGE_NAME }} --version ${{ env.ORT_NIGHTLY_VERSION }} -x
- name: Rename OnnxRuntime to ort
- name: Extra OnnxRuntime library and header files
run: |
mv ${{ env.ort_dir }} ort
mkdir -p ort/lib
mv ${{ env.ORT_NIGHTLY_PACKAGE_NAME }}/build/native/include ort/
mv ${{ env.ORT_NIGHTLY_PACKAGE_NAME }}/runtimes/linux-x64/native/* ort/lib/
- name: Build with CMake and GCC
run: |
Expand Down
13 changes: 13 additions & 0 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
<packageSources>
<clear />ni
<add key="ORT-Nightly" value="https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/nuget/v3/index.json" />
</packageSources>
<disabledPackageSources>
<clear />
</disabledPackageSources>
</configuration>

0 comments on commit f9f3e1f

Please sign in to comment.