1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ci: add a quick v test-cleancode check, before more costlier tasks

This commit is contained in:
Delyan Angelov 2022-05-13 12:24:11 +03:00
parent 714ce4e7fc
commit cee7856c0f
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
2 changed files with 44 additions and 42 deletions

View File

@ -33,6 +33,7 @@ jobs:
run: | run: |
echo $VFLAGS echo $VFLAGS
make make
./v test-cleancode
./v -d debug_malloc -d debug_realloc -o v cmd/v ./v -d debug_malloc -d debug_realloc -o v cmd/v
./v -cg -cstrict -o v cmd/v ./v -cg -cstrict -o v cmd/v
# Test v -realloc arena allocation # Test v -realloc arena allocation
@ -609,40 +610,40 @@ jobs:
## run: .\v.exe -o v2.exe cmd/v && .\v2.exe -o v3.exe cmd/v ## run: .\v.exe -o v2.exe cmd/v && .\v2.exe -o v3.exe cmd/v
# ubuntu-autofree-selfcompile: # ubuntu-autofree-selfcompile:
# runs-on: ubuntu-20.04 # runs-on: ubuntu-20.04
# timeout-minutes: 121 # timeout-minutes: 121
# env: # env:
# VFLAGS: -cc gcc # VFLAGS: -cc gcc
# steps: # steps:
# - uses: actions/checkout@v2 # - uses: actions/checkout@v2
# - name: Build V # - name: Build V
# run: make -j4 # run: make -j4
# - name: V self compilation with -autofree # - name: V self compilation with -autofree
# run: ./v -o v2 -autofree cmd/v && ./v2 -o v3 -autofree cmd/v && ./v3 -o v4 -autofree cmd/v # run: ./v -o v2 -autofree cmd/v && ./v2 -o v3 -autofree cmd/v && ./v3 -o v4 -autofree cmd/v
# ubuntu-musl: # ubuntu-musl:
# runs-on: ubuntu-20.04 # runs-on: ubuntu-20.04
# timeout-minutes: 121 # timeout-minutes: 121
# env: # env:
# VFLAGS: -cc musl-gcc # VFLAGS: -cc musl-gcc
# V_CI_MUSL: 1 # V_CI_MUSL: 1
# steps: # steps:
# - uses: actions/checkout@v2 # - uses: actions/checkout@v2
# - uses: actions/setup-node@v1 # - uses: actions/setup-node@v1
# with: # with:
# node-version: 12.x # node-version: 12.x
# - name: Install dependencies # - name: Install dependencies
# run: | # run: |
# sudo apt-get install --quiet -y musl musl-tools libssl-dev sqlite3 libsqlite3-dev valgrind # sudo apt-get install --quiet -y musl musl-tools libssl-dev sqlite3 libsqlite3-dev valgrind
# - name: Build v # - name: Build v
# run: echo $VFLAGS && make -j4 && ./v -cg -o v cmd/v # run: echo $VFLAGS && make -j4 && ./v -cg -o v cmd/v
# # - name: Test v binaries # # - name: Test v binaries
# # run: ./v build-vbinaries # # run: ./v build-vbinaries
# ## - name: Test v->js # ## - name: Test v->js
# ## run: ./v -o hi.js examples/hello_v_js.v && node hi.js # ## run: ./v -o hi.js examples/hello_v_js.v && node hi.js
# - name: quick debug # - name: quick debug
# run: ./v -stats vlib/strconv/format_test.v # run: ./v -stats vlib/strconv/format_test.v
# - name: Self tests # - name: Self tests
# run: ./v test-self # run: ./v test-self

View File

@ -16,7 +16,7 @@ on:
paths: paths:
- '!**' - '!**'
- 'cmd/tools/vtest*' - 'cmd/tools/vtest*'
- 'cmd/tools/builders/**.v' - 'cmd/tools/builders/**.v'
- 'vlib/builtin/**.v' - 'vlib/builtin/**.v'
- 'vlib/strconv/**.v' - 'vlib/strconv/**.v'
- 'vlib/strings/**.v' - 'vlib/strings/**.v'
@ -43,7 +43,7 @@ on:
paths: paths:
- '!**' - '!**'
- 'cmd/tools/vtest*' - 'cmd/tools/vtest*'
- 'cmd/tools/builders/**.v' - 'cmd/tools/builders/**.v'
- 'vlib/builtin/**.v' - 'vlib/builtin/**.v'
- 'vlib/strconv/**.v' - 'vlib/strconv/**.v'
- 'vlib/strings/**.v' - 'vlib/strings/**.v'
@ -91,7 +91,7 @@ jobs:
sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev
sudo apt-get install clang sudo apt-get install clang
- name: Build V - name: Build V
run: make -j4 && ./v -cg -cstrict -o v cmd/v run: make -j4 && ./v -cg -cstrict -o v cmd/v && ./v test-cleancode
- name: Self tests (-fsanitize=undefined) - name: Self tests (-fsanitize=undefined)
run: ./v -cflags "-fsanitize=undefined" -o v2 cmd/v && ./v2 -cflags -fsanitize=undefined test-self run: ./v -cflags "-fsanitize=undefined" -o v2 cmd/v && ./v2 -cflags -fsanitize=undefined test-self
- name: Build examples (V compiled with -fsanitize=undefined) - name: Build examples (V compiled with -fsanitize=undefined)
@ -115,7 +115,7 @@ jobs:
sudo apt-get install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind sudo apt-get install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind
sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev
- name: Build V - name: Build V
run: make -j4 && ./v -cg -cstrict -o v cmd/v run: make -j4 && ./v -cg -cstrict -o v cmd/v && ./v test-cleancode
- name: Self tests (-fsanitize=undefined) - name: Self tests (-fsanitize=undefined)
run: ./v -cflags "-fsanitize=undefined" -o v2 cmd/v && ./v2 -cflags -fsanitize=undefined test-self run: ./v -cflags "-fsanitize=undefined" -o v2 cmd/v && ./v2 -cflags -fsanitize=undefined test-self
- name: Build examples (V compiled with -fsanitize=undefined) - name: Build examples (V compiled with -fsanitize=undefined)
@ -140,7 +140,7 @@ jobs:
sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev
sudo apt-get install clang sudo apt-get install clang
- name: Build V - name: Build V
run: make -j4 && ./v -cg -cstrict -o v cmd/v run: make -j4 && ./v -cg -cstrict -o v cmd/v && ./v test-cleancode
- name: Self tests (-fsanitize=address) - name: Self tests (-fsanitize=address)
run: ASAN_OPTIONS=detect_leaks=0 ./v -cflags "-fsanitize=address,pointer-compare,pointer-subtract" test-self run: ASAN_OPTIONS=detect_leaks=0 ./v -cflags "-fsanitize=address,pointer-compare,pointer-subtract" test-self
- name: Self tests (V compiled with -fsanitize=address) - name: Self tests (V compiled with -fsanitize=address)
@ -168,6 +168,7 @@ jobs:
echo $VFLAGS echo $VFLAGS
.\make.bat -msvc .\make.bat -msvc
.\v.exe self .\v.exe self
.\v.exe test-cleancode
## - name: Install dependencies ## - name: Install dependencies
## run: | ## run: |
## .\v.exe setup-freetype ## .\v.exe setup-freetype
@ -195,7 +196,7 @@ jobs:
sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev
sudo apt-get install clang sudo apt-get install clang
- name: Build V - name: Build V
run: make -j4 && ./v -cg -cstrict -o v cmd/v run: make -j4 && ./v -cg -cstrict -o v cmd/v && ./v test-cleancode
- name: Self tests (-fsanitize=address) - name: Self tests (-fsanitize=address)
run: ASAN_OPTIONS=detect_leaks=0 ./v -cflags -fsanitize=address test-self run: ASAN_OPTIONS=detect_leaks=0 ./v -cflags -fsanitize=address test-self
- name: Self tests (V compiled with -fsanitize=address) - name: Self tests (V compiled with -fsanitize=address)
@ -224,7 +225,7 @@ jobs:
sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev
sudo apt-get install clang sudo apt-get install clang
- name: Build V - name: Build V
run: make -j4 && ./v -cc clang -cg -cstrict -o v cmd/v run: make -j4 && ./v -cc clang -cg -cstrict -o v cmd/v && ./v test-cleancode
- name: Self tests (-fsanitize=memory) - name: Self tests (-fsanitize=memory)
run: ./v -cflags -fsanitize=memory test-self run: ./v -cflags -fsanitize=memory test-self
- name: Self tests (V compiled with -fsanitize=memory) - name: Self tests (V compiled with -fsanitize=memory)