forked from Xeeynamo/sotn-decomp
-
Notifications
You must be signed in to change notification settings - Fork 0
160 lines (154 loc) · 4.4 KB
/
picci.yaml
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: Build C code
on:
push:
branches:
- master
paths:
- 'include/**'
- 'src/**'
- 'tools/sotn-assets/**'
- 'cmake/**'
- 'CMakeLists*'
pull_request:
paths:
- 'include/**'
- 'src/**'
- 'tools/sotn-assets/**'
- 'cmake/**'
- 'CMakeLists*'
workflow_dispatch:
jobs:
extract-assets:
runs-on: ubuntu-latest
steps:
- name: Clone main repo
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: false
- name: Get dependencies
uses: actions/cache@v4
id: get-dependencies
with:
path: 'disks/dependencies'
key: sotn-us-deps
- name: Setting up dependencies
working-directory: disks
run: cat dependencies/* | tar -zxf -
- name: Extract dependencies
run: make extract_disk
- name: Extract game assets
run: |
make update-dependencies
make -j extract
make -j extract_assets
- name: Export assets
uses: actions/upload-artifact@v4
with:
name: assets
path: assets
build-linux:
runs-on: ubuntu-latest
needs: extract-assets
steps:
- name: Install requirements
run: sudo apt-get update && sudo apt-get install build-essential libsdl2-dev
- name: Clone repo
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: false
- name: Get assets
uses: actions/download-artifact@v4
with:
name: assets
path: assets
- name: Build assets
run: make -j build_assets
- name: Build
run: |
cmake -B ${{github.workspace}}/pc
cmake --build ${{github.workspace}}/pc --config Release
build-macos:
runs-on: macos-latest
needs: extract-assets
steps:
- name: Install requirements
run: brew install SDL2
- name: Install Go
run: |
curl -L -o go.tar.gz https://go.dev/dl/go1.22.4.darwin-amd64.tar.gz
tar -C ~ -xzf go.tar.gz
rm go.tar.gz
- name: Clone repo
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: false
- name: Get assets
uses: actions/download-artifact@v4
with:
name: assets
path: assets
- name: Build assets
run: make -j build_assets
- name: Build
run: |
cmake -B ${{github.workspace}}/pc
cmake --build ${{github.workspace}}/pc --config Release
build-windows:
runs-on: windows-latest
needs: extract-assets
steps:
- name: Install requirements
run: |
mkdir C:\temp-sdl2
powershell Invoke-WebRequest 'https://github.com/libsdl-org/SDL/releases/download/release-2.28.5/SDL2-devel-2.28.5-VC.zip' -OutFile C:\temp-sdl2\SDL2-devel-2.28.5-VC.zip
7z x C:\temp-sdl2\SDL2-devel-2.28.5-VC.zip -oC:\temp-sdl2
- name: Clone repo
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: false
- name: Get assets
uses: actions/download-artifact@v4
with:
name: assets
path: assets
- uses: actions/setup-go@v5
with:
go-version: '^1.22.4'
- name: Build assets
run: |
cd tools/sotn-assets; go install; cd -
$SOTN_ASSETS = (Get-Command sotn-assets).Source
& make -j build_assets SOTNASSETS=$SOTN_ASSETS
- name: Build
run: |
cmake -B ${{github.workspace}}/pc -DCMAKE_BUILD_TYPE=Release -DSDL2_PATH=C:\temp-sdl2\SDL2-2.28.5
cmake --build ${{github.workspace}}/pc --config Release
build-linux-lle:
runs-on: ubuntu-latest
needs: extract-assets
steps:
- name: Install requirements
run: sudo apt-get update && sudo apt-get install build-essential libsdl2-dev
- name: Clone repo
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: false
- name: Get assets
uses: actions/download-artifact@v4
with:
name: assets
path: assets
- name: Build assets
run: make -j build_assets
- name: Build
run: |
cmake -B ${{github.workspace}}/pc -DWANT_LIBSND_LLE=1
cmake --build ${{github.workspace}}/pc --config Release
- name: Test
run: |
${{github.workspace}}/pc/Sound test