Skip to content

Commit 8808925

Browse files
ci: fix cache actions in workflow
- Update actions/cache to v4.2.3. - Remove .ccache before packaging. Signed-off-by: Nagendra T P <[email protected]>
1 parent 36e961c commit 8808925

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

.github/workflows/build-cn10k.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ jobs:
2626
- name: Generate cache keys
2727
id: get_ref_keys
2828
run: |
29-
echo 'ccache=ccache-'$(date -u +%Y-m%M) >> $GITHUB_OUTPUT
29+
echo 'ccache=ccache-'$(date -u +%Y-%m) >> $GITHUB_OUTPUT
3030
- name: Retrieve ccache cache
31-
uses: actions/cache@v4
31+
uses: actions/cache@v4.2.3
3232
with:
3333
path: ~/.ccache
3434
key: ${{ steps.get_ref_keys.outputs.ccache }}-${{ github.ref }}
@@ -56,7 +56,6 @@ jobs:
5656
id: build
5757
run: |
5858
set -x
59-
mkdir -p ~/.ccache
6059
BASE_DIR=${PWD}
6160
sudo apt-get update -q -y
6261
sudo apt-get install -y apt-utils gcc meson sudo make dialog ccache git build-essential software-properties-common
@@ -117,7 +116,6 @@ jobs:
117116
source ${BASE_DIR}/artifacts/env
118117
DISTRO=ubuntu-`lsb_release -rs`
119118
echo "DISTRO=${DISTRO}" >> ${BASE_DIR}/artifacts/env
120-
echo "cache_dir = ~/.ccache" > ~/.ccache/ccache.conf
121119
ccache -p
122120
git config --global --add safe.directory "${PWD}"
123121
sudo APT_ARGS='-y -q' make install-deps
@@ -137,6 +135,7 @@ jobs:
137135
echo "Homepage: https://wiki.fd.io/view/VPP" >> DEBIAN/control
138136
echo "Description: Vector Packet Processing (VPP) for Octeon10" >> DEBIAN/control
139137
cd -
138+
rm -rf "${PWD}/install/~" "${PWD}/install/home"
140139
mv "${PWD}/install" "${PWD}/vpp-${PKG_VERSION_NAME}-cn10k${PKG_POSTFIX}_${MRVL_PKG_VERSION}_arm64"
141140
dpkg --build "vpp-${PKG_VERSION_NAME}-cn10k${PKG_POSTFIX}_${MRVL_PKG_VERSION}_arm64"
142141
cp "vpp-${PKG_VERSION_NAME}-cn10k${PKG_POSTFIX}_${MRVL_PKG_VERSION}_arm64.deb" ${BASE_DIR}/artifacts/.

.github/workflows/build-cn9k.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ jobs:
2525
- name: Generate cache keys
2626
id: get_ref_keys
2727
run: |
28-
echo 'ccache=ccache-'$(date -u +%Y-m%M) >> $GITHUB_OUTPUT
28+
echo 'ccache=ccache-'$(date -u +%Y-%m) >> $GITHUB_OUTPUT
2929
- name: Retrieve ccache cache
30-
uses: actions/cache@v4
30+
uses: actions/cache@v4.2.3
3131
with:
3232
path: ~/.ccache
3333
key: ${{ steps.get_ref_keys.outputs.ccache }}-${{ github.ref }}
@@ -61,7 +61,6 @@ jobs:
6161
id: build
6262
run: |
6363
set -x
64-
mkdir -p ~/.ccache
6564
BASE_DIR=${PWD}
6665
sudo apt-get update -q -y
6766
sudo apt-get install -y apt-utils gcc meson sudo make dialog ccache git build-essential software-properties-common
@@ -123,7 +122,6 @@ jobs:
123122
source ${BASE_DIR}/artifacts/env
124123
DISTRO=ubuntu-`lsb_release -rs`
125124
echo "DISTRO=${DISTRO}" >> ${BASE_DIR}/artifacts/env
126-
echo "cache_dir = ~/.ccache" > ~/.ccache/ccache.conf
127125
ccache -p
128126
git config --global --add safe.directory "${PWD}"
129127
sudo APT_ARGS='-y -q' make install-deps
@@ -141,6 +139,7 @@ jobs:
141139
echo "Homepage: https://wiki.fd.io/view/VPP" >> DEBIAN/control
142140
echo "Description: Vector Packet Processing (VPP) for Octeon9" >> DEBIAN/control
143141
cd -
142+
rm -rf "${PWD}/install/~" "${PWD}/install/home"
144143
mv "${PWD}/install" "${PWD}/vpp-${PKG_VERSION_NAME}-cn9k${PKG_POSTFIX}_${MRVL_PKG_VERSION}_arm64"
145144
dpkg --build "vpp-${PKG_VERSION_NAME}-cn9k${PKG_POSTFIX}_${MRVL_PKG_VERSION}_arm64"
146145
cp "vpp-${PKG_VERSION_NAME}-cn9k${PKG_POSTFIX}_${MRVL_PKG_VERSION}_arm64.deb" ${BASE_DIR}/artifacts/.

0 commit comments

Comments
 (0)