2022-01-23 13:50:19 +03:00
|
|
|
name: Other CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
|
|
|
|
|
|
|
concurrency:
|
2022-01-24 15:36:42 +03:00
|
|
|
group: build-other-${{ github.event.pull_request.number || github.sha }}
|
2022-01-23 13:50:19 +03:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
no-gpl-by-accident:
|
|
|
|
runs-on: ubuntu-20.04
|
2022-05-22 20:19:04 +03:00
|
|
|
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
|
2022-01-23 13:50:19 +03:00
|
|
|
timeout-minutes: 15
|
|
|
|
steps:
|
2023-02-21 14:40:24 +03:00
|
|
|
- uses: actions/checkout@v3
|
2022-01-23 13:50:19 +03:00
|
|
|
- name: No GPL licensed code, should be added accidentally
|
|
|
|
run: |
|
|
|
|
! grep -r --exclude="*.yml" "a GPL license" .
|
|
|
|
|
|
|
|
code-formatting:
|
2022-05-12 23:29:37 +03:00
|
|
|
runs-on: ubuntu-20.04
|
2022-05-22 20:19:04 +03:00
|
|
|
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
|
2022-01-23 13:50:19 +03:00
|
|
|
timeout-minutes: 15
|
|
|
|
env:
|
|
|
|
VFLAGS: -cc gcc
|
|
|
|
steps:
|
2023-02-21 14:40:24 +03:00
|
|
|
- uses: actions/checkout@v3
|
2022-01-23 13:50:19 +03:00
|
|
|
- name: Environment info
|
|
|
|
run: echo $VFLAGS $GITHUB_SHA $GITHUB_REF
|
|
|
|
- name: Build local v
|
|
|
|
run: make -j4
|
|
|
|
- name: v test-cleancode
|
2022-02-16 22:02:16 +03:00
|
|
|
run: ./v test-cleancode
|
2022-01-23 13:50:19 +03:00
|
|
|
- name: v test-fmt
|
2022-02-16 22:02:16 +03:00
|
|
|
run: ./v test-fmt
|
2022-01-23 13:50:19 +03:00
|
|
|
|
|
|
|
performance-regressions:
|
|
|
|
runs-on: ubuntu-20.04
|
2022-05-22 20:19:04 +03:00
|
|
|
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
|
2022-01-23 13:50:19 +03:00
|
|
|
timeout-minutes: 15
|
|
|
|
env:
|
|
|
|
VFLAGS: -cc gcc
|
|
|
|
steps:
|
2023-02-21 14:40:24 +03:00
|
|
|
- uses: actions/checkout@v3
|
2022-01-23 13:50:19 +03:00
|
|
|
- name: Environment info
|
|
|
|
run: echo $VFLAGS $GITHUB_SHA $GITHUB_REF
|
|
|
|
- name: Build local v
|
|
|
|
run: make -j4
|
|
|
|
- name: Clone & Build previous vmaster/v
|
|
|
|
run: |
|
|
|
|
git clone --depth=1 https://github.com/vlang/v vmaster/
|
|
|
|
(cd vmaster; make -j4)
|
|
|
|
- name: V versions
|
|
|
|
run: ./v version && ./vmaster/v version
|
|
|
|
- name: Build the repeat tool
|
|
|
|
run: ./v cmd/tools/repeat.v
|
|
|
|
- name: Repeat -o hw.c examples/hello_world.v
|
|
|
|
run: cmd/tools/repeat --max_time 251 --series 3 --count 20 --nmins 2 --nmaxs 5 --warmup 3 --fail_percent 10 -t 'cd {T} ; ./v -show-timings -o hw.c examples/hello_world.v' . ./vmaster
|
|
|
|
- name: Repeat -o v.c cmd/v
|
2023-07-29 15:18:45 +03:00
|
|
|
run: cmd/tools/repeat --max_time 1731 --series 3 --count 20 --nmins 2 --nmaxs 5 --warmup 3 --fail_percent 10 -t 'cd {T} ; ./v -show-timings -o v.c cmd/v' . ./vmaster
|
2022-01-23 13:50:19 +03:00
|
|
|
|
|
|
|
misc-tooling:
|
|
|
|
runs-on: ubuntu-20.04
|
2022-05-22 20:19:04 +03:00
|
|
|
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
|
2022-01-23 13:50:19 +03:00
|
|
|
timeout-minutes: 121
|
|
|
|
env:
|
|
|
|
VFLAGS: -cc tcc -no-retry-compilation
|
|
|
|
steps:
|
2023-02-21 14:40:24 +03:00
|
|
|
- uses: actions/checkout@v3
|
2022-01-23 13:50:19 +03:00
|
|
|
with:
|
|
|
|
fetch-depth: 10
|
2022-03-31 11:34:20 +03:00
|
|
|
|
2022-01-23 13:50:19 +03:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2022-03-31 13:44:35 +03:00
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install --quiet -y libsodium-dev libssl-dev sqlite3 libsqlite3-dev postgresql libpq-dev valgrind
|
2022-03-31 11:34:20 +03:00
|
|
|
sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev xfonts-75dpi xfonts-base
|
2023-02-25 17:50:48 +03:00
|
|
|
sudo apt-get install --quiet -y g++-9 g++-11
|
2022-03-31 11:34:20 +03:00
|
|
|
|
2022-01-23 13:50:19 +03:00
|
|
|
- name: Build v
|
|
|
|
run: make
|
|
|
|
|
2023-02-25 17:50:48 +03:00
|
|
|
- name: g++-9 version
|
2022-03-31 11:34:20 +03:00
|
|
|
run: g++-9 --version
|
2023-02-25 17:50:48 +03:00
|
|
|
- name: V self compilation with g++ and -std=c++11
|
2022-03-31 11:34:20 +03:00
|
|
|
run: ./v -cc g++-9 -no-std -cflags -std=c++11 -o v2 cmd/v && ./v2 -cc g++-9 -no-std -cflags -std=c++11 -o v3 cmd/v
|
2023-02-25 17:50:48 +03:00
|
|
|
|
|
|
|
- name: g++-11 version
|
|
|
|
run: g++-11 --version
|
|
|
|
- name: V self compilation with g++ and -std=c++20
|
|
|
|
run: ./v -cc g++-11 -no-std -cflags -std=c++20 -o v2 cmd/v && ./v2 -cc g++-11 -no-std -cflags -std=c++20 -o v3 cmd/v
|
2022-03-31 11:34:20 +03:00
|
|
|
|
2022-01-23 13:50:19 +03:00
|
|
|
- name: Ensure V can be compiled with -autofree
|
2022-05-12 23:29:37 +03:00
|
|
|
run: ./v -autofree -o v2 cmd/v ## NB: this does not mean it runs, but at least keeps it from regressing
|
2022-01-23 13:50:19 +03:00
|
|
|
|
|
|
|
- name: Shader examples can be build
|
|
|
|
run: |
|
|
|
|
wget https://github.com/floooh/sokol-tools-bin/raw/33d2e4cc26088c6c28eaef5467990f8940d15aab/bin/linux/sokol-shdc
|
|
|
|
chmod +x ./sokol-shdc
|
|
|
|
for f in examples/sokol/02_cubes_glsl/cube_glsl \
|
|
|
|
examples/sokol/03_march_tracing_glsl/rt_glsl \
|
|
|
|
examples/sokol/04_multi_shader_glsl/rt_glsl_puppy \
|
|
|
|
examples/sokol/04_multi_shader_glsl/rt_glsl_march \
|
|
|
|
examples/sokol/05_instancing_glsl/rt_glsl_instancing \
|
|
|
|
examples/sokol/06_obj_viewer/gouraud \
|
|
|
|
; do \
|
|
|
|
echo "compiling shader $f.glsl ..."; \
|
|
|
|
./sokol-shdc --input $f.glsl --output $f.h --slang glsl330 ; \
|
|
|
|
done
|
2022-03-31 13:53:02 +03:00
|
|
|
./v should-compile-all examples/sokol/*.v examples/sokol/0?*/*.v
|
2022-01-23 13:50:19 +03:00
|
|
|
|
|
|
|
parser-silent:
|
|
|
|
runs-on: ubuntu-20.04
|
2022-05-22 20:19:04 +03:00
|
|
|
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
|
2022-01-23 13:50:19 +03:00
|
|
|
timeout-minutes: 121
|
|
|
|
steps:
|
2023-02-21 14:40:24 +03:00
|
|
|
- uses: actions/checkout@v3
|
2022-01-23 13:50:19 +03:00
|
|
|
- name: Install zzuf
|
|
|
|
run: sudo apt install -qq zzuf
|
|
|
|
- name: Build local v
|
|
|
|
run: |
|
|
|
|
make -j4
|
|
|
|
./v -g cmd/tools/vtest-parser.v
|
|
|
|
- name: Run test-parser
|
|
|
|
run: |
|
|
|
|
./v test-parser -S examples/hello_world.v
|
|
|
|
./v test-parser -S examples/hanoi.v
|
|
|
|
./v test-parser -S examples/fibonacci.v
|
|
|
|
./v test-parser -S examples/cli.v
|
|
|
|
./v test-parser -S examples/json.v
|
|
|
|
./v test-parser -S examples/vmod.v
|
|
|
|
./v test-parser -S examples/regex/regex_example.v
|
|
|
|
./v test-parser -S examples/2048/2048.v
|
|
|
|
|
|
|
|
- name: Run test-parser over fuzzed files
|
|
|
|
run: |
|
|
|
|
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/hello_world.v > examples/hello_world_fuzz.v
|
|
|
|
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/hanoi.v > examples/hanoi_fuzz.v
|
|
|
|
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/fibonacci.v > examples/fibonacci_fuzz.v
|
|
|
|
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/cli.v > examples/cli_fuzz.v
|
|
|
|
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/json.v > examples/json_fuzz.v
|
|
|
|
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/vmod.v > examples/vmod_fuzz.v
|
|
|
|
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/regex/regex_example.v > examples/regex_example_fuzz.v
|
|
|
|
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/2048/2048.v > examples/2048/2048_fuzz.v
|
|
|
|
./v test-parser -S examples/hello_world_fuzz.v
|
|
|
|
./v test-parser -S examples/hanoi_fuzz.v
|
|
|
|
./v test-parser -S examples/cli_fuzz.v
|
|
|
|
./v test-parser -S examples/regex_example_fuzz.v
|
|
|
|
./v test-parser -S examples/2048/2048_fuzz.v
|