Skip to content

Commit 99f6c31

Browse files
authored
Cancel previous CI jobs (#188)
- Add cancelation of previous CI jobs - Update build workflow
2 parents def0076 + 9b03662 commit 99f6c31

File tree

2 files changed

+32
-5
lines changed

2 files changed

+32
-5
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@ name: Build
22

33
on:
44
push:
5-
branches: [ "main" ]
6-
paths-ignore: ["README.md", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md"]
5+
branches:
6+
- main
7+
paths-ignore:
8+
- '**.md'
9+
- 'src/**/**.md'
10+
- 'Makefiles/**'
711
pull_request:
8-
branches: [ "main" ]
9-
paths-ignore: ["README.md", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md"]
12+
branches:
13+
- main
14+
paths-ignore:
15+
- '**.md'
16+
- 'book/**'
17+
- 'src/**/**.md'
18+
- 'Makefiles/**'
1019

1120
env:
1221
CARGO_TERM_COLOR: always
@@ -15,6 +24,15 @@ env:
1524
CARGO_INCREMENTAL: 0
1625

1726
jobs:
27+
cancel:
28+
name: 'Cancel Previous Runs'
29+
runs-on: ubuntu-latest
30+
timeout-minutes: 3
31+
steps:
32+
- uses: styfle/[email protected]
33+
with:
34+
access_token: ${{ github.token }}
35+
1836
build_on_linux:
1937
name: Build Catalyst Core on Linux
2038
runs-on: ubuntu-latest
@@ -45,7 +63,7 @@ jobs:
4563
CARGO_FLAGS: --verbose --locked
4664
steps:
4765
- name: Checkout code on PR
48-
#Workaround for the running out of disk space issue. See https://github.com/actions/runner-images/issues/1341
66+
# Workaround for the running out of disk space issue. See https://github.com/actions/runner-images/issues/1341
4967
run: |
5068
mkdir C:\\${{ github.event.repository.name }}
5169
git clone -n -v --progress https://github.com/input-output-hk/${{ github.event.repository.name }}.git C:\\${{ github.event.repository.name }}

.github/workflows/ci_tests.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ env:
2323
CARGO_INCREMENTAL: 0
2424

2525
jobs:
26+
cancel:
27+
name: 'Cancel Previous Runs'
28+
runs-on: ubuntu-latest
29+
timeout-minutes: 3
30+
steps:
31+
- uses: styfle/[email protected]
32+
with:
33+
access_token: ${{ github.token }}
34+
2635
vit_servicing_station:
2736
name: Vit Servicing Station Tests
2837
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)