-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (89 loc) · 2.75 KB
/
Copy pathemscripten.yml
File metadata and controls
104 lines (89 loc) · 2.75 KB
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
name: Emscripten C++ WebAssembly Build
on:
push:
branches:
- master
#- develop
tags:
- "v*"
pull_request:
branches:
- master
jobs:
build-wasm:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # fetch full history including tags
- name: Refresh CMakeLists.txt
run: |
python3 bin/refresh.py
cat src/CMakeLists.txt
cat src/shared/CMakeLists.txt
cat src/shared/implementers/CMakeLists.txt
- name: Update build information
run: |
bin/setbuild.sh
cat src/build.h
- name: Set up Emscripten SDK
uses: mymindstorm/setup-emsdk@v14
with:
version: "latest"
actions-cache-folder: "emsdk-cache"
- name: Verify Emscripten Setup
run: |
emcc -v
em++ -v
- name: download and patch SDL3 source
run: |
git submodule update --init --recursive
ls external/SDL3 -l
python3 bin/ems/patch-xmp.py
- name: Build mapzutil
run: |
echo "Preparing mapzutil"
cd itools/mapzutil
mkdir -p build
python3 bin/gen.py
make
cp build/mapzutil ../../bin
- name: Strip private maps
run: |
echo "Strip private maps"
bin/mapzutil -s data/levels.mapz
- name: Build your app
run: |
rm data/gamecontrollerdb.txt
bin/build.sh emsdl3
echo "Preparing itch.io version"
mkdir -p build/cs3
cp data/musics/*.ogg build/cs3
cp packages/data/win32/cs3-runtime.ico build/cs3/favicon.ico
cp build/ems/cs3-runtime* build/cs3
cp LICENSE build/cs3
mv build/cs3/cs3-runtime.html build/cs3/index.html
echo "Preparing local version"
mkdir -p ./build/local
cp packages/data/win32/cs3-runtime.ico build/local/favicon.ico
cp ./build/ems/cs3-runtime.* ./build/local
gzip ./build/local/*.data ./build/local/*.wasm
mv ./build/local/cs3-runtime.data.gz ./build/local/cs3-runtime.data
mv ./build/local/cs3-runtime.wasm.gz ./build/local/cs3-runtime.wasm
cp build/cs3/*.ogg ./build/local
- name: Upload WebAssembly Build Artifacts (itchio)
uses: actions/upload-artifact@v4
with:
name: cs3-itchio
path: |
build/cs3/*
retention-days: 7
- name: Upload WebAssembly Build Artifacts (local)
uses: actions/upload-artifact@v4
with:
name: cs3-local
path: |
build/local/*
retention-days: 7