mirror of https://github.com/procxx/kepka.git
Added auto caching for Github CI.
This commit is contained in:
parent
2b2ac2e48f
commit
1ca096e7ce
|
@ -33,6 +33,7 @@ jobs:
|
||||||
ONLY_CACHE: "false"
|
ONLY_CACHE: "false"
|
||||||
MANUAL_CACHING: "6"
|
MANUAL_CACHING: "6"
|
||||||
DOC_PATH: "docs/building-cmake.md"
|
DOC_PATH: "docs/building-cmake.md"
|
||||||
|
AUTO_CACHING: "1"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Get repository name.
|
- name: Get repository name.
|
||||||
|
@ -56,6 +57,7 @@ jobs:
|
||||||
p doc
|
p doc
|
||||||
|
|
||||||
- name: First set up.
|
- name: First set up.
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
mv $REPO_NAME temp
|
mv $REPO_NAME temp
|
||||||
|
@ -87,6 +89,10 @@ jobs:
|
||||||
|
|
||||||
gcc --version > CACHE_KEY.txt
|
gcc --version > CACHE_KEY.txt
|
||||||
echo $MANUAL_CACHING >> 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)
|
md5cache=$(md5sum CACHE_KEY.txt | cut -c -32)
|
||||||
echo ::set-env name=CACHE_KEY::$md5cache
|
echo ::set-env name=CACHE_KEY::$md5cache
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,8 @@ jobs:
|
||||||
ONLY_CACHE: "false"
|
ONLY_CACHE: "false"
|
||||||
MANUAL_CACHING: "2"
|
MANUAL_CACHING: "2"
|
||||||
DOC_PATH: "docs/building-xcode.md"
|
DOC_PATH: "docs/building-xcode.md"
|
||||||
|
AUTO_CACHING: "1"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Get repository name.
|
- name: Get repository name.
|
||||||
run: echo ::set-env name=REPO_NAME::${GITHUB_REPOSITORY##*/}
|
run: echo ::set-env name=REPO_NAME::${GITHUB_REPOSITORY##*/}
|
||||||
|
@ -61,6 +63,10 @@ jobs:
|
||||||
echo $MIN_MAC >> CACHE_KEY.txt
|
echo $MIN_MAC >> CACHE_KEY.txt
|
||||||
echo $PREFIX >> CACHE_KEY.txt
|
echo $PREFIX >> CACHE_KEY.txt
|
||||||
echo $MANUAL_CACHING >> 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 ::set-env name=CACHE_KEY::`md5 -q CACHE_KEY.txt`
|
||||||
|
|
||||||
echo ::add-path::$PWD/Libraries/depot_tools
|
echo ::add-path::$PWD/Libraries/depot_tools
|
||||||
|
|
|
@ -30,6 +30,8 @@ jobs:
|
||||||
ONLY_CACHE: "false"
|
ONLY_CACHE: "false"
|
||||||
MANUAL_CACHING: "2"
|
MANUAL_CACHING: "2"
|
||||||
DOC_PATH: "docs/building-msvc.md"
|
DOC_PATH: "docs/building-msvc.md"
|
||||||
|
AUTO_CACHING: "1"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Get repository name.
|
- name: Get repository name.
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -69,6 +71,10 @@ jobs:
|
||||||
- name: Generate cache key.
|
- name: Generate cache key.
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
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 }'`
|
echo ::set-env name=CACHE_KEY::`md5sum CACHE_KEY.txt | awk '{ print $1 }'`
|
||||||
|
|
||||||
- name: Choco installs.
|
- name: Choco installs.
|
||||||
|
|
Loading…
Reference in New Issue