Fix CCache path in GitHub Actions

This commit is contained in:
Siarhei Fedartsou 2024-05-26 18:38:00 +02:00
parent 906650eec5
commit d8842bbacd

View File

@ -12,10 +12,10 @@ on:
- master - master
env: env:
CCACHE_DIR: ~/.ccache
CCACHE_TEMPDIR: /tmp/.ccache-temp CCACHE_TEMPDIR: /tmp/.ccache-temp
CCACHE_COMPRESS: 1 CCACHE_COMPRESS: 1
CASHER_TIME_OUT: 599 # one second less than 10m to avoid 10m timeout error: https://github.com/Project-OSRM/osrm-backend/issues/2742 CASHER_TIME_OUT: 599 # one second less than 10m to avoid 10m timeout error: https://github.com/Project-OSRM/osrm-backend/issues/2742
CCACHE_VERSION: 3.3.1
CMAKE_VERSION: 3.21.2 CMAKE_VERSION: 3.21.2
ENABLE_NODE_BINDINGS: "ON" ENABLE_NODE_BINDINGS: "ON"
@ -359,10 +359,7 @@ jobs:
- name: Enable compiler cache - name: Enable compiler cache
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: path: {{ env.CCACHE_DIR }}
~/.config/ccache
~/.ccache
~/Library/Caches/ccache
key: ccache-${{ matrix.name }}-${{ github.sha }} key: ccache-${{ matrix.name }}-${{ github.sha }}
restore-keys: | restore-keys: |
ccache-${{ matrix.name }}- ccache-${{ matrix.name }}-
@ -491,7 +488,7 @@ jobs:
echo "Using ${JOBS} jobs" echo "Using ${JOBS} jobs"
pushd ${OSRM_BUILD_DIR} pushd ${OSRM_BUILD_DIR}
ccache --zero-stats
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DENABLE_CONAN=${ENABLE_CONAN:-OFF} \ -DENABLE_CONAN=${ENABLE_CONAN:-OFF} \
-DENABLE_ASSERTIONS=${ENABLE_ASSERTIONS:-OFF} \ -DENABLE_ASSERTIONS=${ENABLE_ASSERTIONS:-OFF} \
@ -508,7 +505,6 @@ jobs:
if [[ "${NODE_PACKAGE_TESTS_ONLY}" != "ON" ]]; then if [[ "${NODE_PACKAGE_TESTS_ONLY}" != "ON" ]]; then
make tests --jobs=${JOBS} make tests --jobs=${JOBS}
make benchmarks --jobs=${JOBS} make benchmarks --jobs=${JOBS}
ccache -s
sudo make install sudo make install
if [[ "${RUNNER_OS}" == "Linux" ]]; then if [[ "${RUNNER_OS}" == "Linux" ]]; then
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${OSRM_INSTALL_DIR}/lib" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${OSRM_INSTALL_DIR}/lib" >> $GITHUB_ENV
@ -611,6 +607,10 @@ jobs:
omitNameDuringUpdate: true omitNameDuringUpdate: true
replacesArtifacts: true replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: Show CCache statistics
run: |
ccache -p
ccache -s
benchmarks: benchmarks:
@ -629,10 +629,7 @@ jobs:
- name: Enable compiler cache - name: Enable compiler cache
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: | path: {{ env.CCACHE_DIR }}
~/.config/ccache
~/.ccache
~/Library/Caches/ccache
key: v1-ccache-benchmarks-${{ github.sha }} key: v1-ccache-benchmarks-${{ github.sha }}
restore-keys: | restore-keys: |
v1-ccache-benchmarks- v1-ccache-benchmarks-