mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-14 22:30:26 +01:00
1d0c61214a
- Upgrades actions using Node.js 12 to versions using Node.js 16. - Updates deprecated set-output command. - Specifies more specific version of CMake on macOS runner.
32 lines
1.1 KiB
YAML
32 lines
1.1 KiB
YAML
name: Cache dependencies
|
|
inputs:
|
|
platform:
|
|
required: true
|
|
target:
|
|
required: true
|
|
bits:
|
|
required: true
|
|
outputs:
|
|
cache-hit:
|
|
value: ${{ steps.cache.outputs.cache-hit }}
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Hash submodule revisions
|
|
id: hash
|
|
working-directory: addons/godot_xterm/native/thirdparty
|
|
shell: bash
|
|
run: |
|
|
cache_version=1 # Increment this number to invalidate the cache.
|
|
godot_cpp_rev=$(git ls-tree HEAD godot-cpp --object-only)
|
|
libuv_rev=$(git ls-tree HEAD libuv --object-only)
|
|
libtsm_rev=$(git ls-tree HEAD libtsm --object-only)
|
|
hash_cmd=$([[ $RUNNER_OS == 'Windows' ]] && echo 'sha1sum' || echo 'shasum')
|
|
hash_of_hashes=$(echo -n "$godot_cpp_rev$libuv_rev$libtsm_rev$cache_version" | $hash_cmd | head -c 40)
|
|
echo "name=hash::$hash_of_hashes" >> $GITHUB_OUTPUT
|
|
- name: Cache submodules
|
|
uses: actions/cache@v3
|
|
id: cache
|
|
with:
|
|
path: addons/godot_xterm/native/thirdparty
|
|
key: thirdparty-${{ inputs.platform }}-${{ inputs.bits }}-${{ inputs.target }}-${{ steps.hash.outputs.hash }}
|