HUD System #163
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: Test Builds | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
windows: | |
permissions: write-all | |
runs-on: windows-latest | |
steps: | |
- name: Checking Latest Commit | |
uses: actions/checkout@main | |
with: | |
submodules: true | |
- name: Setup Haxe | |
uses: krdlab/setup-haxe@master | |
with: | |
haxe-version: 4.3.6 | |
- name: Run Cache | |
uses: actions/cache@v3 | |
with: | |
# not caching the bin folder to prevent asset duplication and stuff like that | |
key: windows-build-cache | |
path: | | |
.haxelib/ | |
export/build/windows/haxe/ | |
export/build/windows/obj/ | |
restore-keys: windows-build-cache | |
- name: Install Libraries | |
run: haxe -cp setup -D analyzer-optimize --run Main --always | |
- name: Compile Engine | |
run: haxelib run lime build windows -final | |
- name: Upload Artifact | |
uses: actions/upload-artifact@main | |
with: | |
name: Windows | |
path: export/build/windows/bin | |
overwrite: true | |
include-hidden-files: true | |
if-no-files-found: error | |
- name: Clearing 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 == 'windows-build-cache') { | |
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: Run New Cache | |
uses: actions/cache@v3 | |
with: | |
# not caching the bin folder to prevent asset duplication and stuff like that | |
key: windows-build-cache | |
path: | | |
.haxelib/ | |
export/build/windows/haxe/ | |
export/build/windows/obj/ | |
restore-keys: windows-build-cache | |
mac: | |
permissions: write-all | |
runs-on: macos-13 | |
steps: | |
- name: Checking Latest Commit | |
uses: actions/checkout@main | |
with: | |
submodules: true | |
- name: Setup Haxe | |
uses: krdlab/setup-haxe@master | |
with: | |
haxe-version: 4.3.6 | |
- name: Run Cache | |
uses: actions/cache@v3 | |
with: | |
# not caching the bin folder to prevent asset duplication and stuff like that | |
key: mac-build-cache | |
path: | | |
.haxelib/ | |
export/build/mac/haxe/ | |
export/build/mac/obj/ | |
restore-keys: mac-build-cache | |
- name: Installing Libs | |
run: haxe -cp setup -D analyzer-optimize --run Main --always | |
- name: Building the game | |
run: haxelib run lime build mac -final | |
- name: Upload Artifact | |
uses: actions/upload-artifact@main | |
with: | |
name: Mac | |
path: export/build/macos/bin | |
overwrite: true | |
include-hidden-files: true | |
if-no-files-found: error | |
- name: Clearing 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 == 'mac-build-cache') { | |
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: Run New Cache | |
uses: actions/cache@v3 | |
with: | |
# not caching the bin folder to prevent asset duplication and stuff like that | |
key: mac-build-cache | |
path: | | |
.haxelib/ | |
export/build/mac/haxe/ | |
export/build/mac/obj/ | |
restore-keys: mac-build-cache | |
linux: | |
permissions: write-all | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checking Latest Commit | |
uses: actions/checkout@main | |
with: | |
submodules: true | |
- name: Setup Haxe | |
uses: krdlab/setup-haxe@master | |
with: | |
haxe-version: 4.3.6 | |
- name: Run Cache | |
uses: actions/cache@v3 | |
with: | |
# not caching the bin folder to prevent asset duplication and stuff like that | |
key: linux-build-cache | |
path: | | |
.haxelib/ | |
export/build/linux/haxe/ | |
export/build/linux/obj/ | |
restore-keys: linux-build-cache | |
- name: Installing Dependencies | |
run: sudo apt-get update && sudo apt-get upgrade && sudo apt-get install libvlc-dev libvlccore-dev vlc-bin vlc | |
- name: Installing Libs | |
run: haxe -cp setup -D analyzer-optimize --run Main --always | |
- name: Building the game | |
run: haxelib run lime build linux -final | |
- name: Upload Artifact | |
uses: actions/upload-artifact@main | |
with: | |
name: Linux | |
path: export/build/linux/bin | |
overwrite: true | |
include-hidden-files: true | |
if-no-files-found: error | |
- name: Clearing 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 == 'linux-build-cache') { | |
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: Run New Cache | |
uses: actions/cache@v3 | |
with: | |
# not caching the bin folder to prevent asset duplication and stuff like that | |
key: linux-build-cache | |
path: | | |
.haxelib/ | |
export/build/linux/haxe/ | |
export/build/linux/obj/ | |
restore-keys: linux-build-cache |