CI: cache does not work so well if there's nothing to cache

This commit is contained in:
Sergii Pylypenko
2022-01-15 00:12:06 +02:00
parent 8d10d1ff0f
commit 55303806d9
2 changed files with 78 additions and 78 deletions

View File

@@ -57,45 +57,45 @@ jobs:
run: |
sed -i "s/MultiABI=.*/MultiABI='${ARCH_LIST}'/g" project/jni/application/src/AndroidAppSettings.cfg
- name: Get Boost revision
id: boost-rev
run: echo "::set-output name=BOOST_REV::`git -C project/jni/boost/src rev-parse HEAD`"
- name: Get ICU revision
id: icu-rev
run: echo "::set-output name=ICU_REV::`git -C project/jni/iconv/src rev-parse HEAD`"
- name: Copy Boost libraries from cache
uses: actions/cache@v2
id: cache-boost
with:
# The same SDL revision will produce the same libraries
key: ${{steps.boost-rev.outputs.BOOST_REV}}
path: |
build-android/project/jni/boost/include
build-android/project/jni/boost/lib
- name: Copy ICU libraries from cache
uses: actions/cache@v2
id: cache-icu
with:
# The same SDL revision will produce the same libraries
key: ${{steps.icu-rev.outputs.ICU_REV}}
path: |
build-android/project/jni/iconv/include
build-android/project/jni/iconv/lib
build-android/project/jni/icuuc/include
build-android/project/jni/icuuc/lib
- name: Touch cached file timestamps
if: steps.cache-boost.outputs.cache-hit == 'true' || steps.cache-icu.outputs.cache-hit == 'true'
working-directory: build-android
run: >
touch
project/jni/boost/lib/*/*
project/jni/iconv/lib/*/*
project/jni/icuuc/lib/*/*
|| true
# - name: Get Boost revision
# id: boost-rev
# run: echo "::set-output name=BOOST_REV::`git -C project/jni/boost/src rev-parse HEAD`"
#
# - name: Get ICU revision
# id: icu-rev
# run: echo "::set-output name=ICU_REV::`git -C project/jni/iconv/src rev-parse HEAD`"
#
# - name: Copy Boost libraries from cache
# uses: actions/cache@v2
# id: cache-boost
# with:
# # The same SDL revision will produce the same libraries
# key: ${{steps.boost-rev.outputs.BOOST_REV}}
# path: |
# build-android/project/jni/boost/include
# build-android/project/jni/boost/lib
#
# - name: Copy ICU libraries from cache
# uses: actions/cache@v2
# id: cache-icu
# with:
# # The same SDL revision will produce the same libraries
# key: ${{steps.icu-rev.outputs.ICU_REV}}
# path: |
# build-android/project/jni/iconv/include
# build-android/project/jni/iconv/lib
# build-android/project/jni/icuuc/include
# build-android/project/jni/icuuc/lib
#
# - name: Touch cached Boost timestamps
# if: steps.cache-boost.outputs.cache-hit == 'true' || steps.cache-icu.outputs.cache-hit == 'true'
# working-directory: build-android
# run: touch project/jni/boost/lib/*/* || true
#
# - name: Touch cached ICU timestamps
# if: steps.cache-boost.outputs.cache-hit == 'true' || steps.cache-icu.outputs.cache-hit == 'true'
# working-directory: build-android
# run: touch project/jni/iconv/lib/*/* project/jni/icuuc/lib/*/* || true
- name: Patch Java files and build Boost, ICU, and OpenSSL
run: |

View File

@@ -57,45 +57,45 @@ jobs:
run: |
sed -i "s/MultiABI=.*/MultiABI='${ARCH_LIST}'/g" project/jni/application/src/AndroidAppSettings.cfg
- name: Get Boost revision
id: boost-rev
run: echo "::set-output name=BOOST_REV::`git -C project/jni/boost/src rev-parse HEAD`"
- name: Get ICU revision
id: icu-rev
run: echo "::set-output name=ICU_REV::`git -C project/jni/iconv/src rev-parse HEAD`"
- name: Copy Boost libraries from cache
uses: actions/cache@v2
id: cache-boost
with:
# The same SDL revision will produce the same libraries
key: ${{steps.boost-rev.outputs.BOOST_REV}}
path: |
build-android/project/jni/boost/include
build-android/project/jni/boost/lib
- name: Copy ICU libraries from cache
uses: actions/cache@v2
id: cache-icu
with:
# The same SDL revision will produce the same libraries
key: ${{steps.icu-rev.outputs.ICU_REV}}
path: |
build-android/project/jni/iconv/include
build-android/project/jni/iconv/lib
build-android/project/jni/icuuc/include
build-android/project/jni/icuuc/lib
- name: Touch cached file timestamps
if: steps.cache-boost.outputs.cache-hit == 'true' || steps.cache-icu.outputs.cache-hit == 'true'
working-directory: build-android
run: >
touch
project/jni/boost/lib/*/*
project/jni/iconv/lib/*/*
project/jni/icuuc/lib/*/*
|| true
# - name: Get Boost revision
# id: boost-rev
# run: echo "::set-output name=BOOST_REV::`git -C project/jni/boost/src rev-parse HEAD`"
#
# - name: Get ICU revision
# id: icu-rev
# run: echo "::set-output name=ICU_REV::`git -C project/jni/iconv/src rev-parse HEAD`"
#
# - name: Copy Boost libraries from cache
# uses: actions/cache@v2
# id: cache-boost
# with:
# # The same SDL revision will produce the same libraries
# key: ${{steps.boost-rev.outputs.BOOST_REV}}
# path: |
# build-android/project/jni/boost/include
# build-android/project/jni/boost/lib
#
# - name: Copy ICU libraries from cache
# uses: actions/cache@v2
# id: cache-icu
# with:
# # The same SDL revision will produce the same libraries
# key: ${{steps.icu-rev.outputs.ICU_REV}}
# path: |
# build-android/project/jni/iconv/include
# build-android/project/jni/iconv/lib
# build-android/project/jni/icuuc/include
# build-android/project/jni/icuuc/lib
#
# - name: Touch cached Boost timestamps
# if: steps.cache-boost.outputs.cache-hit == 'true' || steps.cache-icu.outputs.cache-hit == 'true'
# working-directory: build-android
# run: touch project/jni/boost/lib/*/* || true
#
# - name: Touch cached ICU timestamps
# if: steps.cache-boost.outputs.cache-hit == 'true' || steps.cache-icu.outputs.cache-hit == 'true'
# working-directory: build-android
# run: touch project/jni/iconv/lib/*/* project/jni/icuuc/lib/*/* || true
- name: Patch Java files and build Boost, ICU, and OpenSSL
run: |