Combine ubuntu-focal-external.yml and ubuntu-focal.yml (#83)

* Combine ubuntu-focal-external.yml and ubuntu-focal.yml

* Fix cpack-opensuse.yml

- Remove Build step for RPM was moving wrong folder

* Update docker scripts
Tento commit je obsažen v:
Jonathan R. Madsen
2022-07-12 21:28:25 -05:00
odevzdal GitHub
rodič 0ee32b3755
revize 084183c98e
8 změnil soubory, kde provedl 521 přidání a 331 odebrání
+56 -5
Zobrazit soubor
@@ -11,6 +11,35 @@ fi
set -e
tolower()
{
echo "$@" | awk -F '\|~\|' '{print tolower($1)}';
}
toupper()
{
echo "$@" | awk -F '\|~\|' '{print toupper($1)}';
}
usage()
{
print_option() { printf " --%-20s %-24s %s\n" "${1}" "${2}" "${3}"; }
echo "Options:"
print_option "help -h" "" "This message"
echo ""
print_default_option() { printf " --%-20s %-24s %s (default: %s)\n" "${1}" "${2}" "${3}" "$(tolower ${4})"; }
print_default_option distro "[ubuntu|opensuse]" "OS distribution" "${DISTRO}"
print_default_option versions "[VERSION] [VERSION...]" "Ubuntu or OpenSUSE release" "${VERSIONS}"
print_default_option rocm-versions "[VERSION] [VERSION...]" "ROCm versions" "${ROCM_VERSIONS}"
print_default_option user "[USERNAME]" "DockerHub username" "${USER}"
echo ""
echo "Usage: ${BASH_SOURCE[0]} <OPTIONS> -- <test-release.sh OPTIONS>"
echo " e.g:"
echo " ${BASH_SOURCE[0]} --distro ubuntu --versions 20.04 --rocm-versions 5.0 5.1 -- --stgz /path/to/stgz/installer"
}
send-error()
{
echo -e "\nError: ${@}"
@@ -19,17 +48,27 @@ send-error()
verbose-run()
{
echo -e "\n\n### Executing \"${@}\"... ###\n"
eval $@
echo -e "\n### Executing \"${@}\"... ###\n"
exec "${@}"
}
test-release()
{
CONTAINER=${1}
shift
verbose-run docker run --rm -v ${PWD}:/home/omnitrace ${CONTAINER} /home/omnitrace/scripts/test-release.sh ${@}
local DOCKER_ARGS=""
tty -s && DOCKER_ARGS="-it" || DOCKER_ARGS=""
verbose-run docker run ${DOCKER_ARGS} --rm -v ${PWD}:/home/omnitrace ${CONTAINER} /home/omnitrace/scripts/test-release.sh ${@}
}
reset-last()
{
last() { send-error "Unsupported argument :: ${1}"; }
}
reset-last
: ${USER:=$(whoami)}
: ${DISTRO:=ubuntu}
: ${VERSIONS:=20.04 18.04}
: ${ROCM_VERSIONS:=5.0 4.5 4.3}
@@ -38,17 +77,29 @@ n=0
while [[ $# -gt 0 ]]
do
case "${1}" in
-h|--help)
usage
exit 0
;;
"--distro")
shift
DISTRO=${1}
last() { DISTRO="${DISTRO} ${1}"; }
;;
"--versions")
shift
VERSIONS=${1}
last() { VERSIONS="${VERSIONS} ${1}"; }
;;
"--rocm-versions")
shift
ROCM_VERSIONS=${1}
last() { ROCM_VERSIONS="${ROCM_VERSIONS} ${1}"; }
;;
--user|-u)
shift
USER=${1}
reset-last
;;
"--")
shift
@@ -56,7 +107,7 @@ do
break
;;
*)
send-error "Unsupported argument at position $((${n} + 1)) :: ${1}"
last ${1}
;;
esac
n=$((${n} + 1))
@@ -70,6 +121,6 @@ do
TAG=${DISTRO}-${VERSION}
for ROCM_VERSION in ${ROCM_VERSIONS}
do
test-release jrmadsen/omnitrace-${TAG}-rocm-${ROCM_VERSION} ${SCRIPT_ARGS}
test-release ${USER}/omnitrace-${TAG}-rocm-${ROCM_VERSION} ${SCRIPT_ARGS}
done
done