Skip to content

Commit

Permalink
adding nightly to all cpu ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jchen351 committed Apr 10, 2024
1 parent e71c312 commit f8dd389
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 24 deletions.
27 changes: 20 additions & 7 deletions .github/workflows/linux-gpu-x64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ env:
ort_dir: "onnxruntime-linux-x64-gpu-1.17.1"
ort_zip: "onnxruntime-linux-x64-gpu-1.17.1.tgz"
ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.17.1/onnxruntime-linux-x64-gpu-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-gpu-x64-build:
Expand All @@ -18,18 +20,29 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
- name: Download OnnxRuntime
- name: Install jq and nuget
run: |
curl -L -o ${{ env.ort_zip }} ${{ env.ort_url }}
sudo apt-get install jq nuget
- name: Unzip OnnxRuntime
- name: Get the Latest OnnxRuntime Nightly Version
run: |
tar -xzf ${{ env.ort_zip }}
rm ${{ env.ort_zip }}
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: Search Nuget Source
run: |
nuget search "${{ env.ORT_NIGHTLY_PACKAGE_NAME }}" -Source "${{ env.ORT_NIGHTLY_SOURCE }}" -Verbosity detailed
- name: Download OnnxRuntime Nightly
run: |
nuget install "${{ env.ORT_NIGHTLY_PACKAGE_NAME }}" -version "${{ env.ORT_NIGHTLY_VERSION }}" -x -Source "${{ env.ORT_NIGHTLY_SOURCE }}"
- 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: Download Docker Image
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mac-cpu-arm64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
echo "$ORT_NIGHTLY_VERSION"
echo "ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" >> $GITHUB_ENV
- name: Download OnnxRuntime
- name: Download OnnxRuntime Nightly
run: |
nuget install ${{ env.ORT_NIGHTLY_PACKAGE_NAME }} -version ${{ env.ORT_NIGHTLY_VERSION }} -x
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/win-cpu-arm64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ env:
ort_zip: "$(ort_dir).zip"
ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.17.1/$(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_NIGHTLY_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime"

jobs:
windows-cpu-arm64-build:
Expand All @@ -31,19 +33,21 @@ jobs:
vs-version: '17.4'
msbuild-architecture: arm64

- name: Download OnnxRuntime
- name : Install jq and nuget
run: |
$env:ort_url = "https://github.com/microsoft/onnxruntime/releases/download/v1.17.1/onnxruntime-win-arm64-1.17.1.zip"
Invoke-WebRequest -Uri $env:ort_url -OutFile $env:ort_zip
choco install jq nuget.commandline
- name: Unzip OnnxRuntime
- name: Get the Latest OnnxRuntime Nightly Version
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"
echo "ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" >> $GITHUB_ENV
- name: Rename OnnxRuntime to ort
- name: Extra OnnxRuntime library and header files
run: |
Rename-Item -Path $env:ort_dir -NewName ort
mkdir -p ort/lib
mv ${{ env.ORT_NIGHTLY_PACKAGE_NAME }}/build/native/include ort/
mv ${{ env.ORT_NIGHTLY_PACKAGE_NAME }}/runtimes/win-arm64/native/* ort/lib/
- name: Configure CMake
run: |
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/win-cpu-x64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ env:
ort_zip: "$(ort_dir).zip"
ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.17.1/$(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_NIGHTLY_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime"

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

- name: Download OnnxRuntime
- name : Install jq and nuget
run: |
$env:ort_url = "https://github.com/microsoft/onnxruntime/releases/download/v1.17.1/onnxruntime-win-x64-1.17.1.zip"
Invoke-WebRequest -Uri $env:ort_url -OutFile $env:ort_zip
choco install jq nuget.commandline
- name: Unzip OnnxRuntime
- name: Get the Latest OnnxRuntime Nightly Version
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"
echo "ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" >> $GITHUB_ENV
- name: Rename OnnxRuntime to ort
- name: Extra OnnxRuntime library and header files
run: |
Rename-Item -Path $env:ort_dir -NewName ort
mkdir -p ort/lib
mv ${{ env.ORT_NIGHTLY_PACKAGE_NAME }}/build/native/include ort/
mv ${{ env.ORT_NIGHTLY_PACKAGE_NAME }}/runtimes/win-x64/native/* ort/lib/
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down

0 comments on commit f8dd389

Please sign in to comment.