Skip to content

Commit 7475bff

Browse files
sklCopilot
andauthored
ci: reduce integration workflow run time (#1313)
* ci: always run on main * ci: cache integration go build * ci: zizmor ignore * ci: cancel stale workflows on new commits * ci: concurrency for vm and java-agent * ci: concurrency for remaining PR-workflows * ci: refactor matrix by run time * fix: extract aggregate test run time * ci: restore markdown workflow paths * Update scripts/update-test-weights.sh Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update scripts/update-test-weights.sh Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: ensure error reporting on weights script works --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 71eaea3 commit 7475bff

17 files changed

+289
-91
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
scripts/integration-test-weights.generated.json linguist-generated=true

.github/workflows/check_gh_actions_security.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
pull_request:
88
branches: ["**"]
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
12+
cancel-in-progress: true
13+
1014
permissions:
1115
contents: read
1216

.github/workflows/clang-format-check.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
required: false
1313
type: string
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
17+
cancel-in-progress: true
18+
1519
permissions:
1620
contents: read
1721

.github/workflows/clang-tidy-check.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
required: false
1313
type: string
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
17+
cancel-in-progress: true
18+
1519
permissions:
1620
contents: read
1721

.github/workflows/java-agent.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ name: Java Agent CI
33
on:
44
push:
55
branches: ["main", "release-*"]
6-
paths:
7-
- "pkg/internal/java/**"
8-
- ".github/workflows/java-agent.yml"
96
pull_request:
107
branches: ["main", "release-*"]
118
paths:
@@ -19,6 +16,10 @@ on:
1916
required: false
2017
type: string
2118

19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
21+
cancel-in-progress: true
22+
2223
permissions:
2324
contents: read
2425

@@ -72,4 +73,4 @@ jobs:
7273
with:
7374
name: obi-java-agent
7475
path: pkg/internal/java/build/obi-java-agent.jar
75-
retention-days: 7
76+
retention-days: 7

.github/workflows/lint_darwin.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,6 @@ name: Lint (Darwin)
33
on:
44
push:
55
branches: ["main", "release-*"]
6-
paths:
7-
- ".github/workflows/lint_darwin.yml"
8-
- "**.go"
9-
- "go.mod"
10-
- "go.sum"
11-
- "bpf/**"
12-
- "cmd/**"
13-
- "configs/**"
14-
- "internal/**"
15-
- "pkg/**"
16-
- "scripts/**"
176
pull_request:
187
branches: ["main", "release-*"]
198
paths:
@@ -28,6 +17,10 @@ on:
2817
- "pkg/**"
2918
- "scripts/**"
3019

20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
22+
cancel-in-progress: true
23+
3124
permissions:
3225
contents: read
3326

.github/workflows/markdown-fail-fast.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
paths:
99
- "**.md"
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13+
cancel-in-progress: true
14+
1115
permissions:
1216
contents: read
1317

.github/workflows/pull_request.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
required: false
1313
type: string
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
17+
cancel-in-progress: true
18+
1519
permissions:
1620
contents: read
1721

.github/workflows/pull_request_docker_build_test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
description: "Git ref (commit, branch, or tag) to check out"
99
required: false
1010
type: string
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
14+
cancel-in-progress: true
15+
1116
permissions:
1217
contents: read
1318

.github/workflows/pull_request_integration_tests.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,6 @@ name: Pull request integration tests
33
on:
44
push:
55
branches: ["main", "release-*"]
6-
paths:
7-
- ".github/workflows/pull_request_integration_tests.yml"
8-
- "**.go"
9-
- "go.mod"
10-
- "go.sum"
11-
- "bpf/**"
12-
- "cmd/**"
13-
- "configs/**"
14-
- "internal/**"
15-
- "pkg/**"
16-
- "scripts/**"
176
pull_request:
187
branches: ["main", "release-*"]
198
paths:
@@ -34,6 +23,10 @@ on:
3423
required: false
3524
type: string
3625

26+
concurrency:
27+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
28+
cancel-in-progress: true
29+
3730
permissions:
3831
contents: read
3932

@@ -119,10 +112,18 @@ jobs:
119112
persist-credentials: false
120113

121114
- name: Set up Go
122-
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
115+
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 # zizmor: ignore[cache-poisoning] go.sum verifies module integrity
123116
with:
124117
go-version-file: "go.mod"
125-
cache: false
118+
cache: true
119+
120+
- name: Go build cache
121+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 # zizmor: ignore[cache-poisoning] go build cache is content-addressable and self-verifying
122+
with:
123+
path: ~/.cache/go-build
124+
key: go-build-integration-race-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.go', 'go.sum') }}
125+
restore-keys: |
126+
go-build-integration-race-${{ runner.os }}-${{ runner.arch }}-
126127
127128
- name: Generate files
128129
run: make prereqs docker-generate

0 commit comments

Comments
 (0)