Skip to content

ci: add tools ci

ci: add tools ci #4

Workflow file for this run

name: Tools CI
on:
push:
paths:
- '**/tools_ci.yml'
- 'cmd/tools/**'
- 'vlib/**'
- 'thirdparty/**'
- '!**.md'
pull_request:
paths:
- '**/tools_ci.yml'
- 'cmd/tools/**'
- 'vlib/**'
- 'thirdparty/**'
- '!**.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
cancel-in-progress: true
jobs:
linux:
runs-on: ubuntu-20.04
strategy:
matrix:
cc: [tcc, gcc, clang]
fail-fast: false
env:
VFLAGS: -cc ${{ matrix.cc }}
steps:
- uses: actions/checkout@v4
- name: Build V
run: make -j4 && ./v -showcc -o v cmd/v && ./v doctor
- name: Test
run: ./v -d network test-self cmd/tools
- name: Test (-prod)
run: ./v -prod -d network test-self cmd/tools
- name: Test (-cstrict)
run: ./v -cstrict -d network test-self cmd/tools
- name: Test sanitized
if: ${{ matrix.cc != 'tcc' }}
run: |
if [[ ${{ matrix.cc }} == "clang" ]]; then
./v -cc clang -cflags -fsanitize=undefined -d network test-self cmd/tools
./v -cc clang -cflags -fsanitize=memory -d network test-self cmd/tools
else
# ./v -cc gcc -cflags -fsanitize=kernel-address -d network test-self cmd/tools
./v -cc gcc -cflags -fsanitize=thread -d network test-self cmd/tools
./v -cc gcc -cflags -fsanitize=address,leak,undefined,shift,shift-exponent,shift-base,integer-divide-by-zero,unreachable,vla-bound,null,return,signed-integer-overflow,bounds,bounds-strict,alignment,object-size,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum,vptr -d network test-self cmd/tools
fi
macos:
runs-on: macos-12
strategy:
matrix:
cc: [clang]
fail-fast: false
env:
VFLAGS: -cc ${{ matrix.cc }}
steps:
- uses: actions/checkout@v4
- name: Build V
run: make -j4 && ./v ${{ matrix.optimization }} -showcc -o v cmd/v && ./v doctor
- name: Test
run: ./v -d network test-self cmd/tools
- name: Test (-prod)
run: ./v -prod -d network test-self cmd/tools
- name: Test (-cstrict)
run: ./v -cstrict -d network test-self cmd/tools
windows:
runs-on: windows-2019
strategy:
matrix:
cc: [tcc, gcc, msvc]
fail-fast: false
env:
VFLAGS: -cc ${{ matrix.cc }}
steps:
- uses: actions/checkout@v4
- name: Build V
run: ./make.bat -msvc && ./v -o v2.exe cmd/v && ./v2 -showcc -o v.exe cmd/v && ./v doctor
- name: Test
run: ./v -d network test-self cmd/tools
- name: Test (-prod)
run: ./v -prod -d network test-self cmd/tools
- name: Test (-cstrict)
if: ${{ matrix.cc != 'msvc' }}
run: ./v -cstrict -d network test-self cmd/tools