61 lines
1.8 KiB
YAML
61 lines
1.8 KiB
YAML
|
|
name: Linux Build
|
|
on:
|
|
pull_request:
|
|
push:
|
|
jobs:
|
|
build:
|
|
name: Linux Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Pulling the new commit
|
|
uses: actions/checkout@v2
|
|
- name: Setting up Haxe
|
|
uses: krdlab/setup-haxe@v1
|
|
with:
|
|
haxe-version: 4.2.5
|
|
- name: Show current dir
|
|
run: pwd
|
|
- name: Cache Haxelibs and build
|
|
uses: actions/cache@v3
|
|
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: Setting up Haxelib
|
|
run: |
|
|
mkdir -p ".haxelib"
|
|
haxelib setup ".haxelib"
|
|
# - name: Installing libraries
|
|
# run: |
|
|
# ls
|
|
# haxe -cp ./update -D analyzer-optimize -main Update --interp
|
|
# - name: Building the game
|
|
# run: |
|
|
# haxelib run lime build linux
|
|
- name: Artifact upload (entire build)
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Codename Engine
|
|
path: export/release/linux/bin
|
|
- name: Artifact upload (executable)
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Update-Linux
|
|
path: export/release/linux/bin/CodenameEngine
|
|
- name: Clear 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) {
|
|
console.log(cache)
|
|
} |