Skip to content

Commit e6a9720

Browse files
authored
Improve workflow triggers (#279)
The linters aren't pinned and thus can start to fail on commits that don't touch any files they apply to. Also don't run all workflows twice for a PR.
1 parent e566ea9 commit e6a9720

7 files changed

Lines changed: 13 additions & 21 deletions

File tree

.github/workflows/bazel_lint.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,9 @@
1818
name: bazel_lint
1919
on:
2020
push:
21-
paths:
22-
- '**/BUILD'
23-
- '**.bzl'
24-
- '**/BUILD.bazel'
21+
branches: [main]
2522
pull_request:
26-
paths:
27-
- '**/BUILD'
28-
- '**.bzl'
29-
- '**/BUILD.bazel'
23+
branches: [main]
3024
jobs:
3125
bazel_lint:
3226
runs-on: ubuntu-latest

.github/workflows/bazel_test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ name: Bazel Test
1616

1717
on:
1818
push:
19+
branches: [main]
1920
pull_request:
21+
branches: [main]
2022
schedule:
2123
- cron: '0 0 * * *'
2224
workflow_dispatch:

.github/workflows/cpp_lint.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,14 @@
1818
name: cpplint
1919
on:
2020
push:
21-
paths:
22-
- '**.cc'
23-
- '**.h'
24-
- '**.cpp'
21+
branches: [main]
2522
pull_request:
26-
paths:
27-
- '**.cc'
28-
- '**.h'
29-
- '**.cpp'
23+
branches: [main]
3024
jobs:
3125
cpplint:
3226
runs-on: ubuntu-latest
3327
steps:
34-
- uses: actions/checkout@v1
35-
- uses: actions/setup-python@v1
28+
- uses: actions/checkout@v4
29+
- uses: actions/setup-python@v5
3630
- run: pip install cpplint
3731
- run: cpplint --recursive .

.github/workflows/oss_fuzz.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
name: OSS-Fuzz CI Fuzz Test
1616
on:
1717
push:
18-
branches:
19-
- master
18+
branches: [main]
2019
pull_request:
20+
branches: [main]
2121
schedule:
2222
- cron: '0 0 * * *'
2323

examples/fuzzed_data_provider_fuzz_test.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include <cstddef>
1818
#include <cstdint>
19+
#include <vector>
1920

2021
// Workaround for
2122
// https://github.com/llvm/llvm-project/commit/0cccccf0d2cbd707503263785f9a0407d3e2bd5ea

examples/runfiles_fuzz_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
using ::bazel::tools::cpp::runfiles::Runfiles;
2727

2828
namespace {
29-
Runfiles *runfiles = nullptr;
29+
Runfiles *runfiles = nullptr;
3030
}
3131

3232
extern "C" void LLVMFuzzerInitialize(int *argc, char ***argv) {

fuzzing/replay/test_replayer.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <unistd.h>
2020

2121
#include <memory>
22+
#include <string>
2223

2324
#include "absl/strings/str_cat.h"
2425
#include "absl/strings/str_format.h"

0 commit comments

Comments
 (0)