Skip to content

Commit cee7856

Browse files
committed
ci: add a quick v test-cleancode check, before more costlier tasks
1 parent 714ce4e commit cee7856

File tree

2 files changed

+44
-42
lines changed

2 files changed

+44
-42
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
run: |
3434
echo $VFLAGS
3535
make
36+
./v test-cleancode
3637
./v -d debug_malloc -d debug_realloc -o v cmd/v
3738
./v -cg -cstrict -o v cmd/v
3839
# Test v -realloc arena allocation
@@ -609,40 +610,40 @@ jobs:
609610
## run: .\v.exe -o v2.exe cmd/v && .\v2.exe -o v3.exe cmd/v
610611

611612

612-
# ubuntu-autofree-selfcompile:
613-
# runs-on: ubuntu-20.04
614-
# timeout-minutes: 121
615-
# env:
616-
# VFLAGS: -cc gcc
617-
# steps:
618-
# - uses: actions/checkout@v2
619-
# - name: Build V
620-
# run: make -j4
621-
# - name: V self compilation with -autofree
622-
# run: ./v -o v2 -autofree cmd/v && ./v2 -o v3 -autofree cmd/v && ./v3 -o v4 -autofree cmd/v
613+
# ubuntu-autofree-selfcompile:
614+
# runs-on: ubuntu-20.04
615+
# timeout-minutes: 121
616+
# env:
617+
# VFLAGS: -cc gcc
618+
# steps:
619+
# - uses: actions/checkout@v2
620+
# - name: Build V
621+
# run: make -j4
622+
# - name: V self compilation with -autofree
623+
# run: ./v -o v2 -autofree cmd/v && ./v2 -o v3 -autofree cmd/v && ./v3 -o v4 -autofree cmd/v
623624

624625

625-
# ubuntu-musl:
626-
# runs-on: ubuntu-20.04
627-
# timeout-minutes: 121
628-
# env:
629-
# VFLAGS: -cc musl-gcc
630-
# V_CI_MUSL: 1
631-
# steps:
632-
# - uses: actions/checkout@v2
633-
# - uses: actions/setup-node@v1
634-
# with:
635-
# node-version: 12.x
636-
# - name: Install dependencies
637-
# run: |
638-
# sudo apt-get install --quiet -y musl musl-tools libssl-dev sqlite3 libsqlite3-dev valgrind
639-
# - name: Build v
640-
# run: echo $VFLAGS && make -j4 && ./v -cg -o v cmd/v
641-
# # - name: Test v binaries
642-
# # run: ./v build-vbinaries
643-
# ## - name: Test v->js
644-
# ## run: ./v -o hi.js examples/hello_v_js.v && node hi.js
645-
# - name: quick debug
646-
# run: ./v -stats vlib/strconv/format_test.v
647-
# - name: Self tests
648-
# run: ./v test-self
626+
# ubuntu-musl:
627+
# runs-on: ubuntu-20.04
628+
# timeout-minutes: 121
629+
# env:
630+
# VFLAGS: -cc musl-gcc
631+
# V_CI_MUSL: 1
632+
# steps:
633+
# - uses: actions/checkout@v2
634+
# - uses: actions/setup-node@v1
635+
# with:
636+
# node-version: 12.x
637+
# - name: Install dependencies
638+
# run: |
639+
# sudo apt-get install --quiet -y musl musl-tools libssl-dev sqlite3 libsqlite3-dev valgrind
640+
# - name: Build v
641+
# run: echo $VFLAGS && make -j4 && ./v -cg -o v cmd/v
642+
# # - name: Test v binaries
643+
# # run: ./v build-vbinaries
644+
# ## - name: Test v->js
645+
# ## run: ./v -o hi.js examples/hello_v_js.v && node hi.js
646+
# - name: quick debug
647+
# run: ./v -stats vlib/strconv/format_test.v
648+
# - name: Self tests
649+
# run: ./v test-self

.github/workflows/ci_sanitized.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
paths:
1717
- '!**'
1818
- 'cmd/tools/vtest*'
19-
- 'cmd/tools/builders/**.v'
19+
- 'cmd/tools/builders/**.v'
2020
- 'vlib/builtin/**.v'
2121
- 'vlib/strconv/**.v'
2222
- 'vlib/strings/**.v'
@@ -43,7 +43,7 @@ on:
4343
paths:
4444
- '!**'
4545
- 'cmd/tools/vtest*'
46-
- 'cmd/tools/builders/**.v'
46+
- 'cmd/tools/builders/**.v'
4747
- 'vlib/builtin/**.v'
4848
- 'vlib/strconv/**.v'
4949
- 'vlib/strings/**.v'
@@ -91,7 +91,7 @@ jobs:
9191
sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev
9292
sudo apt-get install clang
9393
- name: Build V
94-
run: make -j4 && ./v -cg -cstrict -o v cmd/v
94+
run: make -j4 && ./v -cg -cstrict -o v cmd/v && ./v test-cleancode
9595
- name: Self tests (-fsanitize=undefined)
9696
run: ./v -cflags "-fsanitize=undefined" -o v2 cmd/v && ./v2 -cflags -fsanitize=undefined test-self
9797
- name: Build examples (V compiled with -fsanitize=undefined)
@@ -115,7 +115,7 @@ jobs:
115115
sudo apt-get install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind
116116
sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev
117117
- name: Build V
118-
run: make -j4 && ./v -cg -cstrict -o v cmd/v
118+
run: make -j4 && ./v -cg -cstrict -o v cmd/v && ./v test-cleancode
119119
- name: Self tests (-fsanitize=undefined)
120120
run: ./v -cflags "-fsanitize=undefined" -o v2 cmd/v && ./v2 -cflags -fsanitize=undefined test-self
121121
- name: Build examples (V compiled with -fsanitize=undefined)
@@ -140,7 +140,7 @@ jobs:
140140
sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev
141141
sudo apt-get install clang
142142
- name: Build V
143-
run: make -j4 && ./v -cg -cstrict -o v cmd/v
143+
run: make -j4 && ./v -cg -cstrict -o v cmd/v && ./v test-cleancode
144144
- name: Self tests (-fsanitize=address)
145145
run: ASAN_OPTIONS=detect_leaks=0 ./v -cflags "-fsanitize=address,pointer-compare,pointer-subtract" test-self
146146
- name: Self tests (V compiled with -fsanitize=address)
@@ -168,6 +168,7 @@ jobs:
168168
echo $VFLAGS
169169
.\make.bat -msvc
170170
.\v.exe self
171+
.\v.exe test-cleancode
171172
## - name: Install dependencies
172173
## run: |
173174
## .\v.exe setup-freetype
@@ -195,7 +196,7 @@ jobs:
195196
sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev
196197
sudo apt-get install clang
197198
- name: Build V
198-
run: make -j4 && ./v -cg -cstrict -o v cmd/v
199+
run: make -j4 && ./v -cg -cstrict -o v cmd/v && ./v test-cleancode
199200
- name: Self tests (-fsanitize=address)
200201
run: ASAN_OPTIONS=detect_leaks=0 ./v -cflags -fsanitize=address test-self
201202
- name: Self tests (V compiled with -fsanitize=address)
@@ -224,7 +225,7 @@ jobs:
224225
sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev
225226
sudo apt-get install clang
226227
- name: Build V
227-
run: make -j4 && ./v -cc clang -cg -cstrict -o v cmd/v
228+
run: make -j4 && ./v -cc clang -cg -cstrict -o v cmd/v && ./v test-cleancode
228229
- name: Self tests (-fsanitize=memory)
229230
run: ./v -cflags -fsanitize=memory test-self
230231
- name: Self tests (V compiled with -fsanitize=memory)

0 commit comments

Comments
 (0)