Skip to content

Commit

Permalink
Moved concurrency definitions to top-level workflow jobs that need them
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitribouniol committed Sep 23, 2024
1 parent f666505 commit 4800939
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 15 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@ jobs:
name: Soundness
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/soundness.yml@main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-soundness
cancel-in-progress: true
with:
license_header_check_project_name: "SwiftNIO"

unit-tests:
name: Unit tests
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-unit-tests
cancel-in-progress: true
with:
linux_5_8_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
Expand All @@ -27,18 +33,27 @@ jobs:
name: Benchmarks
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/benchmarks.yml@main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-benchmarks
cancel-in-progress: true
with:
benchmark_package_path: "Benchmarks"

cxx-interop:
name: Cxx interop
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/cxx_interop.yml@main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-cxx-interop
cancel-in-progress: true

integration-tests:
name: Integration Tests
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-integration-tests
cancel-in-progress: true
with:
name: "Integration tests"
matrix_linux_command: "apt-get update -y -q && apt-get install -y -q lsof dnsutils netcat-openbsd net-tools curl jq && ./scripts/integration_tests.sh"
Expand All @@ -47,3 +62,6 @@ jobs:
name: Swift 6 Language Mode
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/swift_6_language_mode.yml@main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-integration-tests
cancel-in-progress: true
3 changes: 3 additions & 0 deletions .github/workflows/pull_request_label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ jobs:
name: Semantic Version label check
runs-on: ubuntu-latest
timeout-minutes: 1
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-semver-label-check
cancel-in-progress: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/soundness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ on:
type: string
description: "Container image for the shell check job. Defaults to latest Swift Ubuntu image."
default: "swift:5.10-noble"

## We are cancelling previously triggered workflow runs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-soundness
cancel-in-progress: true

jobs:
api-breakage-check:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/swift_6_language_mode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ name: Swift 6 language mode

on:
workflow_call:

## We are cancelling previously triggered workflow runs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-swift-6-language-mode
cancel-in-progress: true

jobs:
swift-6-language-mode:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/swift_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ on:
matrix_linux_nightly_main_command_override:
type: string
description: "The command of the nightly main Swift version linux matrix job to execute."

## We are cancelling previously triggered workflow runs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.name }}
cancel-in-progress: true

jobs:
linux:
Expand Down

0 comments on commit 4800939

Please sign in to comment.