[ROCm/rocprofiler-compute commit: 62d130b458]
This commit is contained in:
colramos-amd
2022-11-04 14:49:36 -05:00
commit f0cf74353e
9127 fájl változott, egészen pontosan 371405 új sor hozzáadva és 0 régi sor törölve
+66
Fájl megtekintése
@@ -0,0 +1,66 @@
#!/usr/bin/env bash
pyinstaller src/omniperf.py \
--name "omniperf" \
--add-data "src/perfmon_pub/*:perfmon_pub" \
--add-data "src/utils/*:utils" \
--add-data "src/soc_params/*.csv:soc_params" \
--add-data "src/omniperf_cli/*:omniperf_cli" \
--hidden-import matplotlib.backends.backend_pdf \
${@}
while [ $# -gt 0 ]; do
case "$1" in
-y*)
if [[ "$1" != *=* ]]; then shift; fi
y="${1#*=}"
;;
--workpath*)
if [[ "$1" != *=* ]]; then shift; fi
workpath="${1#*=}"
;;
--distpath*)
if [[ "$1" != *=* ]]; then shift; fi
distpath="${1#*=}"
;;
*)
echo "Invalid argument"
exit 1
;;
esac
shift
done
echo "distpath=$distpath"
echo "(build.sh) Checking for submodules"
# Check to se if submodules are availible
if [ -d "src/waveparser/" ] && [ -d "src/multevent/" ]
then
echo "Found submodules"
if [ "$(ls -A src/waveparser/)" ] && [ "$(ls -A src/multevent/)" ]; then
echo "waveparser and multevents submodules loaded. Packaging..."
cp -r src/waveparser/ "$distpath"/waveparser/
cp -r src/multevent/ "$distpath"/multevent/
else
echo "One of your submodules isn't loaded. Skipping submodule packaging"
fi
else
echo "ERROR: Couldn't find directory for submodules"
fi
echo "(build.sh) Loading dash_svg"
# Take care of dash-svg module that isn't detected by PyInstaller
dash_info=$(pip3 show dash_svg)
dash_loc=$(sed -n '8p' <<<"$dash_info")
cp -r ${dash_loc:10}/dash_svg "$distpath"/omniperf/
echo "(build.sh) Fixing flattened directories"
#TODO: Copy orig file structure from over to flattened packaged version
rm -rf "$distpath"/omniperf/omniperf_cli/
cp -r src/omniperf_cli/ "$distpath"/omniperf/
rm -rf "$distpath"/omniperf/perfmon_pub/
cp -r src/perfmon_pub/ "$distpath"/omniperf/
rm -rf "$distpath"/omniperf/perfmon/
+33
Fájl megtekintése
@@ -0,0 +1,33 @@
#!/usr/bin/env python3
#
# Support utility to check VERSION file against a tagname. Used in
# release pipeline.
import argparse
import os
parser = argparse.ArgumentParser()
parser.add_argument("--tag", type=str, required=True, help="tagname to check")
args = parser.parse_args()
execPath = os.path.dirname(__file__)
with open(execPath + "/../VERSION") as f:
repoVer = f.readline().strip()
repoCheck = "v" + repoVer
tag = args.tag
print("Current repository version = %s" % repoVer)
print("--> tagname = %s" % tag)
if repoCheck == tag:
print("OK: exact match")
exit(0)
elif tag.startswith(repoCheck + "-"):
print("OK: allowed match with extra delimiter")
exit(0)
else:
print("FAIL: no match - double check top-level VERSION file")
exit(1)