fix week 6 #740
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: Linux Build | |
on: | |
push: | |
jobs: | |
build: | |
name: Linux Build | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: hxvlc bs wtf | |
run: | | |
sudo apt-get update | |
sudo apt-get install libvlc-dev | |
sudo apt-get install libvlccore-dev | |
sudo apt-get install glibc-source | |
sudo apt-get install libidn12 | |
sudo apt-get install libidn-dev | |
- name: Pulling the source | |
uses: actions/[email protected] | |
- name: Setting up Haxe | |
uses: krdlab/[email protected] | |
with: | |
haxe-version: 4.3.6 | |
- name: Restore existing build cache for faster compilation | |
uses: actions/[email protected] | |
with: | |
# not caching the bin folder to prevent asset duplication and stuff like that | |
key: cache-build-linux | |
path: | | |
.haxelib/ | |
export/release/linux/haxe/ | |
export/release/linux/obj/ | |
restore-keys: | | |
cache-build-linux | |
- name: Installing/Updating libraries | |
run: | | |
haxelib --global install hxpkg | |
haxelib --global run hxpkg setup | |
hxpkg install --force | |
- name: Building the game | |
run: | | |
haxelib run lime build linux | |
- name: Uploading artifact (entire build) | |
uses: actions/[email protected] | |
with: | |
name: Kade Engine Community | |
path: export/release/linux/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-linux") { | |
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: | |
# caching again since for some reason it doesnt work with the first post cache shit | |
key: cache-build-linux | |
path: | | |
.haxelib/ | |
export/release/linux/haxe/ | |
export/release/linux/obj/ | |
restore-keys: | | |
cache-build-linux |