1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-13 02:51:50 +00:00
openmptcprouter-feeds/.circleci/config.yml
Ycarus (Yannick Chabanois) 3629820389 Reset caches
2019-07-16 21:58:26 +02:00

528 lines
19 KiB
YAML

version: 2
jobs:
prepare:
machine: true
working_directory: ~/
steps:
- run:
name: Prepare
command: |
sudo rm -rf /var/lib/apt/lists/lock
sudo apt-get update
sudo rm -rf /var/lib/apt/lists/lock
sudo apt-get install -yq build-essential git unzip ncurses-dev libz-dev libssl-dev python subversion gettext gawk wget curl rsync perl libelf-dev
build_x86_64:
machine: true
environment:
- OMR_VERSION: $CIRCLE_TAG
- OMR_TARGET: x86_64
working_directory: ~/
steps:
- run:
name: cache
command: |
echo "cache 56 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 60 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
keys:
- cache-{{ checksum "/tmp/cache-version" }}
- cache-{{ checksum "/tmp/cache-target" }}
- run:
name: Build toolchain
no_output_timeout: 50m
command: |
git clone https://github.com/ysurac/openmptcprouter || true
cd openmptcprouter
git pull || true
export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}"
export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL"
export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}"
sudo apt-get install -yq libelf-dev
sh build.sh prepare {tools,toolchain}/install -j2
echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build
echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub
- save_cache:
key: cache-{{ checksum "/tmp/cache-target" }}
paths:
- openmptcprouter
- run:
name: Build
no_output_timeout: 50m
command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/install -j2
- run:
name: Deploy
command: |
ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/release
rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/release/${OMR_KERNEL:-4.14}/$OMR_TARGET
rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin
- save_cache:
key: cache-{{ checksum "/tmp/cache-version" }}
paths:
- openmptcprouter
build_x86:
machine: true
environment:
- OMR_VERSION: $CIRCLE_TAG
- OMR_TARGET: x86
working_directory: ~/
steps:
- run:
name: cache
command: |
echo "cache 56 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 60 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
keys:
- cache-{{ checksum "/tmp/cache-version" }}
- cache-{{ checksum "/tmp/cache-target" }}
- run:
name: Build toolchain
no_output_timeout: 40m
command: |
git clone https://github.com/ysurac/openmptcprouter || true
cd openmptcprouter
git pull || true
export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}"
export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL"
export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}"
sh build.sh prepare {tools,toolchain}/install -j2
echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build
echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub
- save_cache:
key: cache-{{ checksum "/tmp/cache-target" }}
paths:
- openmptcprouter
- run:
name: Build
no_output_timeout: 40m
command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/install -j2
- run:
name: Deploy
command: |
ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/release
rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/release/${OMR_KERNEL:-4.14}/$OMR_TARGET
rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin
- save_cache:
key: cache-{{ checksum "/tmp/cache-version" }}
paths:
- openmptcprouter
build_rpi3:
machine: true
environment:
- OMR_VERSION: $CIRCLE_TAG
- OMR_TARGET: rpi3
working_directory: ~/
steps:
- run:
name: cache
command: |
echo "cache 56 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 60 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
keys:
- cache-{{ checksum "/tmp/cache-version" }}
- cache-{{ checksum "/tmp/cache-target" }}
- run:
name: Build toolchain
no_output_timeout: 40m
command: |
git clone https://github.com/ysurac/openmptcprouter || true
cd openmptcprouter
git pull || true
export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}"
export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL"
export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}"
sh build.sh prepare {tools,toolchain}/install -j2
echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build
echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub
- save_cache:
key: cache-{{ checksum "/tmp/cache-target" }}
paths:
- openmptcprouter
- run:
name: Build
no_output_timeout: 40m
command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2
- run:
name: Deploy
command: |
ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/release
rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/release/${OMR_KERNEL:-4.14}/$OMR_TARGET
rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin
- save_cache:
key: cache-{{ checksum "/tmp/cache-version" }}
paths:
- openmptcprouter
build_rpi4:
machine: true
environment:
- OMR_VERSION: $CIRCLE_TAG
- OMR_TARGET: rpi4
working_directory: ~/
steps:
- run:
name: cache
command: |
echo "cache 56 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 60 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
keys:
- cache-{{ checksum "/tmp/cache-version" }}
- cache-{{ checksum "/tmp/cache-target" }}
- run:
name: Build toolchain
no_output_timeout: 40m
command: |
git clone https://github.com/ysurac/openmptcprouter || true
cd openmptcprouter
git pull || true
export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}"
export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL"
export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}"
sh build.sh prepare {tools,toolchain}/install -j2
echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build
echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub
- save_cache:
key: cache-{{ checksum "/tmp/cache-target" }}
paths:
- openmptcprouter
- run:
name: Build
no_output_timeout: 40m
command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2
- run:
name: Deploy
command: |
ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/release
rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/release/${OMR_KERNEL:-4.14}/$OMR_TARGET
rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin
- save_cache:
key: cache-{{ checksum "/tmp/cache-version" }}
paths:
- openmptcprouter
build_rpi2:
machine: true
environment:
- OMR_VERSION: $CIRCLE_TAG
- OMR_TARGET: rpi2
working_directory: ~/
steps:
- run:
name: cache
command: |
echo "cache 56 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 60 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
keys:
- cache-{{ checksum "/tmp/cache-version" }}
- cache-{{ checksum "/tmp/cache-target" }}
- run:
name: Build toolchain
no_output_timeout: 40m
command: |
git clone https://github.com/ysurac/openmptcprouter || true
cd openmptcprouter
git pull || true
export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}"
export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL"
export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}"
sh build.sh prepare {tools,toolchain}/install -j2
echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build
echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub
- save_cache:
key: cache-{{ checksum "/tmp/cache-target" }}
paths:
- openmptcprouter
- run:
name: Build
no_output_timeout: 40m
command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile package/compile target/install -j2
- run:
name: Deploy
command: |
ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/release
rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/release/${OMR_KERNEL:-4.14}/$OMR_TARGET
rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin
- save_cache:
key: cache-{{ checksum "/tmp/cache-version" }}
paths:
- openmptcprouter
build_bpi-r2:
machine: true
environment:
- OMR_VERSION: $CIRCLE_TAG
- OMR_TARGET: bpi-r2
working_directory: ~/
steps:
- run:
name: cache
command: |
echo "cache 56 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 60 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
keys:
- cache-{{ checksum "/tmp/cache-version" }}
- cache-{{ checksum "/tmp/cache-target" }}
- run:
name: Build toolchain
no_output_timeout: 40m
command: |
git clone https://github.com/ysurac/openmptcprouter || true
cd openmptcprouter
git pull || true
export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}"
export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL"
export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}"
sh build.sh prepare {tools,toolchain}/install -j2
echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build
echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub
- save_cache:
key: cache-{{ checksum "/tmp/cache-target" }}
paths:
- openmptcprouter
- run:
name: Build
no_output_timeout: 40m
command: |
sudo apt-get -yq install swig swig2.0
make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2
- run:
name: Deploy
command: |
ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/release
rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/release/${OMR_KERNEL:-4.14}/$OMR_TARGET
rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin
- save_cache:
key: cache-{{ checksum "/tmp/cache-version" }}
paths:
- openmptcprouter
build_wrt3200acm:
machine: true
environment:
- OMR_VERSION: $CIRCLE_TAG
- OMR_TARGET: wrt3200acm
working_directory: ~/
steps:
- run:
name: cache
command: |
echo "cache 56 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 60 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
keys:
- cache-{{ checksum "/tmp/cache-version" }}
- cache-{{ checksum "/tmp/cache-target" }}
- run:
name: Build toolchain
no_output_timeout: 40m
command: |
git clone https://github.com/ysurac/openmptcprouter || true
cd openmptcprouter
git pull || tr
ue
export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}"
export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL"
export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}"
sh build.sh prepare {tools,toolchain}/install -j2
echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build
echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub
- save_cache:
key: cache-{{ checksum "/tmp/cache-target" }}
paths:
- openmptcprouter
- run:
name: Build
no_output_timeout: 40m
command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2
- run:
name: Deploy
command: |
ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/release
rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/release/${OMR_KERNEL:-4.14}/$OMR_TARGET
rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin
- save_cache:
key: cache-{{ checksum "/tmp/cache-version" }}
paths:
- openmptcprouter
build_wrt32:
machine: true
environment:
- OMR_VERSION: $CIRCLE_TAG
working_directory: ~/
steps:
- run:
name: cache
command: |
echo "cache 56 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 60 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
keys:
- cache-{{ checksum "/tmp/cache-version" }}
- cache-{{ checksum "/tmp/cache-target" }}
- run:
name: Build toolchain wrt3200acm
no_output_timeout: 40m
command: |
git clone https://github.com/ysurac/openmptcprouter || true
cd openmptcprouter
git pull || true
export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}"
export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL"
export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}"
export OMR_TARGET="wrt3200acm"
sh build.sh prepare {tools,toolchain}/install -j2
echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/wrt3200acm/source/key-build
echo -e "$OMR_PUBKEY" > ~/openmptcprouter/wrt3200acm/source/key-build.pub
- save_cache:
key: cache-{{ checksum "/tmp/cache-target" }}
paths:
- openmptcprouter
- run:
name: Build wrt3200acm
no_output_timeout: 40m
command: make IGNORE_ERRORS=m -C ~/openmptcprouter/wrt3200acm/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2
- run:
name: Deploy wrt3200acm
command: |
ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/release
rsync -av --delete-after ~/openmptcprouter/wrt3200acm/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/release/${OMR_KERNEL:-4.14}/wrt3200acm
rm -rf ~/openmptcprouter/wrt3200acm/source/bin
- save_cache:
key: cache-{{ checksum "/tmp/cache-version" }}
paths:
- openmptcprouter
- run:
name: Build toolchain wrt32x
no_output_timeout: 40m
command: |
cd ~/openmptcprouter/
git pull || true
export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}"
export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL"
export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}"
export OMR_TARGET="wrt32x"
ln -s wrt3200acm wrt32x
sh build.sh prepare {tools,toolchain}/install -j2
echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/wrt32x/source/key-build
echo -e "$OMR_PUBKEY" > ~/openmptcprouter/wrt32x/source/key-build.pub
- run:
name: Build wrt32x
no_output_timeout: 40m
command: make IGNORE_ERRORS=m -C ~/openmptcprouter/wrt32x/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2
- run:
name: Deploy wrt32x
command: |
ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/release
rsync -av --delete-after ~/openmptcprouter/wrt32x/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/release/${OMR_KERNEL:-4.14}/wrt32x
workflows:
version: 2
main:
jobs:
- prepare
- build_x86_64:
requires:
- prepare
- build_x86:
requires:
- prepare
- build_rpi4:
requires:
- prepare
- build_rpi3:
requires:
- prepare
- build_rpi2:
requires:
- prepare
- build_bpi-r2:
requires:
- prepare
- build_wrt32:
requires:
- prepare