Skip to content

Commit

Permalink
CI: Add caching to CircleCI build
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuch committed Feb 11, 2022
1 parent da425d0 commit f3bff45
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,26 @@ jobs:

steps:
- checkout
- restore_cache:
keys:
- ccache-{{ arch }}-{{ .Branch }}
- ccache-{{ arch }}-main
- ccache-{{ arch }}
- run:
name: CCache
command: |
sudo apt update
sudo apt -y install ccache
ccache --show-stats
ccache --max-size=1.0G
- run:
name: Build
command: ./build all-test netlrts-linux-x86_64 -j3 --with-production --enable-error-checking --enable-lbuserdata -g -Werror=vla
command: |
export PATH=/usr/lib/ccache:${PATH}
./build all-test netlrts-linux-x86_64 -j3 --with-production --enable-error-checking --enable-lbuserdata -g -Werror=vla
- save_cache:
key: "ccache-{{ arch }}-{{ .Branch }}-{{ epoch }}"
paths: [ "/home/circleci/.ccache" ]
- run:
name: Test
command: make -C netlrts-linux-x86_64/tmp test TESTOPTS="++local"
Expand All @@ -22,9 +39,26 @@ jobs:

steps:
- checkout
- restore_cache:
keys:
- ccache-smp-{{ arch }}-{{ .Branch }}
- ccache-smp-{{ arch }}-main
- ccache-smp-{{ arch }}
- run:
name: CCache
command: |
sudo apt update
sudo apt -y install ccache
ccache --show-stats
ccache --max-size=1.0G
- run:
name: Build
command: ./build all-test netlrts-linux-x86_64 smp -j3 --with-production --enable-error-checking --enable-lbuserdata -g -Werror=vla
command: |
export PATH=/usr/lib/ccache:${PATH}
./build all-test netlrts-linux-x86_64 smp -j3 --with-production --enable-error-checking --enable-lbuserdata -g -Werror=vla
- save_cache:
key: "ccache-smp-{{ arch }}-{{ .Branch }}-{{ epoch }}"
paths: [ "/home/circleci/.ccache" ]
- run:
name: Test
command: make -C netlrts-linux-x86_64-smp/tmp test TESTOPTS="++local +setcpuaffinity +CmiSleepOnIdle"
Expand Down

0 comments on commit f3bff45

Please sign in to comment.