plz / .github / workflows / ci.yml
240 lines · 223 sloc · 5.75 KB · 259c97afbe01ef593513d4fc22f90dfe46e2a305
Raw
1name: CI
2
3on: [push, pull_request]
4
5jobs:
6 ubuntu-gcc:
7 runs-on: ubuntu-latest
8 steps:
9 - name: Checkout V
10 uses: actions/checkout@v3
11 with:
12 repository: vlang/v
13 - name: Checkout gitly
14 uses: actions/checkout@v3
15 with:
16 path: gitly
17 - name: Install Dependencies
18 run: sudo apt install libsqlite3-dev
19 - name: Install Markdown
20 uses: actions/checkout@v3
21 with:
22 repository: vlang/markdown
23 path: vlib/markdown
24 - name: Install PCRE
25 uses: actions/checkout@v3
26 with:
27 repository: vlang/pcre
28 path: vlib/pcre
29 - name: Build V
30 run: |
31 make
32 sudo ./v symlink
33
34 - name: Compile gitly
35 run: |
36 cd gitly
37 v -cc gcc .
38
39 - name: Compile gitly with -autofree
40 run: |
41 cd gitly
42 v -cc gcc -autofree .
43
44 - name: Compile gitly with -prod
45 run: |
46 cd gitly
47 v -cc gcc -prod .
48
49 - name: Compile CSS from SCSS files
50 uses: gha-utilities/[email protected]
51 with:
52 source: gitly/static/css/gitly.scss
53 destination: gitly/static/css/gitly.css
54
55 - name: Run all tests
56 run: |
57 cd gitly
58 v -cc gcc -d use_openssl test .
59
60 - name: Run tests/first_run.v
61 run: |
62 cd gitly
63 v -cc gcc -g run tests/first_run.v
64
65 macos-clang:
66 runs-on: macos-latest
67 steps:
68 - name: Checkout V
69 uses: actions/checkout@v3
70 with:
71 repository: vlang/v
72 - name: Checkout gitly
73 uses: actions/checkout@v3
74 with:
75 path: gitly
76 - name: Install Markdown
77 uses: actions/checkout@v3
78 with:
79 repository: vlang/markdown
80 path: vlib/markdown
81 - name: Install PCRE
82 uses: actions/checkout@v3
83 with:
84 repository: vlang/pcre
85 path: vlib/pcre
86 - name: Build V
87 run: |
88 make
89 ./v symlink
90 - name: Compile gitly
91 run: |
92 cd gitly
93 v -cc clang .
94 - name: Compile gitly with -autofree
95 run: |
96 cd gitly
97 v -cc clang -autofree .
98 - name: Compile gitly with -prod
99 run: |
100 cd gitly
101 v -cc clang -prod .
102 - name: Compile CSS from SCSS files
103 uses: gha-utilities/[email protected]
104 with:
105 source: gitly/static/css/gitly.scss
106 destination: gitly/static/css/gitly.css
107 - name: Run all tests
108 run: |
109 cd gitly
110 v -cc clang -d use_openssl test .
111 - name: Run tests/first_run.v
112 run: |
113 cd gitly
114 v -cc clang -g run tests/first_run.v
115
116# windows-msvc:
117# runs-on: windows-latest
118# env:
119# VFLAGS: -cc msvc
120# steps:
121# - name: Checkout V
122# uses: actions/checkout@v3
123# with:
124# repository: vlang/v
125# - name: Checkout gitly2
126# uses: actions/checkout@v3
127# with:
128# path: gitly
129# - name: Install SQLite
130# run: |
131# .github\workflows\windows-install-sqlite.bat
132# dir thirdparty\sqlite\
133# - name: Install Markdown
134# uses: actions/checkout@v3
135# with:
136# repository: vlang/markdown
137# path: vlib/markdown
138# - name: Install PCRE
139# uses: actions/checkout@v3
140# with:
141# repository: vlang/pcre
142# path: vlib/pcre
143# - name: Build V
144# run: |
145# ./make.bat -msvc -skip-path
146# - name: Compile gitly
147# run: |
148# .\v.exe gitly\
149
150 windows-gcc:
151 runs-on: windows-latest
152 env:
153 VFLAGS: -cc gcc
154 steps:
155 - name: Checkout V
156 uses: actions/checkout@v3
157 with:
158 repository: vlang/v
159 - name: Checkout gitly
160 uses: actions/checkout@v3
161 with:
162 path: gitly
163 - name: Install SQLite
164 run: |
165 .github\workflows\windows-install-sqlite.bat
166 dir thirdparty\sqlite\
167 - name: Install Markdown
168 uses: actions/checkout@v3
169 with:
170 repository: vlang/markdown
171 path: vlib/markdown
172 - name: Install PCRE
173 uses: actions/checkout@v3
174 with:
175 repository: vlang/pcre
176 path: vlib/pcre
177 - name: Build V
178 run: |
179 ./make.bat -gcc
180 - name: Compile gitly
181 run: |
182 dir
183 .\v.exe -cc gcc gitly
184
185 ubuntu-tcc:
186 runs-on: ubuntu-latest
187 env:
188 VFLAGS: -cc tcc -d no_backtrace -d no_segfault_handler
189 steps:
190 - name: Checkout V
191 uses: actions/checkout@v3
192 with:
193 repository: vlang/v
194 - name: Checkout gitly
195 uses: actions/checkout@v3
196 with:
197 path: gitly
198 - name: Install Dependencies
199 run: sudo apt install libsqlite3-dev
200 - name: Install Markdown
201 uses: actions/checkout@v3
202 with:
203 repository: vlang/markdown
204 path: vlib/markdown
205 - name: Install PCRE
206 uses: actions/checkout@v3
207 with:
208 repository: vlang/pcre
209 path: vlib/pcre
210 - name: Build V
211 run: |
212 echo $VFLAGS
213 make
214 sudo ./v symlink
215
216 - name: Compile gitly with -autofree
217 run: |
218 cd gitly
219 v -autofree .
220
221 - name: Compile gitly
222 run: |
223 cd gitly
224 v .
225
226 - name: Compile CSS from SCSS files
227 uses: gha-utilities/[email protected]
228 with:
229 source: gitly/static/css/gitly.scss
230 destination: gitly/static/css/gitly.css
231
232 - name: Run all tests
233 run: |
234 cd gitly
235 v -d use_openssl test .
236
237 - name: Run tests/first_run.v
238 run: |
239 cd gitly
240 v -g run tests/first_run.v
241