ci: update workflow conditions (#21338)

This commit is contained in:
Turiiya 2024-04-24 05:48:02 +02:00 committed by GitHub
parent 9ed33718f3
commit 0a14bef008
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
25 changed files with 57 additions and 79 deletions

View File

@ -12,10 +12,7 @@ on:
jobs:
bootstrapping-works:
if: >
github.event_name != 'push'
|| github.event.ref == 'refs/heads/master'
|| github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
strategy:
matrix:
os: [ubuntu-latest, macos-14]

View File

@ -24,7 +24,7 @@ concurrency:
jobs:
build-doom:
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
strategy:
matrix:
os: [ubuntu-20.04, macos-12]
@ -59,7 +59,7 @@ jobs:
WAD_FILE=~/DOOM1.WAD ~/code/doom/build_whole_project.sh
test-regression:
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
runs-on: ubuntu-20.04
timeout-minutes: 20
env:

View File

@ -16,7 +16,7 @@ jobs:
macos-cross:
runs-on: macos-latest
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 25
env:
VFLAGS: -cc clang
@ -48,7 +48,7 @@ jobs:
linux-cross:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 25
env:
VFLAGS: -cc tcc -no-retry-compilation
@ -97,7 +97,7 @@ jobs:
windows-cross:
runs-on: windows-2019
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 25
steps:
- uses: actions/checkout@v4

View File

@ -17,10 +17,7 @@ concurrency:
jobs:
alpine-docker-musl-gcc:
runs-on: ubuntu-20.04
if: >
github.event_name != 'push'
|| github.event.ref == 'refs/heads/master'
|| github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 241
container:
image: thevlang/vlang:alpine-build

View File

@ -17,10 +17,7 @@ concurrency:
jobs:
ubuntu-docker-musl:
runs-on: ubuntu-20.04
if: >
github.event_name != 'push'
|| github.event.ref == 'refs/heads/master'
|| github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
container:
image: thevlang/vlang:ubuntu-build

View File

@ -15,10 +15,7 @@ on:
jobs:
check-markdown:
runs-on: ubuntu-20.04
if: >
github.event_name != 'push'
|| github.event.ref == 'refs/heads/master'
|| github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
@ -31,10 +28,7 @@ jobs:
report-missing-fn-doc:
runs-on: ubuntu-20.04
if: >
github.event_name != 'push'
|| github.event.ref == 'refs/heads/master'
|| github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 5
env:
MOPTIONS: --diff --deprecated --relative-paths --exclude /vlib/v/ --exclude /builtin/linux_bare/ --exclude /testdata/ --exclude /tests/

View File

@ -25,7 +25,7 @@ concurrency:
jobs:
build-vc:
runs-on: ubuntu-latest
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
steps:
- uses: actions/checkout@v4
- name: Build V
@ -62,5 +62,5 @@ jobs:
git -C vc log -3
- name: Deploy
if: github.event.repository.full_name == 'vlang/v' && github.event_name == 'push' && github.event.ref == 'refs/heads/master'
if: github.event_name == 'push' && github.repository == 'vlang/v' && github.ref == 'refs/heads/master'
run: git -C vc push || true

View File

@ -15,7 +15,7 @@ on:
jobs:
gg-regressions:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 20
env:
VFLAGS: -cc tcc

View File

@ -19,7 +19,7 @@ concurrency:
jobs:
tcc:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
env:
VFLAGS: -cc tcc -no-retry-compilation
@ -99,7 +99,7 @@ jobs:
tcc-boehm-gc:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
env:
VFLAGS: -cc tcc -no-retry-compilation
@ -156,7 +156,7 @@ jobs:
gcc:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
steps:
- uses: actions/checkout@v4
@ -262,7 +262,7 @@ jobs:
clang:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
env:
VFLAGS: -cc clang
@ -352,7 +352,7 @@ jobs:
# autofree-selfcompile:
# runs-on: ubuntu-20.04
# if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
# if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
# timeout-minutes: 121
# env:
# VFLAGS: -cc gcc
@ -365,7 +365,7 @@ jobs:
# musl:
# runs-on: ubuntu-20.04
# if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
# if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
# timeout-minutes: 121
# env:
# VFLAGS: -cc musl-gcc

View File

@ -19,7 +19,7 @@ concurrency:
jobs:
clang:
runs-on: macOS-12
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
env:
VFLAGS: -cc clang

View File

@ -25,7 +25,7 @@ concurrency:
jobs:
build-module-docs:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
steps:
- uses: actions/checkout@v4
- name: Build V
@ -39,5 +39,5 @@ jobs:
- name: Build module documentation
run: ./v doc -m -f html vlib/
- name: Deploy docs to vercel
if: github.event.repository.full_name == 'vlang/v' && github.event_name == 'push' && github.event.ref == 'refs/heads/master'
if: github.event_name == 'push' && github.repository == 'vlang/v' && github.ref == 'refs/heads/master'
run: npx vercel --confirm --prod --name vmodules --token ${{ secrets.VERCEL_TOKEN }} vlib/_docs/ || true

View File

@ -56,7 +56,7 @@ jobs:
windows-2019
]
runs-on: ${{ matrix.os }}
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
steps:
- uses: actions/checkout@v4

View File

@ -19,7 +19,7 @@ concurrency:
jobs:
no-gpl-by-accident:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
@ -29,7 +29,7 @@ jobs:
code-formatting:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 30
env:
VFLAGS: -cc gcc
@ -46,7 +46,7 @@ jobs:
performance-regressions:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 30
env:
VFLAGS: -cc gcc
@ -71,7 +71,7 @@ jobs:
misc-tooling:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
env:
VFLAGS: -cc tcc -no-retry-compilation
@ -111,7 +111,7 @@ jobs:
parser-silent:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
steps:
- uses: actions/checkout@v4

View File

@ -16,7 +16,7 @@ jobs:
space-paths-linux:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 30
env:
MY_V_PATH: '你好 my $path, @с интервали'
@ -42,7 +42,7 @@ jobs:
space-paths-macos:
runs-on: macos-14
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 30
env:
MY_V_PATH: '你好 my $path, @с интервали'
@ -71,7 +71,7 @@ jobs:
space-paths-windows:
runs-on: windows-2022
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 30
env:
MY_V_PATH: 'path with some $punctuation, and some spaces'

View File

@ -7,7 +7,7 @@ on:
jobs:
network-tests-ubuntu:
runs-on: ubuntu-20.04
if: github.event.ref == 'refs/heads/master' && github.event.repository.full_name == 'vlang/v'
if: github.ref == 'refs/heads/master' && github.repository == 'vlang/v'
timeout-minutes: 30
env:
V_CI_PERIODIC: 1
@ -22,10 +22,9 @@ jobs:
## - name: Run network tests
## run: ./v -d network test vlib/net
network-tests-macos:
runs-on: macos-14
if: github.event.ref == 'refs/heads/master' && github.event.repository.full_name == 'vlang/v'
if: github.ref == 'refs/heads/master' && github.repository == 'vlang/v'
timeout-minutes: 30
env:
V_CI_PERIODIC: 1
@ -42,7 +41,7 @@ jobs:
network-windows-msvc:
runs-on: windows-2019
if: github.event.ref == 'refs/heads/master' && github.event.repository.full_name == 'vlang/v'
if: github.ref == 'refs/heads/master' && github.repository == 'vlang/v'
timeout-minutes: 30
env:
V_CI_PERIODIC: 1

View File

@ -76,7 +76,7 @@ concurrency:
jobs:
tests-sanitize-undefined-clang:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 240
env:
VFLAGS: -cc clang
@ -101,7 +101,7 @@ jobs:
tests-sanitize-undefined-gcc:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 240
env:
VFLAGS: -cc gcc
@ -125,7 +125,7 @@ jobs:
tests-sanitize-address-clang:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 240
env:
VFLAGS: -cc clang
@ -154,7 +154,7 @@ jobs:
tests-sanitize-address-msvc:
runs-on: windows-2019
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 240
env:
VFLAGS: -cc msvc
@ -183,7 +183,7 @@ jobs:
tests-sanitize-address-gcc:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 240
env:
VFLAGS: -cc gcc
@ -212,7 +212,7 @@ jobs:
tests-sanitize-memory-clang:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 240
env:
VFLAGS: -cc clang -gc none

View File

@ -20,7 +20,7 @@ concurrency:
jobs:
v-compiles-sdl-examples:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 30
env:
VFLAGS: -cc tcc

View File

@ -18,7 +18,7 @@ concurrency:
jobs:
test-time-linux:
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@ -36,7 +36,7 @@ jobs:
run: TZ=Europe/Paris ./v test vlib/time/
test-time-macos:
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
runs-on: macos-14
steps:
- uses: actions/checkout@v4
@ -54,7 +54,7 @@ jobs:
run: TZ=Europe/Paris ./v test vlib/time/
test-time-windows:
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
runs-on: windows-2019
steps:
- uses: actions/checkout@v4

View File

@ -15,7 +15,7 @@ on:
jobs:
toml-module-pass-external-test-suites:
runs-on: ubuntu-latest
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 30
steps:
- uses: actions/checkout@v4

View File

@ -19,10 +19,7 @@ concurrency:
jobs:
v-apps-compile:
runs-on: ubuntu-latest
if: >
github.event_name != 'push'
|| github.event.ref == 'refs/heads/master'
|| github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
steps:
- uses: actions/checkout@v4
@ -206,10 +203,7 @@ jobs:
vsl-and-vtl-compile:
runs-on: ubuntu-20.04
if: >
github.event_name != 'push'
|| github.event.ref == 'refs/heads/master'
|| github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
env:
VFLAGS: -no-parallel

View File

@ -16,7 +16,7 @@ on:
jobs:
vab-compiles-v-examples:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
env:
VAB_FLAGS: --api 30 --build-tools 29.0.0 -v 3
@ -59,7 +59,7 @@ jobs:
v-compiles-os-android:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 20
steps:
- uses: actions/checkout@v4

View File

@ -16,7 +16,7 @@ on:
jobs:
vinix-build:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 10
env:
VFLAGS: -gc none

View File

@ -47,7 +47,7 @@ concurrency:
jobs:
wasm-backend-ubuntu:
runs-on: ubuntu-22.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
steps:
- uses: actions/checkout@v4
@ -69,7 +69,7 @@ jobs:
wasm-backend-macos:
runs-on: macOS-12
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
steps:
- uses: actions/checkout@v4
@ -90,7 +90,7 @@ jobs:
# wasm-backend-windows:
# runs-on: windows-2022
# if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
# if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
# timeout-minutes: 121
# steps:
# - uses: actions/checkout@v4

View File

@ -15,7 +15,7 @@ on:
jobs:
websocket_tests:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
env:
VFLAGS: -cc tcc -no-retry-compilation

View File

@ -19,7 +19,7 @@ concurrency:
jobs:
gcc:
runs-on: windows-2019
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 271
env:
VFLAGS: -cc gcc
@ -71,7 +71,7 @@ jobs:
msvc:
runs-on: windows-2019
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 271
env:
VFLAGS: -cc msvc
@ -117,7 +117,7 @@ jobs:
tcc:
runs-on: windows-2019
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 181
env:
VFLAGS: -cc tcc -no-retry-compilation