From b50f7fdc71f27ca997eb2325baef82d71f132646 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sun, 15 May 2022 10:54:31 +0300 Subject: [PATCH] ci: simplify ci_sanitized.yml again; use `v.exe fmt -verify vlib/builtin` for windows/msvc instead of `v test-cleancode` --- .github/workflows/ci_sanitized.yml | 31 ++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci_sanitized.yml b/.github/workflows/ci_sanitized.yml index 8a738aab0c..d78ce81f84 100644 --- a/.github/workflows/ci_sanitized.yml +++ b/.github/workflows/ci_sanitized.yml @@ -91,7 +91,9 @@ jobs: sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev sudo apt-get install clang - name: Build V - run: make -j4 && ./v -cg -cstrict -o v cmd/v && ./v test-cleancode + run: make && ./v -cg -cstrict -o v cmd/v + - name: Ensure code is well formatted + run: ./v test-cleancode - name: Self tests (-fsanitize=undefined) run: ./v -cflags "-fsanitize=undefined" -o v2 cmd/v && ./v2 -cflags -fsanitize=undefined test-self - name: Build examples (V compiled with -fsanitize=undefined) @@ -115,7 +117,9 @@ jobs: 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 - name: Build V - run: make -j4 && ./v -cg -cstrict -o v cmd/v && ./v test-cleancode + run: make && ./v -cg -cstrict -o v cmd/v + - name: Ensure code is well formatted + run: ./v test-cleancode - name: Self tests (-fsanitize=undefined) run: ./v -cflags "-fsanitize=undefined" -o v2 cmd/v && ./v2 -cflags -fsanitize=undefined test-self - name: Build examples (V compiled with -fsanitize=undefined) @@ -140,7 +144,9 @@ jobs: sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev sudo apt-get install clang - name: Build V - run: make -j4 && ./v -cg -cstrict -o v cmd/v && ./v test-cleancode + run: make && ./v -cg -cstrict -o v cmd/v + - name: Ensure code is well formatted + run: ./v test-cleancode - name: Self tests (-fsanitize=address) run: ASAN_OPTIONS=detect_leaks=0 ./v -cflags "-fsanitize=address,pointer-compare,pointer-subtract" test-self - name: Self tests (V compiled with -fsanitize=address) @@ -168,7 +174,11 @@ jobs: echo $VFLAGS .\make.bat -msvc .\v.exe self - .\v.exe test-cleancode + - name: Ensure code is well formatted + run: | + .\v.exe fmt -verify vlib/builtin/ vlib/v/scanner/ vlib/v/parser/ vlib/v/gen/ + ## TODO: check to see why `v test-cleancode` does not work with msvc on windows + ## - name: Install dependencies ## run: | ## .\v.exe setup-freetype @@ -196,7 +206,9 @@ jobs: sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev sudo apt-get install clang - name: Build V - run: make -j4 && ./v -cg -cstrict -o v cmd/v && ./v test-cleancode + run: make && ./v -cg -cstrict -o v cmd/v + - name: Ensure code is well formatted + run: ./v test-cleancode - name: Self tests (-fsanitize=address) run: ASAN_OPTIONS=detect_leaks=0 ./v -cflags -fsanitize=address test-self - name: Self tests (V compiled with -fsanitize=address) @@ -225,11 +237,14 @@ jobs: sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev sudo apt-get install clang - name: Build V - run: make -j4 && ./v -cc clang -cg -cstrict -o v cmd/v && ./v test-cleancode + run: make && ./v -cc clang -cg -cstrict -o v cmd/v + - name: Ensure code is well formatted + run: ./v test-cleancode - name: Self tests (-fsanitize=memory) run: ./v -cflags -fsanitize=memory test-self - name: Self tests (V compiled with -fsanitize=memory) - run: - ./v -cflags -fsanitize=memory -o v cmd/v && ./v -cc tcc test-self -msan-compiler + run: | + ./v -cflags -fsanitize=memory -o v cmd/v + ./v -cc tcc test-self -msan-compiler - name: Build examples (V compiled with -fsanitize=memory) run: ./v build-examples