update charts to KEC2 #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Mac OS Build | |
on: | |
push: | |
jobs: | |
build: | |
name: Mac OS Build | |
runs-on: macos-13 | |
steps: | |
- name: Pulling the new commit | |
uses: actions/[email protected] | |
- name: Setting up Haxe | |
uses: krdlab/[email protected] | |
with: | |
haxe-version: 4.3.4 # Utilizza Haxe 4.3.4 | |
- name: Setting up Neko manually | |
run: | | |
mkdir -p /usr/local/lib | |
ln -sf /Users/runner/hostedtoolcache/neko/2.3.0/x64/libneko.2.dylib /usr/local/lib/libneko.2.dylib | |
- name: Setting DYLD_LIBRARY_PATH | |
run: echo "DYLD_LIBRARY_PATH=/Users/runner/hostedtoolcache/neko/2.3.0/x64:/usr/local/lib" >> $GITHUB_ENV | |
- name: Installing Lime | |
run: | | |
export DYLD_LIBRARY_PATH=/Users/runner/hostedtoolcache/neko/2.3.0/x64:/usr/local/lib | |
haxelib install lime --verbose || echo "Lime installation failed" | |
- name: Installing OpenFL | |
run: | | |
export DYLD_LIBRARY_PATH=/Users/runner/hostedtoolcache/neko/2.3.0/x64:/usr/local/lib | |
haxelib install openfl --verbose || echo "OpenFL installation failed" | |
- name: Verifying Libraries | |
run: | | |
haxelib list | |
- name: Building the game | |
run: | | |
export DYLD_LIBRARY_PATH=/Users/runner/hostedtoolcache/neko/2.3.0/x64:/usr/local/lib | |
haxelib run lime build mac --verbose || echo "Build failed" | |
- name: Uploading artifact (entire build) | |
uses: actions/[email protected] | |
with: | |
name: Kade Engine Community | |
path: export/release/macos/bin | |
- name: Clearing already existing cache | |
uses: actions/[email protected] | |
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-macos") { | |
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/[email protected] | |
with: | |
key: cache-build-macos | |
path: | | |
.haxelib/ | |
export/release/macos/haxe/ | |
export/release/macos/obj/ | |
restore-keys: | | |
cache-build-macos |