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

Clear CircleCI cache

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-09-10 21:07:37 +02:00
parent f49e73a611
commit e391fb2fc4

View file

@ -31,7 +31,7 @@ jobs:
- run:
name: cache
command: |
echo "cache 106 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 107 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
@ -94,7 +94,7 @@ jobs:
- run:
name: cache
command: |
echo "cache 106 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 107 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
@ -155,7 +155,7 @@ jobs:
- run:
name: cache
command: |
echo "cache 106 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 107 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
@ -216,7 +216,68 @@ jobs:
- run:
name: cache
command: |
echo "cache 106 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 107 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 108 $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 checkout ${CIRCLE_BRANCH:-$CIRCLE_TAG} || true
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}"
pyenv global 3.5.2
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/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET
rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET
rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin
- save_cache:
key: cache-{{ checksum "/tmp/cache-version" }}
paths:
- openmptcprouter
build_r2s:
machine:
image: ubuntu-1604:201903-01
environment:
- OMR_VERSION: $CIRCLE_TAG
- OMR_TARGET: r2s
- OMR_KERNEL: 5.4
working_directory: ~/
steps:
- run:
name: cache
command: |
echo "cache 107 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
@ -277,7 +338,7 @@ jobs:
- run:
name: cache
command: |
echo "cache 106 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 107 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
@ -338,7 +399,7 @@ jobs:
- run:
name: cache
command: |
echo "cache 106 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 107 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
@ -399,7 +460,7 @@ jobs:
- run:
name: cache
command: |
echo "cache 106 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 107 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
@ -463,7 +524,7 @@ jobs:
- run:
name: cache
command: |
echo "cache 106 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 107 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
@ -523,7 +584,7 @@ jobs:
- run:
name: cache
command: |
echo "cache 106 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 107 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
@ -652,6 +713,15 @@ workflows:
branches:
only:
- develop
- build_r2s:
requires:
- prepare
filters:
tags:
only: /.*/
branches:
only:
- develop
- build_rpi2:
requires:
- prepare