update CI Script

This commit is contained in:
longpanda 2021-02-02 22:26:23 +08:00
parent f26a927b3e
commit 198dcd94a6
2 changed files with 12 additions and 18 deletions

View file

@ -1,32 +1,28 @@
#!/bin/sh #!/bin/sh
VTOY_PATH=$PWD/.. VTOY_PATH=$PWD/..
LOGCON=$2
logci() { LOG=$VTOY_PATH/DOC/build.log
if [ -n "$LOGCON" ]; then [ -f $LOG ] && rm -f $LOG
echo $* > $LOGCON
fi
}
cd $VTOY_PATH/DOC cd $VTOY_PATH/DOC
logci "prepare_env ..." echo "prepare_env ..."
sh prepare_env.sh sh prepare_env.sh
export PATH=$PATH:/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin:/opt/aarch64--uclibc--stable-2020.08-1/bin export PATH=$PATH:/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin:/opt/aarch64--uclibc--stable-2020.08-1/bin
logci "build grub2 ..." echo "build grub2 ..."
cd $VTOY_PATH/GRUB2 cd $VTOY_PATH/GRUB2
sh buildgrub.sh || exit 1 sh buildgrub.sh >> $LOG 2>&1 || exit 1
logci "build ipxe ..." echo "build ipxe ..."
cd $VTOY_PATH/IPXE cd $VTOY_PATH/IPXE
sh buildipxe.sh || exit 1 sh buildipxe.sh >> $LOG 2>&1 || exit 1
logci "build edk2 ..." echo "build edk2 ..."
cd $VTOY_PATH/EDK2 cd $VTOY_PATH/EDK2
sh buildedk.sh || exit 1 sh buildedk.sh >> $LOG 2>&1 || exit 1
@ -78,8 +74,7 @@ if [ "$1" = "CI" ]; then
sed "s/VENTOY_VERSION=.*/VENTOY_VERSION=\"$Ver\"/" -i ./grub/grub.cfg sed "s/VENTOY_VERSION=.*/VENTOY_VERSION=\"$Ver\"/" -i ./grub/grub.cfg
fi fi
logci "packing ventoy-$Ver ..." echo "packing ventoy-$Ver ..."
sh ventoy_pack.sh $1 || exit 1 sh ventoy_pack.sh $1 >> $LOG 2>&1 || exit 1
logci "==== finish ===="
echo -e '\n============== SUCCESS ==================\n' echo -e '\n============== SUCCESS ==================\n'

View file

@ -10,5 +10,4 @@ wget -q -O $VTOY_PATH/EDK2/edk2-edk2-stable201911.zip https://codeload.github.co
wget -q -P /opt/ https://releases.linaro.org/components/toolchain/binaries/7.4-2019.02/aarch64-linux-gnu/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz wget -q -P /opt/ https://releases.linaro.org/components/toolchain/binaries/7.4-2019.02/aarch64-linux-gnu/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz
wget -q -P /opt/ https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/tarballs/aarch64--uclibc--stable-2020.08-1.tar.bz2 wget -q -P /opt/ https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/tarballs/aarch64--uclibc--stable-2020.08-1.tar.bz2
LOGCON=$(readlink /proc/self/fd/1) sh all_in_one.sh CI
sh all_in_one.sh CI $LOGCON > $VTOY_PATH/DOC/build.log 2>&1