Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update detection of workflow cancellation scenarios #21342

Merged
merged 2 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/bootstrapping_works_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ on:
paths-ignore:
- "**.md"

concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
bootstrapping-works:
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
strategy:
matrix:
os: [ubuntu-latest, macos-14]
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/c2v_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ on:
- 'tutorials/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
build-doom:
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
strategy:
matrix:
os: [ubuntu-20.04, macos-12]
Expand Down Expand Up @@ -59,7 +58,6 @@ jobs:
WAD_FILE=~/DOOM1.WAD ~/code/doom/build_whole_project.sh

test-regression:
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
runs-on: ubuntu-20.04
timeout-minutes: 20
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/cross_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ on:
- '**.yml'
- '!**/cross_ci.yml'

jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
macos-cross:
runs-on: macos-latest
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 25
env:
VFLAGS: -cc clang
Expand Down Expand Up @@ -48,7 +50,6 @@ jobs:

linux-cross:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 25
env:
VFLAGS: -cc tcc -no-retry-compilation
Expand Down Expand Up @@ -97,7 +98,6 @@ jobs:

windows-cross:
runs-on: windows-2019
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/docker_alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@ on:
paths-ignore:
- "**.md"
- "**.yml"
- '!**/docker_alpine.yml'
pull_request:
paths-ignore:
- "**.md"
- "**.yml"
- '!**/docker_alpine.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
alpine-docker-musl-gcc:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 241
container:
image: thevlang/vlang:alpine-build
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/docker_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@ on:
paths-ignore:
- "**.md"
- "**.yml"
- "!**/docker_ubuntu.yml"
pull_request:
paths-ignore:
- "**.md"
- "**.yml"
- "!**/docker_ubuntu.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
ubuntu-docker-musl:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
container:
image: thevlang/vlang:ubuntu-build
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/docs_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ on:
push:
paths-ignore:
- "**.yml"
- "!**/docs_ci.yml"
pull_request:
paths-ignore:
- "**.yml"
- "!**/docs_ci.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
check-markdown:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
Expand All @@ -28,7 +33,6 @@ jobs:

report-missing-fn-doc:
runs-on: ubuntu-20.04
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/
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/gen_vc_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ on:
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !contains(github.ref, 'master')}}

jobs:
build-vc:
runs-on: ubuntu-latest
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
steps:
- uses: actions/checkout@v4
- name: Build V
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/gg_regressions_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ on:
- '**.yml'
- '!**/gg_regressions_ci.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
gg-regressions:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 20
env:
VFLAGS: -cc tcc
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/linux_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ on:
- '!**/linux_ci.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
tcc:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
env:
VFLAGS: -cc tcc -no-retry-compilation
Expand Down Expand Up @@ -99,7 +98,6 @@ jobs:

tcc-boehm-gc:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
env:
VFLAGS: -cc tcc -no-retry-compilation
Expand Down Expand Up @@ -156,7 +154,6 @@ jobs:

gcc:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -262,7 +259,6 @@ jobs:

clang:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
env:
VFLAGS: -cc clang
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/macos_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ on:
- '!**/macos_ci.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
clang:
runs-on: macOS-12
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
env:
VFLAGS: -cc clang
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/module_docs_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ on:
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !contains(github.ref, 'master')}}

jobs:
build-module-docs:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
steps:
- uses: actions/checkout@v4
- name: Build V
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/native_backend_tests_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ on:
- 'vlib/v/gen/native/tests/**.v'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
cancel-in-progress: true

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

Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/other_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ on:
- '!**/other_ci.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
no-gpl-by-accident:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
Expand All @@ -29,7 +28,6 @@ jobs:

code-formatting:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 30
env:
VFLAGS: -cc gcc
Expand All @@ -46,7 +44,6 @@ jobs:

performance-regressions:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 30
env:
VFLAGS: -cc gcc
Expand All @@ -71,7 +68,6 @@ jobs:

misc-tooling:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
env:
VFLAGS: -cc tcc -no-retry-compilation
Expand Down Expand Up @@ -111,7 +107,6 @@ jobs:

parser-silent:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 121
steps:
- uses: actions/checkout@v4
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/paths_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ on:
push:
paths-ignore:
- "**.md"
- '!**/paths_ci.yml'
pull_request:
paths-ignore:
- "**.md"
- '!**/paths_ci.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
cancel-in-progress: true

jobs:

space-paths-linux:
runs-on: ubuntu-20.04
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 30
env:
MY_V_PATH: '你好 my $path, @с интервали'
Expand All @@ -42,7 +42,6 @@ jobs:

space-paths-macos:
runs-on: macos-14
if: github.event_name != 'push' || github.ref == 'refs/heads/master' || github.repository != 'vlang/v'
timeout-minutes: 30
env:
MY_V_PATH: '你好 my $path, @с интервали'
Expand Down Expand Up @@ -71,7 +70,6 @@ jobs:

space-paths-windows:
runs-on: windows-2022
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'
Expand Down
Loading