Skip to content

Commit 453f19e

Browse files
committed
ci: optimizations
1 parent 9b27873 commit 453f19e

File tree

5 files changed

+61
-34
lines changed

5 files changed

+61
-34
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ on:
88
pull_request:
99
branches: [main]
1010

11-
# Cancel in-progress runs for PRs, queue for main
11+
# Cancel in-progress runs when new commits are pushed
1212
concurrency:
1313
group: ${{ github.workflow }}-${{ github.ref }}
14-
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
14+
cancel-in-progress: true
1515

1616
# Default to read-only permissions
1717
permissions:
@@ -103,11 +103,16 @@ jobs:
103103
toolchain: stable
104104
components: clippy
105105

106-
- name: Install system dependencies
106+
- name: Install development tools via Mise
107+
uses: jdx/mise-action@v2
108+
with:
109+
install_args: protobuf
110+
cache: true
111+
112+
- name: Install mold linker
107113
run: |
108114
sudo apt-get update -qq
109-
sudo apt-get install -y -qq protobuf-compiler mold
110-
protoc --version
115+
sudo apt-get install -y -qq mold
111116
mold --version
112117
113118
- name: Install FoundationDB client library
@@ -152,11 +157,16 @@ jobs:
152157
with:
153158
toolchain: stable
154159

155-
- name: Install system dependencies
160+
- name: Install development tools via Mise
161+
uses: jdx/mise-action@v2
162+
with:
163+
install_args: protobuf
164+
cache: true
165+
166+
- name: Install mold linker
156167
run: |
157168
sudo apt-get update -qq
158-
sudo apt-get install -y -qq protobuf-compiler mold
159-
protoc --version
169+
sudo apt-get install -y -qq mold
160170
mold --version
161171
162172
- name: Install FoundationDB client library
@@ -207,23 +217,23 @@ jobs:
207217
with:
208218
toolchain: stable
209219

210-
- name: Install system dependencies
220+
- name: Install development tools via Mise
221+
uses: jdx/mise-action@v2
222+
with:
223+
install_args: protobuf cargo:cargo-nextest
224+
cache: true
225+
226+
- name: Install mold linker
211227
run: |
212228
sudo apt-get update -qq
213-
sudo apt-get install -y -qq protobuf-compiler mold
214-
protoc --version
229+
sudo apt-get install -y -qq mold
215230
mold --version
216231
217232
- name: Install FoundationDB client library
218233
run: |
219234
wget -q https://github.com/apple/foundationdb/releases/download/7.3.69/foundationdb-clients_7.3.69-1_amd64.deb
220235
sudo dpkg -i foundationdb-clients_7.3.69-1_amd64.deb
221236
222-
- name: Install cargo-nextest
223-
uses: taiki-e/install-action@dfcb1ee29051d97c8d0f2d437199570008fd5612 # v2.65.15
224-
with:
225-
tool: cargo-nextest
226-
227237
- name: Restore build cache
228238
uses: step-security/rust-cache@f8fba7098297c8c53a7c9a30575ec2ad4ad85056 # v2.8.2
229239
with:
@@ -278,23 +288,23 @@ jobs:
278288
with:
279289
toolchain: stable
280290

281-
- name: Install system dependencies
291+
- name: Install development tools via Mise
292+
uses: jdx/mise-action@v2
293+
with:
294+
install_args: protobuf cargo:cargo-llvm-cov
295+
cache: true
296+
297+
- name: Install mold linker
282298
run: |
283299
sudo apt-get update -qq
284-
sudo apt-get install -y -qq protobuf-compiler mold
285-
protoc --version
300+
sudo apt-get install -y -qq mold
286301
mold --version
287302
288303
- name: Install FoundationDB client library
289304
run: |
290305
wget -q https://github.com/apple/foundationdb/releases/download/7.3.69/foundationdb-clients_7.3.69-1_amd64.deb
291306
sudo dpkg -i foundationdb-clients_7.3.69-1_amd64.deb
292307
293-
- name: Install cargo-llvm-cov
294-
uses: taiki-e/install-action@dfcb1ee29051d97c8d0f2d437199570008fd5612 # v2.65.15
295-
with:
296-
tool: cargo-llvm-cov
297-
298308
- name: Restore build cache
299309
uses: step-security/rust-cache@f8fba7098297c8c53a7c9a30575ec2ad4ad85056 # v2.8.2
300310
with:
@@ -311,11 +321,11 @@ jobs:
311321
fail_ci_if_error: false
312322
token: ${{ secrets.CODECOV_TOKEN }}
313323

314-
# Check dependencies
324+
# Check dependencies (main branch only - informational, not blocking PRs)
315325
dependencies:
316326
name: Dependencies
317327
runs-on: ubuntu-latest
318-
if: github.actor != 'dependabot[bot]'
328+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
319329
permissions:
320330
contents: read
321331
steps:
@@ -332,13 +342,17 @@ jobs:
332342
with:
333343
toolchain: stable
334344

345+
- name: Install development tools via Mise
346+
uses: jdx/mise-action@v2
347+
with:
348+
install_args: cargo:cargo-outdated
349+
cache: true
350+
335351
- name: Cache Rust dependencies
336352
uses: step-security/rust-cache@f8fba7098297c8c53a7c9a30575ec2ad4ad85056 # v2.8.2
337353

338354
- name: Check outdated dependencies
339-
run: |
340-
cargo install cargo-outdated
341-
cargo outdated --exit-code 1 || echo "Some dependencies are outdated"
355+
run: cargo outdated --exit-code 1 || echo "Some dependencies are outdated"
342356

343357
- name: Check for duplicate dependencies
344358
run: cargo tree --duplicates

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ on:
88
pull_request:
99
branches: [main]
1010

11-
# Cancel in-progress runs for PRs
11+
# Cancel in-progress runs when new commits are pushed
1212
concurrency:
1313
group: ${{ github.workflow }}-${{ github.ref }}
14-
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
14+
cancel-in-progress: true
1515

1616
permissions:
1717
contents: read

.github/workflows/labeler.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1+
# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json
2+
13
name: Label PRs
24

35
on:
46
pull_request:
57
types: [opened, synchronize, reopened]
68

9+
# Cancel in-progress runs when new commits are pushed
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
714
permissions:
815
contents: read
916
pull-requests: write

.github/workflows/security.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
pull_request:
77
branches: [main]
88

9+
# Cancel in-progress runs when new commits are pushed
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
914
permissions:
1015
contents: read
1116
pull-requests: write

.mise.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ rust = "stable"
1414
node = "24"
1515

1616
# Development tools (installed automatically with `mise install`)
17-
"cargo:cargo-watch" = "latest" # Auto-rebuild on file changes
18-
"cargo:cargo-nextest" = "latest" # Next-generation test runner
19-
"cargo:cargo-llvm-cov" = "latest" # Code coverage
17+
"cargo:cargo-watch" = "latest" # Auto-rebuild on file changes
18+
"cargo:cargo-nextest" = "latest" # Next-generation test runner
19+
"cargo:cargo-llvm-cov" = "latest" # Code coverage
20+
"cargo:cargo-outdated" = "latest" # Dependency freshness check (for CI)
2021

2122
# Protobuf compiler for gRPC
2223
protobuf = "latest"

0 commit comments

Comments
 (0)