mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-11 08:48:14 +00:00
Added auto caching for Github CI.
This commit is contained in:
parent
2b2ac2e48f
commit
1ca096e7ce
6
.github/workflows/linux.yml
vendored
6
.github/workflows/linux.yml
vendored
@ -33,6 +33,7 @@ jobs:
|
||||
ONLY_CACHE: "false"
|
||||
MANUAL_CACHING: "6"
|
||||
DOC_PATH: "docs/building-cmake.md"
|
||||
AUTO_CACHING: "1"
|
||||
|
||||
steps:
|
||||
- name: Get repository name.
|
||||
@ -56,6 +57,7 @@ jobs:
|
||||
p doc
|
||||
|
||||
- name: First set up.
|
||||
shell: bash
|
||||
run: |
|
||||
cd ..
|
||||
mv $REPO_NAME temp
|
||||
@ -87,6 +89,10 @@ jobs:
|
||||
|
||||
gcc --version > CACHE_KEY.txt
|
||||
echo $MANUAL_CACHING >> CACHE_KEY.txt
|
||||
if [ "$AUTO_CACHING" == "1" ]; then
|
||||
thisFile=$REPO_NAME/.github/workflows/linux.yml
|
||||
echo `md5sum $thisFile | cut -c -32` >> CACHE_KEY.txt
|
||||
fi
|
||||
md5cache=$(md5sum CACHE_KEY.txt | cut -c -32)
|
||||
echo ::set-env name=CACHE_KEY::$md5cache
|
||||
|
||||
|
6
.github/workflows/mac.yml
vendored
6
.github/workflows/mac.yml
vendored
@ -35,6 +35,8 @@ jobs:
|
||||
ONLY_CACHE: "false"
|
||||
MANUAL_CACHING: "2"
|
||||
DOC_PATH: "docs/building-xcode.md"
|
||||
AUTO_CACHING: "1"
|
||||
|
||||
steps:
|
||||
- name: Get repository name.
|
||||
run: echo ::set-env name=REPO_NAME::${GITHUB_REPOSITORY##*/}
|
||||
@ -61,6 +63,10 @@ jobs:
|
||||
echo $MIN_MAC >> CACHE_KEY.txt
|
||||
echo $PREFIX >> CACHE_KEY.txt
|
||||
echo $MANUAL_CACHING >> CACHE_KEY.txt
|
||||
if [ "$AUTO_CACHING" == "1" ]; then
|
||||
thisFile=$REPO_NAME/.github/workflows/mac.yml
|
||||
echo `md5 -q $thisFile` >> CACHE_KEY.txt
|
||||
fi
|
||||
echo ::set-env name=CACHE_KEY::`md5 -q CACHE_KEY.txt`
|
||||
|
||||
echo ::add-path::$PWD/Libraries/depot_tools
|
||||
|
6
.github/workflows/win.yml
vendored
6
.github/workflows/win.yml
vendored
@ -30,6 +30,8 @@ jobs:
|
||||
ONLY_CACHE: "false"
|
||||
MANUAL_CACHING: "2"
|
||||
DOC_PATH: "docs/building-msvc.md"
|
||||
AUTO_CACHING: "1"
|
||||
|
||||
steps:
|
||||
- name: Get repository name.
|
||||
shell: bash
|
||||
@ -69,6 +71,10 @@ jobs:
|
||||
- name: Generate cache key.
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "$AUTO_CACHING" == "1" ]; then
|
||||
thisFile=$REPO_NAME/.github/workflows/win.yml
|
||||
echo `md5sum $thisFile | awk '{ print $1 }'` >> CACHE_KEY.txt
|
||||
fi
|
||||
echo ::set-env name=CACHE_KEY::`md5sum CACHE_KEY.txt | awk '{ print $1 }'`
|
||||
|
||||
- name: Choco installs.
|
||||
|
Loading…
Reference in New Issue
Block a user