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
[ROCm/rocprofiler-systems commit: 084183c98e]
This commit is contained in:
zatwierdzone przez
GitHub
rodzic
715ed71b82
commit
aa7f2f63af
@@ -2,49 +2,102 @@
|
||||
|
||||
set -e
|
||||
|
||||
: ${USER:=$(whoami)}
|
||||
: ${DISTRO:=ubuntu}
|
||||
: ${VERSIONS:=20.04 18.04}
|
||||
: ${NJOBS=$(nproc)}
|
||||
: ${ELFUTILS_VERSION:=0.186}
|
||||
: ${PUSH:=0}
|
||||
|
||||
verbose-run()
|
||||
{
|
||||
echo -e "\n### Executing \"${@}\"... ###\n"
|
||||
eval $@
|
||||
}
|
||||
|
||||
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"
|
||||
print_option "push" "" "Push the container to DockerHub when completed"
|
||||
|
||||
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 "jobs -j" "[N]" "parallel build jobs" "${NJOBS}"
|
||||
print_default_option elfutils-version "[0.183..0.186]" "ElfUtils version" "${ELFUTILS_VERSION}"
|
||||
print_default_option user "[USERNAME]" "DockerHub username" "${USER}"
|
||||
}
|
||||
|
||||
send-error()
|
||||
{
|
||||
usage
|
||||
echo -e "\nError: ${@}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
verbose-run()
|
||||
reset-last()
|
||||
{
|
||||
echo -e "\n\n### Executing \"${@}\"... ###\n"
|
||||
eval $@
|
||||
last() { send-error "Unsupported argument :: ${1}"; }
|
||||
}
|
||||
|
||||
reset-last
|
||||
|
||||
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}"; }
|
||||
;;
|
||||
"-j")
|
||||
--jobs|-j)
|
||||
shift
|
||||
NJOBS=${1}
|
||||
reset-last
|
||||
;;
|
||||
"--elfutils-version")
|
||||
shift
|
||||
ELFUTILS_VERSION=${1}
|
||||
reset-last
|
||||
;;
|
||||
--user|-u)
|
||||
shift
|
||||
USER=${1}
|
||||
reset-last
|
||||
;;
|
||||
"--push")
|
||||
PUSH=1
|
||||
reset-last
|
||||
;;
|
||||
--*)
|
||||
reset-last
|
||||
last ${1}
|
||||
;;
|
||||
*)
|
||||
send-error "Unsupported argument at position $((${n} + 1)) :: ${1}"
|
||||
last ${1}
|
||||
;;
|
||||
esac
|
||||
n=$((${n} + 1))
|
||||
@@ -74,7 +127,7 @@ for VERSION in ${VERSIONS}
|
||||
do
|
||||
verbose-run docker build . \
|
||||
-f ${DOCKER_FILE} \
|
||||
--tag jrmadsen/omnitrace-ci:${DISTRO}-${VERSION} \
|
||||
--tag ${USER}/omnitrace-ci:${DISTRO}-${VERSION} \
|
||||
--build-arg DISTRO=${DISTRO_IMAGE} \
|
||||
--build-arg VERSION=${VERSION} \
|
||||
--build-arg NJOBS=${NJOBS} \
|
||||
@@ -84,7 +137,7 @@ done
|
||||
if [ "${PUSH}" -gt 0 ]; then
|
||||
for VERSION in ${VERSIONS}
|
||||
do
|
||||
verbose-run docker push jrmadsen/omnitrace-ci:${DISTRO}-${VERSION}
|
||||
verbose-run docker push ${USER}/omnitrace-ci:${DISTRO}-${VERSION}
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/bash -e
|
||||
|
||||
if [ ! -f CMakeLists.txt ]; then
|
||||
if [ ! -f ../CMakeLists.txt ]; then
|
||||
@@ -11,16 +11,49 @@ 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 python-versions "[VERSION] [VERSION...]" "Python 3 minor releases" "${PYTHON_VERSIONS}"
|
||||
print_default_option user "[USERNAME]" "DockerHub username" "${USER}"
|
||||
#print_default_option lto "[on|off]" "Enable LTO" "${LTO}"
|
||||
|
||||
echo ""
|
||||
echo "Usage: ${BASH_SOURCE[0]} <OPTIONS> -- <build-release.sh OPTIONS>"
|
||||
echo " e.g:"
|
||||
echo " ${BASH_SOURCE[0]} --distro ubuntu --versions 20.04 --rocm-versions 5.0 5.1 -- --core +nopython --rocm-mpi +nopython"
|
||||
echo " ${BASH_SOURCE[0]} --distro ubuntu --versions 20.04 --python-version 6 7 8 9 10 -- --rocm +python --rocm-mpi +nopython"
|
||||
}
|
||||
|
||||
send-error()
|
||||
{
|
||||
usage
|
||||
echo -e "\nError: ${@}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
verbose-run()
|
||||
{
|
||||
echo -e "\n\n### Executing \"${@}\"... ###\n"
|
||||
eval $@
|
||||
echo -e "\n### Executing \"${@}\"... ###\n"
|
||||
exec "${@}"
|
||||
}
|
||||
|
||||
build-release()
|
||||
@@ -33,9 +66,19 @@ build-release()
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
verbose-run docker run --rm -v ${PWD}:/home/omnitrace --env DISTRO=${OS} --env ROCM_VERSION=${ROCM_VERSION} --env VERSION=${CODE_VERSION} --env PYTHON_VERSIONS=\"${PYTHON_VERSIONS}\" ${CONTAINER} /home/omnitrace/scripts/build-release.sh ${@}
|
||||
local DOCKER_ARGS=""
|
||||
tty -s && DOCKER_ARGS="-it" || DOCKER_ARGS=""
|
||||
verbose-run docker run ${DOCKER_ARGS} --rm -v ${PWD}:/home/omnitrace --stop-signal "SIGINT" --env DISTRO=${OS} --env ROCM_VERSION=${ROCM_VERSION} --env VERSION=${CODE_VERSION} --env PYTHON_VERSIONS="${PYTHON_VERSIONS}" ${CONTAINER} /home/omnitrace/scripts/build-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}
|
||||
@@ -46,21 +89,34 @@ 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}"; }
|
||||
;;
|
||||
"--python-versions")
|
||||
shift
|
||||
PYTHON_VERSIONS=${1}
|
||||
last() { PYTHON_VERSIONS="${PYTHON_VERSIONS} ${1}"; }
|
||||
;;
|
||||
--user|-u)
|
||||
shift
|
||||
USER=${1}
|
||||
reset-last
|
||||
;;
|
||||
"--")
|
||||
shift
|
||||
@@ -68,7 +124,7 @@ do
|
||||
break
|
||||
;;
|
||||
*)
|
||||
send-error "Unsupported argument at position $((${n} + 1)) :: ${1}"
|
||||
last ${1}
|
||||
;;
|
||||
esac
|
||||
n=$((${n} + 1))
|
||||
@@ -82,6 +138,6 @@ do
|
||||
TAG=${DISTRO}-${VERSION}
|
||||
for ROCM_VERSION in ${ROCM_VERSIONS}
|
||||
do
|
||||
build-release jrmadsen/omnitrace-${TAG}-rocm-${ROCM_VERSION} ${DISTRO}-${VERSION} ${ROCM_VERSION} ${CODE_VERSION} ${SCRIPT_ARGS}
|
||||
build-release ${USER}/omnitrace-${TAG}-rocm-${ROCM_VERSION} ${DISTRO}-${VERSION} ${ROCM_VERSION} ${CODE_VERSION} ${SCRIPT_ARGS}
|
||||
done
|
||||
done
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
: ${USER:=$(whoami)}
|
||||
: ${ROCM_VERSIONS:="5.0 4.5 4.3"}
|
||||
: ${DISTRO:=ubuntu}
|
||||
: ${VERSIONS:=20.04 18.04}
|
||||
@@ -8,48 +9,90 @@
|
||||
|
||||
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 python-versions "[VERSION] [VERSION...]" "Python 3 minor releases" "${PYTHON_VERSIONS}"
|
||||
print_default_option user "[USERNAME]" "DockerHub username" "${USER}"
|
||||
#print_default_option lto "[on|off]" "Enable LTO" "${LTO}"
|
||||
}
|
||||
|
||||
send-error()
|
||||
{
|
||||
usage
|
||||
echo -e "\nError: ${@}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
verbose-run()
|
||||
{
|
||||
echo -e "\n\n### Executing \"${@}\"... ###\n"
|
||||
echo -e "\n### Executing \"${@}\"... ###\n"
|
||||
eval $@
|
||||
}
|
||||
|
||||
reset-last()
|
||||
{
|
||||
last() { send-error "Unsupported argument :: ${1}"; }
|
||||
}
|
||||
|
||||
reset-last
|
||||
|
||||
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}"; }
|
||||
;;
|
||||
"--python-versions")
|
||||
shift
|
||||
PYTHON_VERSIONS=${1}
|
||||
last() { PYTHON_VERSIONS="${PYTHON_VERSIONS} ${1}"; }
|
||||
;;
|
||||
--user|-u)
|
||||
shift
|
||||
USER=${1}
|
||||
reset-last
|
||||
;;
|
||||
"--*")
|
||||
send-error "Unsupported argument at position $((${n} + 1)) :: ${1}"
|
||||
;;
|
||||
*)
|
||||
if [ "${n}" -eq 0 ]; then
|
||||
DISTRO=${1}
|
||||
elif [ "${n}" -eq 1 ]; then
|
||||
VERSIONS=${1}
|
||||
elif [ "${n}" -eq 2 ]; then
|
||||
ROCM_VERSIONS=${1}
|
||||
else
|
||||
send-error "Unsupported argument at position $((${n} + 1)) :: ${1}"
|
||||
fi
|
||||
last ${1}
|
||||
;;
|
||||
esac
|
||||
n=$((${n} + 1))
|
||||
@@ -79,7 +122,7 @@ do
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
verbose-run docker build . -f ${DOCKER_FILE} --tag jrmadsen/omnitrace-${DISTRO}-${VERSION}-rocm-${i} --build-arg DISTRO=${DISTRO} --build-arg VERSION=${VERSION} --build-arg ROCM_REPO_VERSION=${ROCM_REPO_VERSION} --build-arg ROCM_REPO_DIST=${ROCM_REPO_DIST} --build-arg PYTHON_VERSIONS=\"${PYTHON_VERSIONS}\"
|
||||
verbose-run docker build . -f ${DOCKER_FILE} --tag ${USER}/omnitrace-${DISTRO}-${VERSION}-rocm-${i} --build-arg DISTRO=${DISTRO} --build-arg VERSION=${VERSION} --build-arg ROCM_REPO_VERSION=${ROCM_REPO_VERSION} --build-arg ROCM_REPO_DIST=${ROCM_REPO_DIST} --build-arg PYTHON_VERSIONS=\"${PYTHON_VERSIONS}\"
|
||||
elif [ "${DISTRO}" = "centos" ]; then
|
||||
case "${VERSION}" in
|
||||
7)
|
||||
@@ -110,7 +153,7 @@ do
|
||||
send-error "Unsupported combination :: ${DISTRO}-${VERSION} + ROCm ${i}"
|
||||
;;
|
||||
esac
|
||||
verbose-run docker build . -f ${DOCKER_FILE} --tag jrmadsen/omnitrace-${DISTRO}-${VERSION}-rocm-${i} --build-arg DISTRO=${DISTRO} --build-arg VERSION=${VERSION} --build-arg AMDGPU_RPM=${ROCM_RPM} --build-arg PYTHON_VERSIONS=\"${PYTHON_VERSIONS}\"
|
||||
verbose-run docker build . -f ${DOCKER_FILE} --tag ${USER}/omnitrace-${DISTRO}-${VERSION}-rocm-${i} --build-arg DISTRO=${DISTRO} --build-arg VERSION=${VERSION} --build-arg AMDGPU_RPM=${ROCM_RPM} --build-arg PYTHON_VERSIONS=\"${PYTHON_VERSIONS}\"
|
||||
elif [ "${DISTRO}" = "opensuse" ]; then
|
||||
case "${VERSION}" in
|
||||
15.*)
|
||||
@@ -153,7 +196,7 @@ do
|
||||
send-error "Unsupported combination :: ${DISTRO}-${VERSION} + ROCm ${i}"
|
||||
;;
|
||||
esac
|
||||
verbose-run docker build . -f ${DOCKER_FILE} --tag jrmadsen/omnitrace-${DISTRO}-${VERSION}-rocm-${i} --build-arg DISTRO=${DISTRO_IMAGE} --build-arg VERSION=${VERSION} --build-arg AMDGPU_RPM=${ROCM_RPM} --build-arg PYTHON_VERSIONS=\"${PYTHON_VERSIONS}\"
|
||||
verbose-run docker build . -f ${DOCKER_FILE} --tag ${USER}/omnitrace-${DISTRO}-${VERSION}-rocm-${i} --build-arg DISTRO=${DISTRO_IMAGE} --build-arg VERSION=${VERSION} --build-arg AMDGPU_RPM=${ROCM_RPM} --build-arg PYTHON_VERSIONS=\"${PYTHON_VERSIONS}\"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user