ci: require code to be formatted before everything else (minimise CI queue length) (#14396)
parent
b3e80a3100
commit
f0d46413d9
|
@ -1,12 +1,10 @@
|
||||||
name: Code CI
|
name: Code CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_run:
|
||||||
paths-ignore:
|
workflows: ["Other CI"]
|
||||||
- "**.md"
|
types:
|
||||||
pull_request:
|
- completed
|
||||||
paths-ignore:
|
|
||||||
- "**.md"
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: build-ci-${{ github.event.pull_request.number || github.sha }}
|
group: build-ci-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
@ -33,7 +31,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo $VFLAGS
|
echo $VFLAGS
|
||||||
make
|
make
|
||||||
./v test-cleancode
|
|
||||||
./v -d debug_malloc -d debug_realloc -o v cmd/v
|
./v -d debug_malloc -d debug_realloc -o v cmd/v
|
||||||
./v -cg -cstrict -o v cmd/v
|
./v -cg -cstrict -o v cmd/v
|
||||||
# Test v -realloc arena allocation
|
# Test v -realloc arena allocation
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
name: Bootstraping works
|
name: Bootstraping works
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_run:
|
||||||
paths-ignore:
|
workflows: ["Other CI"]
|
||||||
- "**.md"
|
types:
|
||||||
pull_request:
|
- completed
|
||||||
paths-ignore:
|
|
||||||
- "**.md"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ubuntu:
|
ubuntu:
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
name: Cross CI
|
name: Cross CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_run:
|
||||||
paths-ignore:
|
workflows: ["Other CI"]
|
||||||
- "**.md"
|
types:
|
||||||
pull_request:
|
- completed
|
||||||
paths-ignore:
|
|
||||||
- "**.md"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ name: Sanitized CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches: [master]
|
||||||
paths:
|
paths:
|
||||||
- '!**'
|
- '!**'
|
||||||
- 'cmd/tools/vtest*'
|
- 'cmd/tools/vtest*'
|
||||||
|
@ -72,7 +73,24 @@ concurrency:
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
code-formatting-before-regression:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
timeout-minutes: 15
|
||||||
|
env:
|
||||||
|
VFLAGS: -cc gcc
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Environment info
|
||||||
|
run: echo $VFLAGS $GITHUB_SHA $GITHUB_REF
|
||||||
|
- name: Build local v
|
||||||
|
run: make -j4
|
||||||
|
- name: v test-cleancode
|
||||||
|
run: ./v test-cleancode
|
||||||
|
- name: v test-fmt
|
||||||
|
run: ./v test-fmt
|
||||||
|
|
||||||
tests-sanitize-undefined-clang:
|
tests-sanitize-undefined-clang:
|
||||||
|
needs: [code-formatting-before-regression]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
timeout-minutes: 180
|
timeout-minutes: 180
|
||||||
env:
|
env:
|
||||||
|
@ -91,13 +109,14 @@ 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 && ./v test-cleancode
|
run: make -j4 && ./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]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
timeout-minutes: 180
|
timeout-minutes: 180
|
||||||
env:
|
env:
|
||||||
|
@ -115,13 +134,14 @@ 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 && ./v test-cleancode
|
run: make -j4 && ./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]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
timeout-minutes: 180
|
timeout-minutes: 180
|
||||||
env:
|
env:
|
||||||
|
@ -140,7 +160,7 @@ 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 && ./v test-cleancode
|
run: make -j4 && ./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)
|
||||||
|
@ -151,6 +171,7 @@ jobs:
|
||||||
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]
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
timeout-minutes: 180
|
timeout-minutes: 180
|
||||||
env:
|
env:
|
||||||
|
@ -178,6 +199,7 @@ jobs:
|
||||||
## .\v.exe -cflags "/fsanitize=address" test-self
|
## .\v.exe -cflags "/fsanitize=address" test-self
|
||||||
|
|
||||||
tests-sanitize-address-gcc:
|
tests-sanitize-address-gcc:
|
||||||
|
needs: [code-formatting-before-regression]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
timeout-minutes: 180
|
timeout-minutes: 180
|
||||||
env:
|
env:
|
||||||
|
@ -196,7 +218,7 @@ 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 && ./v test-cleancode
|
run: make -j4 && ./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)
|
||||||
|
@ -207,6 +229,7 @@ jobs:
|
||||||
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]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
timeout-minutes: 180
|
timeout-minutes: 180
|
||||||
env:
|
env:
|
||||||
|
@ -225,7 +248,7 @@ 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 && ./v test-cleancode
|
run: make -j4 && ./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)
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
name: vlang benchmarks
|
name: vlang benchmarks
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_run:
|
||||||
paths-ignore:
|
workflows: ["Other CI"]
|
||||||
- "**.md"
|
types:
|
||||||
pull_request:
|
- completed
|
||||||
paths-ignore:
|
|
||||||
- "**.md"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
name: Containers CI
|
name: Containers CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_run:
|
||||||
paths-ignore:
|
workflows: ["Other CI"]
|
||||||
- "**.md"
|
types:
|
||||||
pull_request:
|
- completed
|
||||||
paths-ignore:
|
|
||||||
- "**.md"
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: build-containers-${{ github.event.pull_request.number || github.sha }}
|
group: build-containers-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
|
|
@ -2,7 +2,11 @@ name: Docs CI
|
||||||
|
|
||||||
### Run on *EVERY* commit. The documentation *SHOULD* stay valid, and
|
### Run on *EVERY* commit. The documentation *SHOULD* stay valid, and
|
||||||
### the developers should receive early warning if they break it.
|
### the developers should receive early warning if they break it.
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: ["Other CI"]
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-markdown:
|
check-markdown:
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
name: Graphics CI
|
name: Graphics CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_run:
|
||||||
paths-ignore:
|
workflows: ["Other CI"]
|
||||||
- "**.md"
|
types:
|
||||||
pull_request:
|
- completed
|
||||||
paths-ignore:
|
|
||||||
- "**.md"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
gg-regressions:
|
gg-regressions:
|
||||||
|
|
|
@ -2,6 +2,8 @@ name: Other CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- "**.md"
|
- "**.md"
|
||||||
pull_request:
|
pull_request:
|
||||||
|
@ -14,6 +16,7 @@ concurrency:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
no-gpl-by-accident:
|
no-gpl-by-accident:
|
||||||
|
needs: [code-formatting]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
|
@ -39,6 +42,7 @@ jobs:
|
||||||
run: ./v test-fmt
|
run: ./v test-fmt
|
||||||
|
|
||||||
performance-regressions:
|
performance-regressions:
|
||||||
|
needs: [code-formatting]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
env:
|
env:
|
||||||
|
@ -63,6 +67,7 @@ jobs:
|
||||||
run: cmd/tools/repeat --max_time 1501 --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
|
run: cmd/tools/repeat --max_time 1501 --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
|
||||||
|
|
||||||
misc-tooling:
|
misc-tooling:
|
||||||
|
needs: [code-formatting]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
timeout-minutes: 121
|
timeout-minutes: 121
|
||||||
env:
|
env:
|
||||||
|
@ -111,6 +116,7 @@ jobs:
|
||||||
./v should-compile-all examples/sokol/*.v examples/sokol/0?*/*.v
|
./v should-compile-all examples/sokol/*.v examples/sokol/0?*/*.v
|
||||||
|
|
||||||
parser-silent:
|
parser-silent:
|
||||||
|
needs: [code-formatting]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
timeout-minutes: 121
|
timeout-minutes: 121
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
name: Path Testing CI
|
name: Path Testing CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_run:
|
||||||
paths-ignore:
|
workflows: ["Other CI"]
|
||||||
- "**.md"
|
types:
|
||||||
pull_request:
|
- completed
|
||||||
paths-ignore:
|
|
||||||
- "**.md"
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: build-paths-${{ github.event.pull_request.number || github.sha }}
|
group: build-paths-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
name: sdl CI
|
name: sdl CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_run:
|
||||||
paths-ignore:
|
workflows: ["Other CI"]
|
||||||
- "**.md"
|
types:
|
||||||
pull_request:
|
- completed
|
||||||
paths-ignore:
|
|
||||||
- "**.md"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
v-compiles-sdl-examples:
|
v-compiles-sdl-examples:
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
name: toml CI
|
name: toml CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_run:
|
||||||
paths-ignore:
|
workflows: ["Other CI"]
|
||||||
- "**.md"
|
types:
|
||||||
pull_request:
|
- completed
|
||||||
paths-ignore:
|
|
||||||
- "**.md"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
toml-module-pass-external-test-suites:
|
toml-module-pass-external-test-suites:
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
name: V Apps and Modules
|
name: V Apps and Modules
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_run:
|
||||||
paths-ignore:
|
workflows: ["Other CI"]
|
||||||
- "**.md"
|
types:
|
||||||
pull_request:
|
- completed
|
||||||
paths-ignore:
|
|
||||||
- "**.md"
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: build-other-${{ github.event.pull_request.number || github.sha }}
|
group: build-other-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
name: vab CI
|
name: vab CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_run:
|
||||||
paths-ignore:
|
workflows: ["Other CI"]
|
||||||
- "**.md"
|
types:
|
||||||
pull_request:
|
- completed
|
||||||
paths-ignore:
|
|
||||||
- "**.md"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
vab-compiles-v-examples:
|
vab-compiles-v-examples:
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
name: Build Vinix kernel
|
name: Build Vinix kernel
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
workflow_run:
|
||||||
paths-ignore:
|
workflows: ["Other CI"]
|
||||||
- "**.md"
|
types:
|
||||||
push:
|
- completed
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
paths-ignore:
|
|
||||||
- "**.md"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
vinix-build:
|
vinix-build:
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
name: Websockets CI
|
name: Websockets CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_run:
|
||||||
paths-ignore:
|
workflows: ["Other CI"]
|
||||||
- "**.md"
|
types:
|
||||||
pull_request:
|
- completed
|
||||||
paths-ignore:
|
|
||||||
- "**.md"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
websocket_tests:
|
websocket_tests:
|
||||||
|
|
Loading…
Reference in New Issue