forked from Jorge-SunSpirit/Doki-Doki-Takeover
-
Notifications
You must be signed in to change notification settings - Fork 2
76 lines (68 loc) · 2.12 KB
/
linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Linux Build
on: workflow_dispatch
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Pull Latest Commit
uses: actions/checkout@v3.3.0
- name: Install Haxe
uses: krdlab/setup-haxe@master
with:
haxe-version: 4.2.5
- name: Restore Previous Cache
uses: actions/cache@v3
with:
key: cache-build-linux
path: |
.haxelib/
export/release/linux/haxe/
export/release/linux/obj/
restore-keys: |
cache-build-linux
- name: Install libVLC
run: |
sudo apt-get install libvlc-dev
sudo apt-get install libvlccore-dev
- name: Install Libraries
run: |
haxelib setup ~/haxelib
haxelib install hxcpp > /dev/null --quiet
haxelib install hmm --quiet
haxelib run hmm install
- name: Compile DDTO
run: haxelib run lime build linux -final
- name: Upload Artifact
uses: actions/upload-artifact@v3.1.2
with:
name: DDTO-Linux
path: 'export/release/linux/bin'
- name: Clear Previous 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 == "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: Upload New Cache
uses: actions/cache@v3
with:
key: cache-build-linux
path: |
.haxelib/
export/release/linux/haxe/
export/release/linux/obj/
restore-keys: |
cache-build-linux