ci: twister: Store ccache data in node cache
This commit updates the twister workflow to store ccache data in the zephyr-runner v2 node cache. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit is contained in:
parent
9a9bebb9f9
commit
1be3aacad3
|
@ -136,6 +136,7 @@ jobs:
|
|||
matrix:
|
||||
subset: ${{fromJSON(needs.twister-build-prep.outputs.subset)}}
|
||||
env:
|
||||
CCACHE_DIR: /node-cache/ccache-zephyr
|
||||
BSIM_OUT_PATH: /opt/bsim/
|
||||
BSIM_COMPONENTS_PATH: /opt/bsim/components
|
||||
TWISTER_COMMON: ' --force-color --inline-logs -v -N -M --retry-failed 3 '
|
||||
|
@ -200,32 +201,12 @@ jobs:
|
|||
echo "github.base_ref: ${{ github.base_ref }}"
|
||||
echo "github.ref_name: ${{ github.ref_name }}"
|
||||
|
||||
- name: Prepare ccache timestamp/data
|
||||
id: ccache_cache_timestamp
|
||||
shell: cmake -P {0}
|
||||
- name: Set up ccache
|
||||
run: |
|
||||
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
|
||||
string(REPLACE "/" "_" repo ${{github.repository}})
|
||||
string(REPLACE "-" "_" repo2 ${repo})
|
||||
file(APPEND $ENV{GITHUB_OUTPUT} "repo=${repo2}\n")
|
||||
|
||||
- name: use cache
|
||||
id: cache-ccache
|
||||
uses: zephyrproject-rtos/action-s3-cache@v1.2.0
|
||||
continue-on-error: true
|
||||
with:
|
||||
key: ${{ steps.ccache_cache_timestamp.outputs.repo }}-${{ github.ref_name }}-${{github.event_name}}-${{ matrix.subset }}-ccache
|
||||
path: /github/home/.cache/ccache
|
||||
aws-s3-bucket: ccache.zephyrproject.org
|
||||
aws-access-key-id: ${{ vars.AWS_CCACHE_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_CCACHE_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-east-2
|
||||
|
||||
- name: ccache stats initial
|
||||
run: |
|
||||
mkdir -p /github/home/.cache
|
||||
test -d github/home/.cache/ccache && rm -rf /github/home/.cache/ccache && mv github/home/.cache/ccache /github/home/.cache/ccache
|
||||
ccache -M 10G -s
|
||||
mkdir -p ${CCACHE_DIR}
|
||||
ccache -M 10G
|
||||
ccache -p
|
||||
ccache -z -s -vv
|
||||
|
||||
- if: github.event_name == 'push'
|
||||
name: Run Tests with Twister (Push)
|
||||
|
@ -268,10 +249,10 @@ jobs:
|
|||
fi
|
||||
fi
|
||||
|
||||
- name: ccache stats post
|
||||
- name: Print ccache stats
|
||||
if: always()
|
||||
run: |
|
||||
ccache -p
|
||||
ccache -s
|
||||
ccache -s -vv
|
||||
|
||||
- name: Upload Unit Test Results
|
||||
if: always()
|
||||
|
|
Loading…
Reference in New Issue