Skip to content

Commit 78f0851

Browse files
authored
Cancel CI runs if PRs get updated (#729)
1 parent 850b4d7 commit 78f0851

File tree

9 files changed

+50
-5
lines changed

9 files changed

+50
-5
lines changed

.github/workflows/api-check.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
branches:
66
- master
77

8+
concurrency:
9+
# Cancels pending runs when a PR gets updated.
10+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
11+
cancel-in-progress: true
12+
813
# The workflow may fail if we change the public API in a pull request.
914
# We allow fail on this action. But we should manually check if the changes are reasonable when we see a failed action.
1015
# It would be good if the workflow returns a neutral status when we find API changes. But it is currently not

.github/workflows/cargo-msrv.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
branches:
66
- master
77

8+
concurrency:
9+
# Cancels pending runs when a PR gets updated.
10+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
11+
cancel-in-progress: true
12+
813
jobs:
914
msrv:
1015
runs-on: ubuntu-18.04

.github/workflows/cargo-publish.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
release:
66
types: [published]
77

8+
concurrency:
9+
# Cancels pending runs when a PR gets updated.
10+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
11+
cancel-in-progress: true
12+
813
jobs:
914
cargo-publish:
1015
runs-on: ubuntu-18.04

.github/workflows/micro-bm.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ on:
1313
branches-ignore:
1414
- '**'
1515

16+
concurrency:
17+
# Cancels pending runs when a PR gets updated.
18+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
19+
cancel-in-progress: true
20+
1621
jobs:
1722
openjdk-microbm:
1823
runs-on: [self-hosted, Linux, freq-scaling-off]
@@ -66,7 +71,7 @@ jobs:
6671
submodules: true
6772
# Use rust-toolchain in the trunk (it doesnt matter much - if the toolchains defined in the trunk and the branch are different, we cant run anyway)
6873
- name: Setup Rust Toolchain
69-
run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core-trunk/rust-toolchain`" >> $GITHUB_ENV
74+
run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core-trunk/rust-toolchain`" >> $GITHUB_ENV
7075
# run compare
7176
- name: Compare Performance
7277
id: run

.github/workflows/mmtk-dev-env.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
branches:
77
- master
88

9+
concurrency:
10+
# Cancels pending runs when a PR gets updated.
11+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
12+
cancel-in-progress: true
13+
914
jobs:
1015
# Trigger ci.yml from mmtk/mmtk-dev-env to make sure mmtk-core can build with mmtk-dev-env.
1116
check-mmtk-dev-env:
@@ -22,4 +27,4 @@ jobs:
2227
inputs: '{}'
2328
propagate_failure: true
2429
trigger_workflow: true
25-
wait_workflow: true
30+
wait_workflow: true

.github/workflows/perf-compare-ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ on:
1111
description: The pull request number to run the perf tests. The workflow compares the specified pull request with the trunk.
1212
required: true
1313

14+
concurrency:
15+
# Cancels pending runs when a PR gets updated.
16+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
17+
cancel-in-progress: true
18+
1419
jobs:
1520
# Figure out binding PRs.
1621
binding-refs:

.github/workflows/post-review-ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
branches:
77
- master
88

9+
concurrency:
10+
# Cancels pending runs when a PR gets updated.
11+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
12+
cancel-in-progress: true
13+
914
jobs:
1015
# Figure out binding PRs.
1116
binding-refs:

.github/workflows/pre-review-ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
branches:
66
- master
77

8+
concurrency:
9+
# Cancels pending runs when a PR gets updated.
10+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
11+
cancel-in-progress: true
12+
813
jobs:
914
# Setup dynamic test matrix
1015
setup-test-matrix:

.github/workflows/stress-ci.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
branches-ignore:
99
- '**'
1010

11+
concurrency:
12+
# Cancels pending runs when a PR gets updated.
13+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
14+
cancel-in-progress: true
15+
1116
jobs:
1217
jikesrvm-stress-test:
1318
runs-on: [self-hosted, Linux, freq-scaling-on]
@@ -28,7 +33,7 @@ jobs:
2833
- name: Overwrite MMTk core in JikesRVM binding
2934
run: cp -r mmtk-core mmtk-jikesrvm/repos/
3035
- name: Setup Rust Toolchain
31-
run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core/rust-toolchain`" >> $GITHUB_ENV
36+
run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core/rust-toolchain`" >> $GITHUB_ENV
3237
- name: Setup
3338
run: |
3439
sed -i 's/^mmtk[[:space:]]=/#ci:mmtk=/g' mmtk-jikesrvm/mmtk/Cargo.toml
@@ -112,7 +117,7 @@ jobs:
112117
- name: Overwrite MMTk core in openjdk binding
113118
run: cp -r mmtk-core mmtk-openjdk/repos/
114119
- name: Setup Rust Toolchain
115-
run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core/rust-toolchain`" >> $GITHUB_ENV
120+
run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core/rust-toolchain`" >> $GITHUB_ENV
116121
- name: Setup
117122
run: |
118123
sed -i 's/^mmtk[[:space:]]=/#ci:mmtk=/g' mmtk-openjdk/mmtk/Cargo.toml
@@ -159,4 +164,4 @@ jobs:
159164
if: always()
160165
timeout-minutes: 180
161166
run:
162-
mmtk-openjdk/repos/openjdk/build/linux-x86_64-normal-server-release/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar /usr/share/benchmarks/dacapo/dacapo-2006-10-MR2.jar eclipse
167+
mmtk-openjdk/repos/openjdk/build/linux-x86_64-normal-server-release/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar /usr/share/benchmarks/dacapo/dacapo-2006-10-MR2.jar eclipse

0 commit comments

Comments
 (0)