-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa83c3a
commit 881b5b5
Showing
5 changed files
with
3,065 additions
and
4,411 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: C++ CI Workflow | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
# * is a special character in YAML so you have to quote this string | ||
# Execute a "nightly" build at 2 AM UTC | ||
- cron: '0 2 * * *' | ||
|
||
jobs: | ||
build: | ||
name: '[${{ matrix.os }}@conda]' | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
build_type: [Release] | ||
os: [ubuntu-latest, windows-2019, macos-latest] | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install pixi [Linux&macOS] | ||
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu') | ||
shell: bash -l {0} | ||
run: | | ||
curl -fsSL https://raw.githubusercontent.com/prefix-dev/pixi/main/install/install.sh | bash | ||
echo "$HOME/.pixi/bin" >> $GITHUB_PATH | ||
- name: Install pixi [Windows] | ||
if: contains(matrix.os, 'windows') | ||
shell: pwsh | ||
run: | | ||
iwr -useb https://raw.githubusercontent.com/prefix-dev/pixi/main/install/install.ps1 | iex | ||
"$env:LOCALAPPDATA\pixi\bin" >> $env:GITHUB_PATH | ||
- name: Build | ||
shell: bash -l {0} | ||
run: | | ||
# As of pixi 0.0.5 the dependency does not work nicely | ||
pixi run build | ||
- name: Run | ||
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu') | ||
run: | | ||
# pixi run onnx-cpp-benchmark --help | ||
# manually running onnx-cpp-benchmark as a workaround for https://github.com/prefix-dev/pixi/issues/157 | ||
./.build/onnx-cpp-benchmark --help | ||
# Workaround for https://github.com/prefix-dev/pixi/issues/157 | ||
- name: Setup for Run | ||
if: contains(matrix.os, 'windows') | ||
run: | | ||
"D:\a\onnx-cpp-benchmark\onnx-cpp-benchmark\.pixi\env\Library\bin" >> $env:GITHUB_PATH | ||
- name: Run | ||
if: contains(matrix.os, 'windows') | ||
run: | | ||
cd .build | ||
.\onnx-cpp-benchmark --help |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# SPDX-FileCopyrightText: 2023 Giulio Romualdi | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
#[=======================================================================[.rst: | ||
Findonnxruntime | ||
----------- | ||
|
||
The following imported targets are created: | ||
|
||
onnxruntime::onnxruntime | ||
|
||
#]=======================================================================] | ||
|
||
include(FindPackageHandleStandardArgs) | ||
|
||
find_path(onnxruntime_INCLUDE_DIR | ||
NAMES onnxruntime_cxx_api.h | ||
PATH_SUFFIXES onnxruntime/core/session) | ||
mark_as_advanced(onnxruntime_INCLUDE_DIR) | ||
find_library(onnxruntime_LIBRARY | ||
NAMES onnxruntime onnxruntime_conda) | ||
mark_as_advanced(onnxruntime_LIBRARY) | ||
|
||
find_package_handle_standard_args(onnxruntime DEFAULT_MSG onnxruntime_INCLUDE_DIR onnxruntime_LIBRARY) | ||
|
||
if(onnxruntime_FOUND) | ||
if(NOT TARGET onnxruntime::onnxruntime) | ||
add_library(onnxruntime::onnxruntime UNKNOWN IMPORTED) | ||
set_target_properties(onnxruntime::onnxruntime PROPERTIES | ||
INTERFACE_INCLUDE_DIRECTORIES "${onnxruntime_INCLUDE_DIR}") | ||
set_property(TARGET onnxruntime::onnxruntime PROPERTY | ||
IMPORTED_LOCATION "${onnxruntime_LIBRARY}") | ||
endif() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.