15
15
ZIPNAME : vpaint_linux.zip
16
16
steps :
17
17
- name : Setup V
18
- uses : vlang/setup-v@v1
18
+ uses : vlang/setup-v@v1.4
19
19
with :
20
20
# Default: ${{ github.token }}
21
21
token : ${{ github.token }}
@@ -35,11 +35,18 @@ jobs:
35
35
v install https://github.com/pisaiah/ui
36
36
git clone https://github.com/pisaiah/ui iui
37
37
cd iui
38
- git clone https://github.com/pisaiah/vpaint
38
+ git clone https://github.com/pisaiah/vpaint --depth 1
39
39
v -cc $CC -skip-unused -gc boehm vpaint
40
40
- name : Remove excluded
41
41
run : |
42
42
rm -rf .git
43
+ rm -rf docs
44
+ cd iui
45
+ cd vpaint
46
+ rm -rf docs
47
+ rm -rf *.v
48
+ cd ..
49
+ cd ..
43
50
- name : Create ZIP archive
44
51
run : |
45
52
cd iui
59
66
ZIPNAME : vpaint_macos.zip
60
67
steps :
61
68
- name : Setup V
62
- uses : vlang/setup-v@v1
69
+ uses : vlang/setup-v@v1.4
63
70
with :
64
71
# Default: ${{ github.token }}
65
72
token : ${{ github.token }}
@@ -74,11 +81,18 @@ jobs:
74
81
v install https://github.com/pisaiah/ui
75
82
git clone https://github.com/pisaiah/ui iui
76
83
cd iui
77
- git clone https://github.com/pisaiah/vpaint
84
+ git clone https://github.com/pisaiah/vpaint --depth 1
78
85
v -cc $CC -skip-unused -gc boehm vpaint
79
86
- name : Remove excluded
80
87
run : |
81
88
rm -rf .git
89
+ rm -rf docs
90
+ cd iui
91
+ cd vpaint
92
+ rm -rf docs
93
+ rm -rf *.v
94
+ cd ..
95
+ cd ..
82
96
- name : Create ZIP archive
83
97
run : |
84
98
cd iui
98
112
ZIPNAME : vpaint_windows.zip
99
113
steps :
100
114
- name : Setup V
101
- uses : vlang/setup-v@v1
115
+ uses : vlang/setup-v@v1.4
102
116
with :
103
117
# Default: ${{ github.token }}
104
118
token : ${{ github.token }}
@@ -111,37 +125,25 @@ jobs:
111
125
- uses : msys2/setup-msys2@v2
112
126
- name : Compile
113
127
run : |
114
- git clone https://github.com/vlang/v
115
- cd v
116
- .\make.bat
117
- git clone https://github.com/pisaiah/ui iui
118
- .\v.exe symlink
128
+ where v
119
129
v install https://github.com/pisaiah/ui
120
- cd iui
121
- git clone https://github.com/pisaiah/vpaint
130
+ git clone https://github.com/pisaiah/vpaint --depth 1
122
131
v -cc gcc -skip-unused -gc boehm -cflags -static -cflags -mwindows vpaint
123
132
- name : Remove excluded
124
133
shell : msys2 {0}
125
134
run : |
126
135
rm -rf .git
127
- cd v
128
- cd iui
136
+ rm -rf docs
129
137
cd vpaint
138
+ rm -rf docs
130
139
rm -rf *.v
131
140
cd ..
132
- cd ..
133
- cd ..
134
141
- name : Create archive
135
142
shell : msys2 {0}
136
143
run : |
137
- cd v
138
- cd iui
139
144
cd vpaint
140
145
cd ..
141
146
powershell Compress-Archive vpaint $ZIPNAME
142
- mv $ZIPNAME ../../
143
- cd ..
144
- cd ..
145
147
# NB: the powershell Compress-Archive line is from:
146
148
# https://superuser.com/a/1336434/194881
147
149
# It is needed, because `zip` is not installed by default :-|
@@ -150,10 +152,77 @@ jobs:
150
152
with :
151
153
name : windows
152
154
path : vpaint_windows.zip
153
-
155
+ build-emscripten :
156
+ env :
157
+ EM_VERSION : 1.39.18
158
+ EM_CACHE_FOLDER : ' emsdk-cache'
159
+ CC : gcc
160
+ ZIPNAME : vpaint_emscripten.zip
161
+ runs-on : ubuntu-latest
162
+ steps :
163
+ - uses : mymindstorm/setup-emsdk@v14
164
+ - name : Setup emsdk
165
+ uses : mymindstorm/setup-emsdk@v14
166
+ with :
167
+ # Make sure to set a version number!
168
+ version : 3.1.67
169
+ # This is the name of the cache folder.
170
+ # The cache folder will be placed in the build directory,
171
+ # so make sure it doesn't conflict with anything!
172
+ actions-cache-folder : ' emsdk-cache'
173
+ - name : Verify
174
+ run : emcc -v
175
+ - name : Setup V
176
+
177
+ with :
178
+ # Default: ${{ github.token }}
179
+ token : ${{ github.token }}
180
+ version : ' weekly.2024.37'
181
+ version-file : ' '
182
+ check-latest : true
183
+ stable : false
184
+ architecture : ' '
185
+ - uses : actions/checkout@v1
186
+ - name : Compile
187
+ run : |
188
+ sudo apt-get -qq update
189
+ sudo apt-get -qq install libgc-dev
190
+ sudo apt install build-essential
191
+ sudo apt-get --yes --force-yes install libxi-dev libxcursor-dev mesa-common-dev
192
+ sudo apt-get --yes --force-yes install libgl1-mesa-glx
193
+ v install https://github.com/pisaiah/ui
194
+ git clone https://github.com/pisaiah/ui iui
195
+ cd iui
196
+ git clone https://github.com/vlang/v --depth 1
197
+ cd v
198
+ make
199
+ mv v v.exe
200
+ git clone https://github.com/pisaiah/v-emscripten-script
201
+ cd v-emscripten-script
202
+ ../v.exe . -o v2w.exe
203
+ git clone https://github.com/pisaiah/vpaint --depth 1
204
+ dir
205
+ ./v2w.exe ../ vpaint
206
+ - name : Remove excluded
207
+ run : |
208
+ rm -rf .git
209
+ - name : Create ZIP archive
210
+ run : |
211
+ cd iui
212
+ cd v
213
+ zip -r9 --symlinks $ZIPNAME v-emscripten-script/output/
214
+ mv $ZIPNAME ../../
215
+ cd ..
216
+ cd ..
217
+ - name : Create artifact
218
+ uses : actions/upload-artifact@v4
219
+ with :
220
+ name : emscripten
221
+ path : vpaint_emscripten.zip
222
+
154
223
release :
155
224
name : Create Github Release
156
- needs : [build-linux, build-windows, build-macos]
225
+ needs : [build-linux, build-windows, build-macos, build-emscripten ]
157
226
runs-on : ubuntu-20.04
158
227
steps :
159
228
- name : Get short tag name
@@ -178,7 +247,7 @@ jobs:
178
247
runs-on : ubuntu-20.04
179
248
strategy :
180
249
matrix :
181
- version : [linux, macos, windows]
250
+ version : [linux, macos, windows, emscripten ]
182
251
steps :
183
252
- uses : actions/checkout@v1
184
253
- name : Fetch artifacts
@@ -208,4 +277,4 @@ jobs:
208
277
upload_url : ${{ steps.get_release_info.outputs.upload_url }}
209
278
asset_path : ${{ matrix.version }}/vpaint_${{ matrix.version }}.zip
210
279
asset_name : vpaint_${{ matrix.version }}.zip
211
- asset_content_type : application/zip
280
+ asset_content_type : application/zip
0 commit comments