Skip to content

Submodule Baby!

Submodule Baby! #16

Workflow file for this run

name: Test Builds
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
windows:
permissions: write-all
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup Haxe environment
uses: krdlab/setup-haxe@v1
with:
haxe-version: 4.2.5
- 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: Installing Libs
run: |
haxe -cp commandline -D analyzer-optimize --run Main setup
- name: Building the game
run: |
haxelib run lime build windows
- name: Publish Artifact
uses: actions/upload-artifact@v4
with:
name: Windows
path: export/build/windows/bin
overwrite: true
include-hidden-files: true
- 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:
- uses: actions/checkout@v2
- name: Setup Haxe environment
uses: krdlab/setup-haxe@v1
with:
haxe-version: 4.2.5
- 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 commandline -D analyzer-optimize --run Main setup
- name: Building the game
run: |
haxelib run lime build mac
- name: Tar files
run: tar -zcvf Imaginative.tar.gz -C export/build/macos/bin .
- name: Publish Artifact
uses: actions/upload-artifact@v4
with:
name: Mac
path: Imaginative.tar.gz
overwrite: true
include-hidden-files: true
- 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:
- uses: actions/checkout@v2
- name: Setup Haxe environment
uses: krdlab/setup-haxe@v1
with:
haxe-version: 4.2.5
- 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 LibVLC
run: |
sudo apt-get install libvlc-dev libvlccore-dev
- name: Installing Libs
run: |
haxe -cp commandline -D analyzer-optimize --run Main setup
- name: Building the game
run: |
haxelib run lime build linux
- name: Tar files
run: tar -zcvf Imaginative.tar.gz -C export/build/linux/bin .
- name: Publish Artifact
uses: actions/upload-artifact@v4
with:
name: Linux
path: Imaginative.tar.gz
overwrite: true
include-hidden-files: true
- 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