Skip to content

Commit

Permalink
CI: Update and add rule for cancelling jobs already running
Browse files Browse the repository at this point in the history
  • Loading branch information
andy5995 committed Dec 11, 2024
1 parent 48af14b commit 1b299cb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: C/C++ CI
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

on:
push:
branches: [ master ]
branches: [ main ]
paths:
- 'meson.build'
- 'compat/**'
Expand All @@ -11,7 +14,7 @@ on:
- '.github/workflows/**'

pull_request:
branches: [ master ]
branches: [ main ]
paths:
- 'meson.build'
- 'compat/**'
Expand All @@ -31,7 +34,7 @@ jobs:
run: |
sudo dnf install -y gcc gcc-c++ flex bison meson ninja-build make libedit-devel libcurl-devel libxo-devel openssl-devel
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: build and check
run: |
Expand Down Expand Up @@ -79,7 +82,7 @@ jobs:
make
make install
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: build and check
run: |
Expand Down

0 comments on commit 1b299cb

Please sign in to comment.