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

ci: simplify ci_sanitized.yml

This commit is contained in:
Delyan Angelov 2022-05-14 20:29:56 +03:00
parent fe9f97074b
commit 1225a865a3
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -83,7 +83,7 @@ jobs:
- name: Environment info - name: Environment info
run: echo $VFLAGS $GITHUB_SHA $GITHUB_REF run: echo $VFLAGS $GITHUB_SHA $GITHUB_REF
- name: Build local v - name: Build local v
run: make -j4 run: make
- name: v test-cleancode - name: v test-cleancode
run: ./v test-cleancode run: ./v test-cleancode
- name: v test-fmt - name: v test-fmt
@ -109,11 +109,16 @@ 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
./v -cg -cstrict -o v cmd/v
- 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)
run: ./v2 build-examples run: |
./v2 build-examples
tests-sanitize-undefined-gcc: tests-sanitize-undefined-gcc:
needs: [code-formatting-before-regression] needs: [code-formatting-before-regression]
@ -134,11 +139,16 @@ 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
./v -cg -cstrict -o v cmd/v
- 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)
run: ./v2 build-examples run: |
./v2 build-examples
tests-sanitize-address-clang: tests-sanitize-address-clang:
needs: [code-formatting-before-regression] needs: [code-formatting-before-regression]
@ -160,15 +170,19 @@ 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
./v -cg -cstrict -o v cmd/v
- 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)
run: run: |
./v -cflags -fsanitize=address -o v cmd/v && ./v -cflags -fsanitize=address -o v cmd/v
ASAN_OPTIONS=detect_leaks=0 ./v -cc tcc test-self -asan-compiler ASAN_OPTIONS=detect_leaks=0 ./v -cc tcc test-self -asan-compiler
- name: Build examples (V compiled with -fsanitize=address) - name: Build examples (V compiled with -fsanitize=address)
run: ASAN_OPTIONS=detect_leaks=0 ./v build-examples run: |
ASAN_OPTIONS=detect_leaks=0 ./v build-examples
tests-sanitize-address-msvc: tests-sanitize-address-msvc:
needs: [code-formatting-before-regression] needs: [code-formatting-before-regression]
@ -218,15 +232,19 @@ 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
./v -cg -cstrict -o v cmd/v
- 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)
run: run: |
./v -cflags -fsanitize=address,pointer-compare,pointer-subtract -o v cmd/v && ./v -cflags -fsanitize=address,pointer-compare,pointer-subtract -o v cmd/v
ASAN_OPTIONS=detect_leaks=0 ./v -cc tcc test-self -asan-compiler ASAN_OPTIONS=detect_leaks=0 ./v -cc tcc test-self -asan-compiler
- name: Build examples (V compiled with -fsanitize=address) - name: Build examples (V compiled with -fsanitize=address)
run: ASAN_OPTIONS=detect_leaks=0 ./v build-examples run: |
ASAN_OPTIONS=detect_leaks=0 ./v build-examples
tests-sanitize-memory-clang: tests-sanitize-memory-clang:
needs: [code-formatting-before-regression] needs: [code-formatting-before-regression]
@ -248,11 +266,16 @@ 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
./v -cc clang -cg -cstrict -o v cmd/v
- 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)
run: run: |
./v -cflags -fsanitize=memory -o v cmd/v && ./v -cc tcc test-self -msan-compiler ./v -cflags -fsanitize=memory -o v cmd/v
./v -cc tcc test-self -msan-compiler
- name: Build examples (V compiled with -fsanitize=memory) - name: Build examples (V compiled with -fsanitize=memory)
run: ./v build-examples run: |
./v build-examples