Merge pull request #8459 from Amulyam24/workflow-1

github: add workflows for building and publishing kata artefacts on ppc64le
This commit is contained in:
Steve Horsman
2023-11-27 14:31:20 +00:00
committed by GitHub
11 changed files with 333 additions and 13 deletions

View File

@@ -16,6 +16,9 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
make \
git \
wget \
sudo && \
apt-get clean && rm -rf /var/lib/apt/lists/ && \
install_yq.sh && \
@@ -43,10 +46,7 @@ RUN apt-get update && \
build-essential \
cpio \
gcc \
git \
make \
unzip \
wget \
xz-utils && \
apt-get clean && rm -rf /var/lib/apt/lists

View File

@@ -29,9 +29,21 @@ fi
arch=$(uname -m)
if [ "${arch}" = "ppc64le" ]; then
echo "An ORAS release for ppc64le is not available yet."
exit 0
fi
echo "Building oras from source"
go_version="go1.21.3"
# Install go
wget https://go.dev/dl/${go_version}.linux-ppc64le.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf ${go_version}.linux-ppc64le.tar.gz
export PATH=$PATH:/usr/local/go/bin
go version
git clone https://github.com/oras-project/oras.git
pushd oras
make build-linux-ppc64le
cp bin/linux/ppc64le/oras ${install_dest}
popd
exit 0
fi
if [ "${arch}" = "x86_64" ]; then
arch="amd64"
fi

View File

@@ -29,7 +29,6 @@ qemu_black_list=(
*/share/*/qemu_vga.ndrv
*/share/*/sgabios.bin
*/share/*/skiboot.lid
*/share/*/slof.bin
*/share/*/trace-events-all
*/share/*/u-boot*
*/share/*/vgabios*

View File

@@ -63,6 +63,7 @@ RUN apt-get update && apt-get upgrade -y && \
rsync \
zlib1g-dev${DPKG_ARCH} && \
if [ "${ARCH}" != s390x ]; then apt-get install -y --no-install-recommends libpmem-dev${DPKG_ARCH}; fi && \
if [ "${ARCH}" == ppc64le ]; then apt-get install -y --no-install-recommends librados-dev librbd-dev; fi && \
GCC_ARCH="${ARCH}" && if [ "${ARCH}" = "ppc64le" ]; then GCC_ARCH="powerpc64le"; fi && \
if [ "${ARCH}" != "$(uname -m)" ]; then apt-get install --no-install-recommends -y gcc-"${GCC_ARCH}"-linux-gnu; fi && \
apt-get clean && rm -rf /var/lib/apt/lists/

View File

@@ -74,7 +74,12 @@ sudo docker run --rm -i -v "${repo_root_dir}:${repo_root_dir}" \
for vmm in ${VMM_CONFIGS}; do
config_file="${DESTDIR}/${PREFIX}/share/defaults/kata-containers/configuration-${vmm}.toml"
if [ -f ${config_file} ]; then
sudo sed -i -e '/^initrd =/d' ${config_file}
if [ ${ARCH} == "ppc64le" ]; then
sudo sed -i -e '/^image =/d' ${config_file}
sudo sed -i 's/^# \(initrd =.*\)/\1/g' ${config_file}
else
sudo sed -i -e '/^initrd =/d' ${config_file}
fi
fi
done