Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update copying API header files #19736

Merged
merged 1 commit into from
Mar 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions tools/ci_build/github/linux/copy_strip_binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e -o -x

while getopts r:a:l:c:s:t: parameter_Option
do case "${parameter_Option}"

Check warning on line 5 in tools/ci_build/github/linux/copy_strip_binary.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Invalid flags are not handled. Add a *) case. Raw Output: ./tools/ci_build/github/linux/copy_strip_binary.sh:5:4: warning: Invalid flags are not handled. Add a *) case. (ShellCheck.SC2220)
in
r) BINARY_DIR=${OPTARG};;
a) ARTIFACT_NAME=${OPTARG};;
Expand All @@ -16,11 +16,11 @@
EXIT_CODE=1

uname -a
mkdir $BINARY_DIR/$ARTIFACT_NAME

Check warning on line 19 in tools/ci_build/github/linux/copy_strip_binary.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/linux/copy_strip_binary.sh:19:7: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 19 in tools/ci_build/github/linux/copy_strip_binary.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/linux/copy_strip_binary.sh:19:19: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
mkdir $BINARY_DIR/$ARTIFACT_NAME/lib

Check warning on line 20 in tools/ci_build/github/linux/copy_strip_binary.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/linux/copy_strip_binary.sh:20:7: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 20 in tools/ci_build/github/linux/copy_strip_binary.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/linux/copy_strip_binary.sh:20:19: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
mkdir $BINARY_DIR/$ARTIFACT_NAME/include

Check warning on line 21 in tools/ci_build/github/linux/copy_strip_binary.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/linux/copy_strip_binary.sh:21:7: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 21 in tools/ci_build/github/linux/copy_strip_binary.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/linux/copy_strip_binary.sh:21:19: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
echo "Directories created"
cp $BINARY_DIR/$BUILD_CONFIG/$LIB_NAME $BINARY_DIR/$ARTIFACT_NAME/lib

Check warning on line 23 in tools/ci_build/github/linux/copy_strip_binary.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/linux/copy_strip_binary.sh:23:4: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 23 in tools/ci_build/github/linux/copy_strip_binary.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/linux/copy_strip_binary.sh:23:16: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 23 in tools/ci_build/github/linux/copy_strip_binary.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/linux/copy_strip_binary.sh:23:30: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
if [[ -f "$BINARY_DIR/$BUILD_CONFIG/libonnxruntime_providers_cuda.so" ]]; then
cp $BINARY_DIR/$BUILD_CONFIG/libonnxruntime_providers_shared.so $BINARY_DIR/$ARTIFACT_NAME/lib
cp $BINARY_DIR/$BUILD_CONFIG/libonnxruntime_providers_cuda.so $BINARY_DIR/$ARTIFACT_NAME/lib
Expand All @@ -44,17 +44,10 @@
then
ln -s $LIB_NAME $BINARY_DIR/$ARTIFACT_NAME/lib/libonnxruntime.so
fi
cp $SOURCE_DIR/include/onnxruntime/core/session/onnxruntime_c_api.h $BINARY_DIR/$ARTIFACT_NAME/include
cp $SOURCE_DIR/include/onnxruntime/core/session/onnxruntime_cxx_api.h $BINARY_DIR/$ARTIFACT_NAME/include
cp $SOURCE_DIR/include/onnxruntime/core/session/onnxruntime_cxx_inline.h $BINARY_DIR/$ARTIFACT_NAME/include
cp $SOURCE_DIR/include/onnxruntime/core/session/onnxruntime_float16.h $BINARY_DIR/$ARTIFACT_NAME/include
cp $SOURCE_DIR/include/onnxruntime/core/providers/cpu/cpu_provider_factory.h $BINARY_DIR/$ARTIFACT_NAME/include
cp $SOURCE_DIR/include/onnxruntime/core/session/onnxruntime_session_options_config_keys.h $BINARY_DIR/$ARTIFACT_NAME/include
cp $SOURCE_DIR/include/onnxruntime/core/session/onnxruntime_run_options_config_keys.h $BINARY_DIR/$ARTIFACT_NAME/include
cp $SOURCE_DIR/include/onnxruntime/core/session/onnxruntime_*.h $BINARY_DIR/$ARTIFACT_NAME/include
cp $SOURCE_DIR/include/onnxruntime/core/framework/provider_options.h $BINARY_DIR/$ARTIFACT_NAME/include
cp $SOURCE_DIR/orttraining/orttraining/training_api/include/onnxruntime_training_c_api.h $BINARY_DIR/$ARTIFACT_NAME/include
cp $SOURCE_DIR/orttraining/orttraining/training_api/include/onnxruntime_training_cxx_api.h $BINARY_DIR/$ARTIFACT_NAME/include
cp $SOURCE_DIR/orttraining/orttraining/training_api/include/onnxruntime_training_cxx_inline.h $BINARY_DIR/$ARTIFACT_NAME/include
cp $SOURCE_DIR/include/onnxruntime/core/providers/cpu/cpu_provider_factory.h $BINARY_DIR/$ARTIFACT_NAME/include
cp $SOURCE_DIR/orttraining/orttraining/training_api/include/onnxruntime_training_*.h $BINARY_DIR/$ARTIFACT_NAME/include

if [[ -f "$BINARY_DIR/$BUILD_CONFIG/libonnxruntime_providers_cuda.so" ]]; then
# copy headers for context context used in custom ops
Expand Down
Loading