[github-actions] use concurrency feature to cancel oustanding jobs (#8154)

This commit is contained in:
Jonathan Hui
2022-09-15 12:06:45 -07:00
committed by GitHub
parent b11121b7b5
commit b5ea9c8106
13 changed files with 54 additions and 96 deletions
+4 -8
View File
@@ -30,15 +30,11 @@ name: Build
on: [push, pull_request]
jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
cancel-previous-runs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
jobs:
pretty:
runs-on: ubuntu-20.04
+4 -8
View File
@@ -30,15 +30,11 @@ name: Docker
on: [push, pull_request]
jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
cancel-previous-runs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
jobs:
buildx:
name: buildx-${{ matrix.docker_name }}
+6
View File
@@ -27,7 +27,13 @@
#
name: CIFuzz
on: [pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
jobs:
Fuzzing:
runs-on: ubuntu-20.04
+4 -8
View File
@@ -30,15 +30,11 @@ name: Makefile Check
on: [push, pull_request]
jobs:
cancel-previous-runs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
jobs:
makefile-check:
runs-on: ubuntu-20.04
steps:
+4 -8
View File
@@ -30,15 +30,11 @@ name: Border Router
on: [push, pull_request]
jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
cancel-previous-runs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
jobs:
backbone-router:
runs-on: ubuntu-20.04
+4 -8
View File
@@ -30,15 +30,11 @@ name: OTCI
on: [push, pull_request]
jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
cancel-previous-runs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
jobs:
cli-sim:
name: cli-sim VIRTUAL_TIME=${{ matrix.virtual_time }}
+4 -8
View File
@@ -30,6 +30,10 @@ name: OTNS
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
env:
COVERAGE: 1
REFERENCE_DEVICE: 1
@@ -40,14 +44,6 @@ env:
jobs:
cancel-previous-runs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
unittests:
name: Unittests
runs-on: ubuntu-20.04
+4 -8
View File
@@ -30,15 +30,11 @@ name: POSIX
on: [push, pull_request]
jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
cancel-previous-runs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
jobs:
expects-linux:
runs-on: ubuntu-20.04
+4 -8
View File
@@ -30,15 +30,11 @@ name: Simulation 1.1
on: [push, pull_request]
jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
cancel-previous-runs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
jobs:
distcheck:
runs-on: ubuntu-20.04
+4 -8
View File
@@ -30,15 +30,11 @@ name: Simulation 1.3
on: [push, pull_request]
jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
cancel-previous-runs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
jobs:
thread-1-3:
name: thread-1-3-${{ matrix.compiler.c }}-${{ matrix.arch }}
+4 -8
View File
@@ -30,15 +30,11 @@ name: Size
on: [push, pull_request]
jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
cancel-previous-runs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
jobs:
size-report:
runs-on: ubuntu-20.04
+4 -8
View File
@@ -30,15 +30,11 @@ name: Toranj
on: [push, pull_request]
jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
cancel-previous-runs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
jobs:
toranj-ncp:
name: toranj-ncp-${{ matrix.TORANJ_RADIO }}
+4 -8
View File
@@ -30,15 +30,11 @@ name: API Version
on: [pull_request]
jobs:
cancel-previous-runs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
jobs:
api-version:
runs-on: ubuntu-20.04
steps: