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

Commit 39c3b6f

Browse files
committed
ci: adapt paths filtering
1 parent cb7f46b commit 39c3b6f

12 files changed

+163
-74
lines changed

.github/workflows/cargo-tests.yml renamed to .github/workflows/coprocessor_cargo-tests.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,34 @@ name: Rust tests
22

33
on:
44
pull_request:
5-
paths:
6-
- .github/workflows/cargo-tests.yml
7-
- fhevm-engine/**
8-
- proto/**
95

106
concurrency:
117
group: ${{ github.workflow }}-${{ github.head_ref }}
12-
cancel-in-progress: true
8+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
139

1410
jobs:
11+
check-changes:
12+
permissions:
13+
actions: 'read'
14+
contents: 'read'
15+
pull-requests: 'read'
16+
runs-on: ubuntu-latest
17+
outputs:
18+
changes-rust-files: ${{ steps.filter.outputs.rust-files }}
19+
steps:
20+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
21+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
22+
id: filter
23+
with:
24+
filters: |
25+
rust-files:
26+
- .github/workflows/coprocessor_cargo-tests.yml
27+
- fhevm-engine/**
28+
- proto/**
1529
cargo-tests:
30+
needs: check-changes
31+
if: ${{ needs.check-changes.outputs.changes-rust-files == 'true' }}
1632
runs-on: large_ubuntu_16
17-
1833
steps:
1934
- name: Checkout code
2035
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/dependency_analysis.yml renamed to .github/workflows/coprocessor_dependency-analysis.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,32 @@ name: Dependency analysis
22

33
on:
44
pull_request:
5-
paths-ignore:
6-
- "deployments/**"
7-
- "hardhat/**"
85

96
concurrency:
107
group: deps-analysis-${{ github.ref }}
118
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
129

1310
jobs:
11+
check-changes:
12+
permissions:
13+
actions: 'read'
14+
contents: 'read'
15+
pull-requests: 'read'
16+
runs-on: ubuntu-latest
17+
outputs:
18+
changes-rust-files: ${{ steps.filter.outputs.rust-files }}
19+
steps:
20+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
21+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
22+
id: filter
23+
with:
24+
filters: |
25+
rust-files:
26+
- .github/workflows/coprocessor_dependency-analysis.yml
27+
- fhevm-engine/**
1428
dependencies-check:
29+
needs: check-changes
30+
if: ${{ needs.check-changes.outputs.changes-rust-files == 'true' }}
1531
runs-on: ubuntu-latest
1632
steps:
1733

.github/workflows/docker-coprocessor.yml renamed to .github/workflows/coprocessor_docker-build.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,39 @@ name: "Docker - fhevm Coprocessor"
22

33
on:
44
pull_request:
5-
paths:
6-
- .github/workflows/docker-coprocessor.yml
7-
- fhevm-engine/**
8-
- proto/**
95
push:
106
branches:
117
- main
12-
paths:
13-
- .github/workflows/docker-coprocessor.yml
14-
- fhevm-engine/**
15-
- proto/**
168
release:
179
types:
1810
- published
1911

2012
concurrency:
2113
group: fhevm-coprocessor-${{ github.ref_name }}
22-
cancel-in-progress: false
14+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
2315

2416
jobs:
17+
check-changes:
18+
permissions:
19+
actions: 'read'
20+
contents: 'read'
21+
pull-requests: 'read'
22+
runs-on: ubuntu-latest
23+
outputs:
24+
changes-coprocessor-files: ${{ steps.filter.outputs.coprocessor-files }}
25+
steps:
26+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
27+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
28+
id: filter
29+
with:
30+
filters: |
31+
coprocessor-files:
32+
- .github/workflows/coprocessor_docker-build.yml
33+
- fhevm-engine/**
34+
- proto/**
2535
docker-fhevm-coprocessor:
36+
needs: check-changes
37+
if: ${{ needs.check-changes.outputs.changes-coprocessor-files == 'true' || github.event_name == 'release' }}
2638
uses: zama-ai/ci-templates/.github/workflows/docker_common.yml@44333c96991d6747e0bef6a3308bfd98b20390f8 # main
2739
secrets:
2840
GHCR_ACTION_TOKEN: ${{ secrets.BLOCKCHAIN_ACTIONS_TOKEN }}

.github/workflows/docker-db-migration.yml renamed to .github/workflows/coprocessor_docker-build_db-migration.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,38 @@ name: "Docker - fhevm DB migration"
22

33
on:
44
pull_request:
5-
paths:
6-
- .github/workflows/docker-db-migration.yml
7-
- fhevm-engine/fhevm-db/**
85
push:
96
branches:
107
- main
11-
paths:
12-
- .github/workflows/docker-db-migration.yml
13-
- fhevm-engine/fhevm-db/**
148
release:
159
types:
1610
- published
1711

1812
concurrency:
1913
group: fhevm-db-migration-${{ github.ref_name }}
20-
cancel-in-progress: false
14+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
2115

2216
jobs:
17+
check-changes:
18+
permissions:
19+
actions: 'read'
20+
contents: 'read'
21+
pull-requests: 'read'
22+
runs-on: ubuntu-latest
23+
outputs:
24+
changes-db-migration-files: ${{ steps.filter.outputs.db-migration-files }}
25+
steps:
26+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
27+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
28+
id: filter
29+
with:
30+
filters: |
31+
db-migration-files:
32+
- .github/workflows/coprocessor_docker-build_db-migration.yml
33+
- fhevm-engine/fhevm-db/**
2334
docker-fhevm-db-migration:
35+
needs: check-changes
36+
if: ${{ needs.check-changes.outputs.changes-db-migration-files == 'true' || github.event_name == 'release' }}
2437
uses: zama-ai/ci-templates/.github/workflows/docker_common.yml@44333c96991d6747e0bef6a3308bfd98b20390f8 # main
2538
secrets:
2639
GHCR_ACTION_TOKEN: ${{ secrets.BLOCKCHAIN_ACTIONS_TOKEN }}

.github/workflows/gpu-tests.yml renamed to .github/workflows/coprocessor_gpu-tests.yml

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,37 +15,9 @@ on:
1515
# Allows you to run this workflow manually from the Actions tab as an alternative.
1616
workflow_dispatch:
1717
pull_request:
18-
paths:
19-
- fhevm-engine/Cargo.toml
20-
- fhevm-engine/coprocessor/Cargo.toml
21-
- fhevm-engine/coprocessor/build.rs
22-
- fhevm-engine/coprocessor/src/**
23-
- fhevm-engine/executor/Cargo.toml
24-
- fhevm-engine/executor/build.rs
25-
- fhevm-engine/executor/src/**
26-
- fhevm-engine/scheduler/src/**
27-
- fhevm-engine/scheduler/Cargo.toml
28-
- fhevm-engine/scheduler/build.rs
29-
- proto/**
30-
- '.github/workflows/gpu-tests.yml'
31-
- ci/slab.toml
3218
push:
3319
branches:
3420
- main
35-
paths:
36-
- fhevm-engine/Cargo.toml
37-
- fhevm-engine/coprocessor/Cargo.toml
38-
- fhevm-engine/coprocessor/build.rs
39-
- fhevm-engine/coprocessor/src/**
40-
- fhevm-engine/executor/Cargo.toml
41-
- fhevm-engine/executor/build.rs
42-
- fhevm-engine/executor/src/**
43-
- fhevm-engine/scheduler/src/**
44-
- fhevm-engine/scheduler/Cargo.toml
45-
- fhevm-engine/scheduler/build.rs
46-
- proto/**
47-
- '.github/workflows/gpu-tests.yml'
48-
- ci/slab.toml
4921

5022
jobs:
5123
should-run:
@@ -78,7 +50,7 @@ jobs:
7850
- fhevm-engine/scheduler/Cargo.toml
7951
- fhevm-engine/scheduler/build.rs
8052
- proto/**
81-
- '.github/workflows/gpu-tests.yml'
53+
- '.github/workflows/coprocessor_gpu-tests.yml'
8254
- ci/slab.toml
8355
8456
setup-instance:

.github/workflows/docker-contracts.yml renamed to .github/workflows/host-contracts_docker-build.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,9 @@ name: "Docker - fhevm Host Contracts"
22

33
on:
44
pull_request:
5-
paths:
6-
- .github/workflows/docker-contracts.yml
7-
- contracts/**
85
push:
96
branches:
107
- main
11-
paths:
12-
- .github/workflows/docker-contracts.yml
13-
- contracts/**
148
release:
159
types:
1610
- published
@@ -20,7 +14,26 @@ concurrency:
2014
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
2115

2216
jobs:
17+
check-changes:
18+
permissions:
19+
actions: 'read'
20+
contents: 'read'
21+
pull-requests: 'read'
22+
runs-on: ubuntu-latest
23+
outputs:
24+
changes-contracts-files: ${{ steps.filter.outputs.contracts-files }}
25+
steps:
26+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
27+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
28+
id: filter
29+
with:
30+
filters: |
31+
contracts-files:
32+
- .github/workflows/host-contracts_docker-build.yml
33+
- contracts/**
2334
docker-fhevm-contracts:
35+
needs: check-changes
36+
if: ${{ needs.check-changes.outputs.changes-contracts-files == 'true' || github.event_name == 'release' }}
2437
uses: zama-ai/ci-templates/.github/workflows/docker_common.yml@44333c96991d6747e0bef6a3308bfd98b20390f8 # main
2538
secrets:
2639
GHCR_ACTION_TOKEN: ${{ secrets.BLOCKCHAIN_ACTIONS_TOKEN }}

.github/workflows/fhevm-host-contracts-tests.yml renamed to .github/workflows/host-contracts_docker-deployment-tests.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,33 @@ name: fhevm Host Contracts Deployment Test
22

33
on:
44
pull_request:
5-
paths:
6-
- .github/workflows/fhevm-sc-tests.yml
7-
- contracts/**
85

96
concurrency:
107
group: ${{ github.workflow }}-${{ github.ref }}
118
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
129

1310
jobs:
11+
check-changes:
12+
permissions:
13+
actions: 'read'
14+
contents: 'read'
15+
pull-requests: 'read'
16+
runs-on: ubuntu-latest
17+
outputs:
18+
changes-contracts-files: ${{ steps.filter.outputs.contracts-files }}
19+
steps:
20+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
21+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
22+
id: filter
23+
with:
24+
filters: |
25+
contracts-files:
26+
- .github/workflows/host-contracts_docker-deployment-tests.yml
27+
- contracts/**
1428
docker-compose-tests:
29+
needs: check-changes
30+
if: ${{ needs.check-changes.outputs.changes-contracts-files == 'true' }}
1531
runs-on: ubuntu-latest
16-
1732
steps:
1833
- name: Checkout code
1934
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/test.yml renamed to .github/workflows/host-contracts_npm-tests.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,28 @@ name: Pull request tests (contracts)
22

33
on:
44
pull_request:
5-
branches:
6-
- "*"
7-
paths:
8-
- contracts/**
95

106
jobs:
7+
check-changes:
8+
permissions:
9+
actions: 'read'
10+
contents: 'read'
11+
pull-requests: 'read'
12+
runs-on: ubuntu-latest
13+
outputs:
14+
changes-contracts-files: ${{ steps.filter.outputs.contracts-files }}
15+
steps:
16+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
17+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
18+
id: filter
19+
with:
20+
filters: |
21+
contracts-files:
22+
- .github/workflows/host-contracts_npm-tests.yml
23+
- contracts/**
1124
build:
25+
needs: check-changes
26+
if: ${{ needs.check-changes.outputs.changes-contracts-files == 'true' }}
1227
runs-on: large_ubuntu_32
1328
strategy:
1429
matrix:

.github/workflows/slither.yml renamed to .github/workflows/host-contracts_slither-analysis.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,30 @@
11
name: Slither Analysis
2-
permissions:
3-
contents: read
4-
checks: write
2+
53
on:
64
pull_request:
75
branches:
86
- main
9-
paths:
10-
- contracts/**
11-
- .github/workflows/slither.yml
127
jobs:
8+
check-changes:
9+
permissions:
10+
actions: 'read'
11+
contents: 'read'
12+
pull-requests: 'read'
13+
runs-on: ubuntu-latest
14+
outputs:
15+
changes-contracts-files: ${{ steps.filter.outputs.contracts-files }}
16+
steps:
17+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
18+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
19+
id: filter
20+
with:
21+
filters: |
22+
contracts-files:
23+
- .github/workflows/host-contracts_slither-analysis.yml
24+
- contracts/**
1325
analyze:
26+
needs: check-changes
27+
if: ${{ needs.check-changes.outputs.changes-contracts-files == 'true' }}
1428
runs-on: large_ubuntu_32
1529
steps:
1630
- name: Checkout
@@ -35,3 +49,7 @@ jobs:
3549
uses: github/codeql-action/upload-sarif@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
3650
with:
3751
sarif_file: results.sarif
52+
53+
permissions:
54+
contents: read
55+
checks: write

0 commit comments

Comments
 (0)