Skip to content

Commit

Permalink
Bump 1.16.0 (#7)
Browse files Browse the repository at this point in the history
* 1.16.0

* Fix

* Update build.yml

* Fix

* Update .gitignore

* Update Build-Windows.ps1

* Update Build-Windows.ps1

* Update build.yml
  • Loading branch information
umireon authored Sep 22, 2023
1 parent 4b5335b commit d57e97e
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 100 deletions.
62 changes: 26 additions & 36 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,64 +5,54 @@ on:
branches:
- "main"
tags:
- '*'
- "*"
pull_request:
branches:
- "main"

jobs:
Build:
runs-on: "windows-latest"
BuildWindows:
runs-on: "windows-2022"

strategy:
matrix:
config:
- "Release"

steps:
- uses: "actions/checkout@v3"
with:
submodules: "recursive"

- name: "Run Build.ps1"
run: "./Build.ps1"
- name: "Run Build-Windows.ps1"
run: "./Build-Windows.ps1 -Configuration ${{ matrix.config }}"

- uses: "actions/upload-artifact@v3"
with:
name: "onnxruntime-static-win"
path: "onnxruntime-static-win.zip"
name: "onnxruntime-win-${{ matrix.config }}"
path: "release/onnxruntime-windows-${{ matrix.config }}.zip"

Release:
runs-on: ubuntu-22.04
runs-on: "ubuntu-22.04"
if: "github.event_name == 'push' && contains(github.ref, 'refs/tags/')"
needs: [Build]
defaults:
run:
shell: bash
needs:
- "BuildWindows"
permissions:
contents: write
contents: "write"
steps:
- name: Get Metadata
id: metadata
- name: "Get Metadata"
id: "metadata"
run: |
## METADATA SCRIPT
echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Download build artifacts
uses: actions/download-artifact@v3

- name: Generate Checksums
run: |
## CHECKSUM GENERATION SCRIPT
shopt -s extglob
echo "### Checksums" > ${{ github.workspace }}/CHECKSUMS.txt
for file in ${{ github.workspace }}/**/@(*.pkg|*.exe|*.deb|*.zip); do
echo " ${file##*/}: $(sha256sum "${file}" | cut -d " " -f 1)" >> ${{ github.workspace }}/CHECKSUMS.txt
done
- name: "Download build artifacts"
uses: "actions/download-artifact@v3"

- name: Create Release
id: create_release
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5
- name: "Create Release"
uses: "softprops/action-gh-release@v1"
with:
draft: false
prerelease: ${{ contains(steps.metadata.outputs.version, 'rc') || contains(steps.metadata.outputs.version, 'beta') }}
tag_name: ${{ steps.metadata.outputs.version }}
name: "${{ env.PLUGIN_NAME }} ${{ steps.metadata.outputs.version }}"
body_path: ${{ github.workspace }}/CHECKSUMS.txt
draft: true
tag_name: "${{ steps.metadata.outputs.version }}"
name: "${{ steps.metadata.outputs.version }}"
files: |
${{ github.workspace }}/**/*.zip
${{ github.workspace }}/**/*.zip
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
build
prefix
release
*.zip
66 changes: 66 additions & 0 deletions Build-Windows.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
Param($Configuration)

if (Test-Path release) {
Remove-Item release -Recurse -Force
}
New-Item release\$Configuration\bin -ItemType Directory -Force
New-Item release\$Configuration\include -ItemType Directory -Force
New-Item release\$Configuration\lib -ItemType Directory -Force

python onnxruntime\tools\ci_build\build.py --cmake_generator "Visual Studio 17 2022" --build_dir build --config $Configuration --parallel --skip_tests --skip_submodule_sync --use_dml

$binArray =
"build\packages\Microsoft.AI.DirectML.1.12.1\bin\x64-win\DirectML.dll",
"build\packages\Microsoft.AI.DirectML.1.12.1\bin\x64-win\DirectML.lib"

$includeArray =
"onnxruntime\include\onnxruntime\core\framework\provider_options.h",
"onnxruntime\include\onnxruntime\core\providers\cpu\cpu_provider_factory.h",
"onnxruntime\include\onnxruntime\core\providers\dml\dml_provider_factory.h",
"onnxruntime\include\onnxruntime\core\session\onnxruntime_c_api.h",
"onnxruntime\include\onnxruntime\core\session\onnxruntime_cxx_api.h",
"onnxruntime\include\onnxruntime\core\session\onnxruntime_cxx_inline.h",
"onnxruntime\include\onnxruntime\core\session\onnxruntime_float16.h",
"onnxruntime\include\onnxruntime\core\session\onnxruntime_run_options_config_keys.h",
"onnxruntime\include\onnxruntime\core\session\onnxruntime_session_options_config_keys.h"

$libArray =
"build\$Configuration\_deps\abseil_cpp-build\absl\base\$Configuration\absl_throw_delegate.lib",
"build\$Configuration\_deps\abseil_cpp-build\absl\container\$Configuration\absl_raw_hash_set.lib",
"build\$Configuration\_deps\abseil_cpp-build\absl\hash\$Configuration\absl_city.lib",
"build\$Configuration\_deps\abseil_cpp-build\absl\hash\$Configuration\absl_hash.lib",
"build\$Configuration\_deps\abseil_cpp-build\absl\hash\$Configuration\absl_low_level_hash.lib",
"build\$Configuration\_deps\onnx-build\$Configuration\onnx_proto.lib",
"build\$Configuration\_deps\onnx-build\$Configuration\onnx.lib",
"build\$Configuration\_deps\re2-build\$Configuration\re2.lib",
"build\$Configuration\$Configuration\onnxruntime_common.lib",
"build\$Configuration\$Configuration\onnxruntime_flatbuffers.lib",
"build\$Configuration\$Configuration\onnxruntime_framework.lib",
"build\$Configuration\$Configuration\onnxruntime_graph.lib",
"build\$Configuration\$Configuration\onnxruntime_mlas.lib",
"build\$Configuration\$Configuration\onnxruntime_optimizer.lib",
"build\$Configuration\$Configuration\onnxruntime_providers_dml.lib",
"build\$Configuration\$Configuration\onnxruntime_providers_shared.lib",
"build\$Configuration\$Configuration\onnxruntime_providers.lib",
"build\$Configuration\$Configuration\onnxruntime_session.lib",
"build\$Configuration\$Configuration\onnxruntime_util.lib"

if ($Configuration -eq "Debug") {
$libArray += "build\Debug\_deps\protobuf-build\Debug\libprotobuf-lited.lib"
} else {
$libArray += "build\Release\_deps\protobuf-build\Release\libprotobuf-lite.lib"
}

foreach ($bin in $binArray) {
Copy-Item $bin release\$Configuration\bin -Verbose
}

foreach ($include in $includeArray) {
Copy-Item $include release\$Configuration\include -Verbose
}

foreach ($lib in $libArray) {
Copy-Item $lib release\$Configuration\lib -Verbose
}

Compress-Archive release\$Configuration\* release\onnxruntime-windows-$Configuration.zip -Verbose
62 changes: 0 additions & 62 deletions Build.ps1

This file was deleted.

2 changes: 1 addition & 1 deletion onnxruntime
Submodule onnxruntime updated 2539 files

0 comments on commit d57e97e

Please sign in to comment.