1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-19 21:33:06 +00:00

.haxelib caching

This commit is contained in:
Cameron Taylor 2023-06-15 14:09:19 -04:00
parent dff48c3013
commit a7aafa9e3e
2 changed files with 6 additions and 40 deletions

View file

@ -16,5 +16,5 @@ runs:
haxelib git haxelib https://github.com/HaxeFoundation/haxelib.git
haxelib version
haxelib --global install hmm
haxelib --global run hmm install --quiet
haxelib --global run hmm install
shell: bash

View file

@ -44,18 +44,14 @@ jobs:
actions: write
steps:
- uses: actions/checkout@v3
- name: Restore existing build cache for faster compilation
uses: actions/cache/restore@v3
id: cache-windows-shit
- name: Restore/create existing haxelib cache for faster downloads
uses: actions/cache@v3
id: cache-haxelib-windows
with:
# wha?
key: cache-build-win
key: cache-haxelib-windows-${{ hashFiles('**/hmm.json')}}
path: |
.haxelib/
export/debug/windows/haxe/
export/debug/windows/obj/
restore-keys: |
cache-build-windows
- uses: ./.github/actions/setup-haxeshit
- name: Build game
run: |
@ -66,33 +62,3 @@ jobs:
butler-key: ${{ secrets.BUTLER_API_KEY}}
build-dir: export/debug/windows/bin
target: win
- name: Clearing already existing cache
uses: actions/github-script@v6
with:
script: |
const caches = await github.rest.actions.getActionsCacheList({
owner: context.repo.owner,
repo: context.repo.repo,
})
for (const cache of caches.data.actions_caches) {
if (cache.key == "cache-build-windows") {
console.log('Clearing ' + cache.key + '...')
await github.rest.actions.deleteActionsCacheById({
owner: context.repo.owner,
repo: context.repo.repo,
cache_id: cache.id,
})
console.log("Cache cleared.")
}
}
- name: Uploading new cache
uses: actions/cache/save@v3
with:
# caching again since for some reason it doesnt work with the first post cache shit
key: cache-build-windows
path: |
.haxelib/
export/debug/windows/haxe/
export/debug/windows/obj/
restore-keys: |
cache-build-windows