1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-03-09 15:40:20 +00:00

Test new build script

This commit is contained in:
Ycarus 2018-02-21 15:09:20 +01:00
parent 1ec0bd34be
commit 4404739668
2 changed files with 28 additions and 30 deletions

View file

@ -32,7 +32,7 @@ if [ ! -f "$OMR_TARGET_CONFIG" ]; then
fi fi
#_get_repo source https://github.com/ysurac/openmptcprouter-source "master" #_get_repo source https://github.com/ysurac/openmptcprouter-source "master"
_get_repo source https://github.com/lede-project/source.git "lede-17.01" _get_repo "$OMR_TARGET/source" https://github.com/lede-project/source.git "lede-17.01"
_get_repo feeds/packages https://github.com/openwrt/packages "master" _get_repo feeds/packages https://github.com/openwrt/packages "master"
_get_repo feeds/luci https://github.com/openwrt/luci "lede-17.01" _get_repo feeds/luci https://github.com/openwrt/luci "lede-17.01"
@ -47,10 +47,10 @@ if [ -n "$1" ] && [ -f "$OMR_FEED/$1/Makefile" ]; then
fi fi
if [ "$OMR_KEEPBIN" = "no" ]; then if [ "$OMR_KEEPBIN" = "no" ]; then
rm -rf source/bin rm -rf "$OMR_TARGET/source/bin"
fi fi
rm -rf source/files source/tmp rm -rf "$OMR_TARGET/source/files" "$OMR_TARGET/source/tmp"
cp -rf root/* source cp -rf root/* "$OMR_TARGET/source"
cat >> source/package/base-files/files/etc/banner <<EOF cat >> source/package/base-files/files/etc/banner <<EOF
----------------------------------------------------- -----------------------------------------------------
@ -68,7 +68,7 @@ src-link luci $(readlink -f feeds/luci)
src-link openmptcprouter $(readlink -f "$OMR_FEED") src-link openmptcprouter $(readlink -f "$OMR_FEED")
EOF EOF
cat "$OMR_TARGET_CONFIG" config -> source/.config <<EOF cat "$OMR_TARGET_CONFIG" config -> "$OMR_TARGET/source/.config" <<EOF
CONFIG_IMAGEOPT=y CONFIG_IMAGEOPT=y
CONFIG_VERSIONOPT=y CONFIG_VERSIONOPT=y
CONFIG_VERSION_DIST="$OMR_DIST" CONFIG_VERSION_DIST="$OMR_DIST"
@ -79,21 +79,21 @@ CONFIG_PACKAGE_${OMR_DIST}-full=y
EOF EOF
if [ "$OMR_IMG" = "yes" ] && [ "$OMR_TARGET" = "x86_64" ]; then if [ "$OMR_IMG" = "yes" ] && [ "$OMR_TARGET" = "x86_64" ]; then
echo 'CONFIG_VDI_IMAGES=y' >> source/.config echo 'CONFIG_VDI_IMAGES=y' >> "$OMR_TARGET/source/.config"
echo 'CONFIG_VMDK_IMAGES=y' >> source/.config echo 'CONFIG_VMDK_IMAGES=y' >> "$OMR_TARGET/source/.config"
fi fi
echo "Building $OMR_DIST for the target $OMR_TARGET" echo "Building $OMR_DIST for the target $OMR_TARGET"
cd source cd "$OMR_TARGET/source"
if [ "$OMR_UEFI" = "yes" ] && [ "$OMR_TARGET" = "x86_64" ]; then if [ "$OMR_UEFI" = "yes" ] && [ "$OMR_TARGET" = "x86_64" ]; then
if ! patch -Rf -N -p1 -s --dry-run < ../patches/uefi.patch; then if ! patch -Rf -N -p1 -s --dry-run < ../../patches/uefi.patch; then
patch -N -p1 -s < ../patches/uefi.patch patch -N -p1 -s < ../../patches/uefi.patch
fi fi
else else
if ! patch -Nf -p1 -s --dry-run < ../patches/uefi.patch; then if ! patch -Nf -p1 -s --dry-run < ../../patches/uefi.patch; then
patch -N -R -p1 -s < ../patches/uefi.patch patch -N -R -p1 -s < ../../patches/uefi.patch
fi fi
fi fi
echo "Done" echo "Done"

View file

@ -12,34 +12,30 @@ dependencies:
OMR_TARGET: x86_64 OMR_TARGET: x86_64
OMR_KEEPBIN: yes OMR_KEEPBIN: yes
timeout: 7200 timeout: 7200
- sh build.sh package/{compile,install,preconfig,index} -j2 :
timeout: 7200
environment:
OMR_TARGET: x86_64
OMR_KEEPBIN: yes
- sh build.sh prepare {tools,toolchain}/install -j2 : - sh build.sh prepare {tools,toolchain}/install -j2 :
environment: environment:
OMR_TARGET: rpi3 OMR_TARGET: rpi3
OMR_KEEPBIN: yes OMR_KEEPBIN: yes
timeout: 7200 timeout: 7200
- sh build.sh package/{compile,install,preconfig,index} -j2 :
timeout: 7200
environment:
OMR_TARGET: rpi3
OMR_KEEPBIN: yes
cache_directories: cache_directories:
- "source" - "source"
- "feeds" - "feeds"
compile: compile:
override: override:
- sh build.sh package/{compile,install,preconfig,index} -j2 : - make -C x86_64/source target/install -j2 :
timeout: 7200 timeout: 7200
environment: - make -C rpi3/source target/install -j2 :
OMR_TARGET: x86_64
OMR_KEEPBIN: yes
- make -C source target/install -j2 :
timeout: 7200
- sh build.sh package/{compile,install,preconfig,index} -j2 :
timeout: 7200
environment:
OMR_TARGET: rpi3
OMR_KEEPBIN: yes
- make -C source target/compile -j2 :
timeout: 7200
- make -C source package/compile -j2 :
timeout: 7200
- make -C source target/install -j2 :
timeout: 7200 timeout: 7200
test: test:
@ -51,9 +47,11 @@ deployment:
branch: /.*/ branch: /.*/
commands: commands:
- ssh -p $OMR_DEPLOY_PORT deploy@$OMR_DEPLOY_HOST mkdir -p deploy/$OMR_PATH - ssh -p $OMR_DEPLOY_PORT deploy@$OMR_DEPLOY_HOST mkdir -p deploy/$OMR_PATH
- rsync -av --delete-after source/bin/ -e "ssh -q -p $OMR_DEPLOY_PORT" deploy@$OMR_DEPLOY_HOST:deploy/$OMR_PATH - rsync -av --delete-after x86_64/source/bin/ -e "ssh -q -p $OMR_DEPLOY_PORT" deploy@$OMR_DEPLOY_HOST:deploy/dev/x86_64
- rsync -av --delete-after rpi3/source/bin/ -e "ssh -q -p $OMR_DEPLOY_PORT" deploy@$OMR_DEPLOY_HOST:deploy/dev/rpi3
release: release:
tag: /v[0-9]+(\.[0-9]+)*/ tag: /v[0-9]+(\.[0-9]+)*/
commands: commands:
- ssh -p $OMR_DEPLOY_PORT deploy@$OMR_DEPLOY_HOST mkdir -p deploy/release - ssh -p $OMR_DEPLOY_PORT deploy@$OMR_DEPLOY_HOST mkdir -p deploy/release
- rsync -av --delete-after source/bin/ -e "ssh -q -p $OMR_DEPLOY_PORT" deploy@$OMR_DEPLOY_HOST:deploy/release - rsync -av --delete-after x86_64/source/bin/ -e "ssh -q -p $OMR_DEPLOY_PORT" deploy@$OMR_DEPLOY_HOST:deploy/release/x86_64
- rsync -av --delete-after rpi3/source/bin/ -e "ssh -q -p $OMR_DEPLOY_PORT" deploy@$OMR_DEPLOY_HOST:deploy/release/rpi3