Merge pull request #110 from FunkinCrew/actions-cache-fix

.haxelib caching
This commit is contained in:
Cameron Taylor 2023-06-17 16:27:33 -04:00 committed by GitHub
commit 6bce92e54a
3 changed files with 12 additions and 46 deletions

View file

@ -10,11 +10,19 @@ runs:
run: |
haxelib config
shell: bash
- name: Restore/create existing haxelib cache for faster downloads
uses: actions/cache@v3
id: cache-haxelib-windows
with:
# wha?
key: cache-haxelib-${{ runner.os }}-${{ hashFiles('**/hmm.json')}}
path: |
.haxelib/
- name: Installing Haxe lol
run: |
haxe -version
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

@ -2,7 +2,7 @@ name: build-upload
on:
workflow_dispatch:
push:
jobs:
check_date:
runs-on: ubuntu-latest
@ -44,18 +44,6 @@ 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
with:
# wha?
key: cache-build-win
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 +54,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

View file

@ -170,8 +170,8 @@ class GameOverSubState extends MusicBeatSubState
if (controls.BACK)
{
blueballed = false;
PlayState.deathCounter = 0;
PlayState.seenCutscene = false;
PlayState.instance.deathCounter = 0;
// PlayState.seenCutscene = false; // old thing...
gameOverMusic.stop();
if (PlayStatePlaylist.isStoryMode) FlxG.switchState(new StoryMenuState());