Skip to content
This repository was archived by the owner on Jul 8, 2025. It is now read-only.

Commit 2a0eb85

Browse files
committed
CI: Update and add rule for cancelling jobs already running
1 parent 48af14b commit 2a0eb85

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/c-cpp.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
name: C/C++ CI
2+
concurrency:
3+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
4+
cancel-in-progress: true
25

36
on:
47
push:
5-
branches: [ master ]
8+
branches: [ main ]
69
paths:
710
- 'meson.build'
811
- 'compat/**'
@@ -11,7 +14,7 @@ on:
1114
- '.github/workflows/**'
1215

1316
pull_request:
14-
branches: [ master ]
17+
branches: [ main ]
1518
paths:
1619
- 'meson.build'
1720
- 'compat/**'
@@ -31,11 +34,11 @@ jobs:
3134
run: |
3235
sudo dnf install -y gcc gcc-c++ flex bison meson ninja-build make libedit-devel libcurl-devel libxo-devel openssl-devel
3336
34-
- uses: actions/checkout@v2
37+
- uses: actions/checkout@v4
3538

3639
- name: build and check
3740
run: |
38-
meson setup build -Db_buildtype=debug
41+
meson setup build --buildtype=debug
3942
ninja -C build -v
4043
meson test -C build -v
4144
@@ -79,10 +82,10 @@ jobs:
7982
make
8083
make install
8184
82-
- uses: actions/checkout@v2
85+
- uses: actions/checkout@v4
8386

8487
- name: build and check
8588
run: |
86-
meson setup build --werror -Db_buildtype=debug -Drpmatch_path=/usr/local/lib
89+
meson setup build --werror --buildtype=debug -Drpmatch_path=/usr/local/lib
8790
ninja -C build -v
8891
meson test -C build -v

0 commit comments

Comments
 (0)