2021-04-13 12:24:01 +02:00
|
|
|
name: Sanitized CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
|
|
|
|
|
|
|
jobs:
|
2021-07-25 20:28:22 +02:00
|
|
|
no-scheduling:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Dont schedule all jobs
|
|
|
|
run: sleep 10
|
|
|
|
|
2021-04-13 12:24:01 +02:00
|
|
|
tests-sanitize-undefined-clang:
|
2021-07-25 20:28:22 +02:00
|
|
|
needs: no-scheduling
|
2021-04-13 12:24:01 +02:00
|
|
|
runs-on: ubuntu-20.04
|
2021-07-14 08:14:06 +02:00
|
|
|
timeout-minutes: 120
|
2021-04-13 12:24:01 +02:00
|
|
|
env:
|
|
|
|
VFLAGS: -cc clang
|
2021-04-14 17:43:52 +02:00
|
|
|
VJOBS: 1
|
|
|
|
VTEST_SHOW_START: 1
|
2021-04-13 12:24:01 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 12.x
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2021-07-14 08:22:24 +02:00
|
|
|
sudo apt-get update
|
2021-04-13 12:24:01 +02:00
|
|
|
sudo apt-get install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind
|
2021-05-08 12:32:29 +02:00
|
|
|
sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev
|
2021-04-13 12:24:01 +02:00
|
|
|
sudo apt-get install clang
|
|
|
|
- name: Build V
|
2021-04-19 14:38:48 +02:00
|
|
|
run: make -j4 && ./v -cg -cstrict -o v cmd/v
|
2021-04-13 12:24:01 +02:00
|
|
|
- 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)
|
|
|
|
run: ./v2 build-examples
|
|
|
|
|
|
|
|
tests-sanitize-undefined-gcc:
|
2021-07-25 20:28:22 +02:00
|
|
|
needs: no-scheduling
|
2021-04-13 12:24:01 +02:00
|
|
|
runs-on: ubuntu-20.04
|
2021-07-14 08:14:06 +02:00
|
|
|
timeout-minutes: 120
|
2021-04-13 12:24:01 +02:00
|
|
|
env:
|
|
|
|
VFLAGS: -cc gcc
|
2021-04-14 17:43:52 +02:00
|
|
|
VJOBS: 1
|
|
|
|
VTEST_SHOW_START: 1
|
2021-04-13 12:24:01 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 12.x
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2021-05-08 12:02:36 +02:00
|
|
|
sudo apt update
|
2021-04-13 12:24:01 +02:00
|
|
|
sudo apt-get install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind
|
2021-05-08 12:32:29 +02:00
|
|
|
sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev
|
2021-04-13 12:24:01 +02:00
|
|
|
- name: Build V
|
2021-04-19 14:38:48 +02:00
|
|
|
run: make -j4 && ./v -cg -cstrict -o v cmd/v
|
2021-04-13 12:24:01 +02:00
|
|
|
- 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)
|
|
|
|
run: ./v2 build-examples
|
|
|
|
|
|
|
|
tests-sanitize-address-clang:
|
2021-07-25 20:28:22 +02:00
|
|
|
needs: no-scheduling
|
2021-04-13 12:24:01 +02:00
|
|
|
runs-on: ubuntu-20.04
|
2021-07-14 08:14:06 +02:00
|
|
|
timeout-minutes: 120
|
2021-04-13 12:24:01 +02:00
|
|
|
env:
|
|
|
|
VFLAGS: -cc clang
|
2021-04-14 17:43:52 +02:00
|
|
|
VJOBS: 1
|
|
|
|
VTEST_SHOW_START: 1
|
2021-04-13 12:24:01 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 12.x
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2021-05-08 12:02:36 +02:00
|
|
|
sudo apt update
|
2021-04-13 12:24:01 +02:00
|
|
|
sudo apt-get install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind
|
2021-05-08 12:32:29 +02:00
|
|
|
sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev
|
2021-04-13 12:24:01 +02:00
|
|
|
sudo apt-get install clang
|
|
|
|
- name: Build V
|
2021-04-19 14:38:48 +02:00
|
|
|
run: make -j4 && ./v -cg -cstrict -o v cmd/v
|
2021-04-13 12:24:01 +02:00
|
|
|
- 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)
|
|
|
|
run:
|
|
|
|
./v -cflags -fsanitize=address -o v cmd/v &&
|
|
|
|
ASAN_OPTIONS=detect_leaks=0 ./v -cc tcc test-self -asan-compiler
|
|
|
|
- name: Build examples (V compiled with -fsanitize=address)
|
|
|
|
run: ASAN_OPTIONS=detect_leaks=0 ./v build-examples
|
|
|
|
|
|
|
|
tests-sanitize-address-msvc:
|
2021-07-25 20:28:22 +02:00
|
|
|
needs: no-scheduling
|
2021-04-13 12:24:01 +02:00
|
|
|
runs-on: windows-2019
|
2021-07-14 08:14:06 +02:00
|
|
|
timeout-minutes: 120
|
2021-04-13 12:24:01 +02:00
|
|
|
env:
|
|
|
|
VFLAGS: -cc msvc
|
2021-04-14 17:43:52 +02:00
|
|
|
VJOBS: 1
|
|
|
|
VTEST_SHOW_START: 1
|
2021-04-13 12:24:01 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 12.x
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
echo %VFLAGS%
|
|
|
|
echo $VFLAGS
|
|
|
|
.\make.bat -msvc
|
|
|
|
.\v.exe -cflags /WX self
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
.\v.exe setup-freetype
|
|
|
|
.\.github\workflows\windows-install-sqlite.bat
|
|
|
|
- name: Self tests (-fsanitize=address)
|
|
|
|
run: |
|
|
|
|
.\v.exe -cflags -fsanitize=address test-self
|
|
|
|
|
|
|
|
tests-sanitize-address-gcc:
|
2021-07-25 20:28:22 +02:00
|
|
|
needs: no-scheduling
|
2021-04-13 12:24:01 +02:00
|
|
|
runs-on: ubuntu-20.04
|
2021-07-14 08:14:06 +02:00
|
|
|
timeout-minutes: 120
|
2021-04-13 12:24:01 +02:00
|
|
|
env:
|
|
|
|
VFLAGS: -cc gcc
|
2021-04-14 17:43:52 +02:00
|
|
|
VJOBS: 1
|
|
|
|
VTEST_SHOW_START: 1
|
2021-04-13 12:24:01 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 12.x
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2021-05-08 12:02:36 +02:00
|
|
|
sudo apt update
|
2021-04-13 12:24:01 +02:00
|
|
|
sudo apt-get install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind
|
2021-05-08 12:32:29 +02:00
|
|
|
sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev
|
2021-04-13 12:24:01 +02:00
|
|
|
sudo apt-get install clang
|
|
|
|
- name: Build V
|
2021-04-19 14:38:48 +02:00
|
|
|
run: make -j4 && ./v -cg -cstrict -o v cmd/v
|
2021-04-13 12:24:01 +02:00
|
|
|
- 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)
|
|
|
|
run:
|
|
|
|
./v -cflags -fsanitize=address,pointer-compare,pointer-subtract -o v cmd/v &&
|
|
|
|
ASAN_OPTIONS=detect_leaks=0 ./v -cc tcc test-self -asan-compiler
|
|
|
|
- name: Build examples (V compiled with -fsanitize=address)
|
|
|
|
run: ASAN_OPTIONS=detect_leaks=0 ./v build-examples
|
|
|
|
|
|
|
|
tests-sanitize-memory-clang:
|
2021-07-25 20:28:22 +02:00
|
|
|
needs: no-scheduling
|
2021-04-13 12:24:01 +02:00
|
|
|
runs-on: ubuntu-20.04
|
2021-07-14 08:14:06 +02:00
|
|
|
timeout-minutes: 120
|
2021-04-13 12:24:01 +02:00
|
|
|
env:
|
|
|
|
VFLAGS: -cc clang
|
2021-04-14 17:43:52 +02:00
|
|
|
VJOBS: 1
|
|
|
|
VTEST_SHOW_START: 1
|
2021-04-13 12:24:01 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 12.x
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2021-05-08 12:02:36 +02:00
|
|
|
sudo apt update
|
2021-04-13 12:24:01 +02:00
|
|
|
sudo apt-get install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind
|
2021-05-08 12:32:29 +02:00
|
|
|
sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev
|
2021-04-13 12:24:01 +02:00
|
|
|
sudo apt-get install clang
|
|
|
|
- name: Build V
|
2021-04-19 14:38:48 +02:00
|
|
|
run: make -j4 && ./v -cc clang -cg -cstrict -o v cmd/v
|
2021-04-13 12:24:01 +02:00
|
|
|
- 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
|
|
|
|
- name: Build examples (V compiled with -fsanitize=memory)
|
|
|
|
run: ./v build-examples
|