From f9f3e1f6a6c34bafce41e522630fe23f0b27ad23 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Wed, 10 Apr 2024 00:14:58 -0400 Subject: [PATCH] Use ort-nightly build for genai gha ci --- .github/workflows/linux-cpu-x64-build.yml | 24 +++++++++++------------ nuget.config | 13 ++++++++++++ 2 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 nuget.config diff --git a/.github/workflows/linux-cpu-x64-build.yml b/.github/workflows/linux-cpu-x64-build.yml index da202e19c..1fd782cf8 100644 --- a/.github/workflows/linux-cpu-x64-build.yml +++ b/.github/workflows/linux-cpu-x64-build.yml @@ -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" ] @@ -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: | diff --git a/nuget.config b/nuget.config new file mode 100644 index 000000000..e8e6868ca --- /dev/null +++ b/nuget.config @@ -0,0 +1,13 @@ + + + + + + + ni + + + + + + \ No newline at end of file