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

Commit 321fbe0

Browse files
committed
ci: adapt paths filtering
1 parent e4663ab commit 321fbe0

14 files changed

+233
-144
lines changed

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

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,35 @@
1-
name: Rust tests
1+
name: Coprocessor Cargo 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
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: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
1-
name: Dependency analysis
1+
name: Coprocessor 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
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

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Docker - Fhevm DB migration
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
release:
9+
types:
10+
- published
11+
12+
concurrency:
13+
group: fhevm-db-migration-${{ github.ref_name }}
14+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
15+
16+
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
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/**
34+
docker-fhevm-db-migration:
35+
needs: check-changes
36+
if: ${{ needs.check-changes.outputs.changes-db-migration-files == 'true' || github.event_name == 'release' }}
37+
uses: zama-ai/ci-templates/.github/workflows/docker_common.yml@44333c96991d6747e0bef6a3308bfd98b20390f8 # main
38+
secrets:
39+
GHCR_ACTION_TOKEN: ${{ secrets.BLOCKCHAIN_ACTIONS_TOKEN }}
40+
GRAVITON_BUILDER_SSH_PRIVATE_KEY: ${{ secrets.GRAVITON_BUILDER_SSH_PRIVATE_KEY }}
41+
permissions:
42+
contents: "read"
43+
id-token: "write"
44+
packages: "write"
45+
with:
46+
working-directory: "."
47+
push_image: true
48+
image-name: "fhevm-backend/db-migration"
49+
generate-dev-image: false
50+
docker-file: "fhevm-engine/fhevm-db/Dockerfile"
51+
arm-build: true
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Docker - Fhevm Coprocessor
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
release:
9+
types:
10+
- published
11+
12+
concurrency:
13+
group: fhevm-coprocessor-${{ github.ref_name }}
14+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
15+
16+
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
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/**
35+
docker-fhevm-coprocessor:
36+
needs: check-changes
37+
if: ${{ needs.check-changes.outputs.changes-coprocessor-files == 'true' || github.event_name == 'release' }}
38+
uses: zama-ai/ci-templates/.github/workflows/docker_common.yml@44333c96991d6747e0bef6a3308bfd98b20390f8 # main
39+
secrets:
40+
GHCR_ACTION_TOKEN: ${{ secrets.BLOCKCHAIN_ACTIONS_TOKEN }}
41+
GRAVITON_BUILDER_SSH_PRIVATE_KEY: ${{ secrets.GRAVITON_BUILDER_SSH_PRIVATE_KEY }}
42+
permissions:
43+
contents: "read"
44+
id-token: "write"
45+
packages: "write"
46+
with:
47+
working-directory: "."
48+
push_image: true
49+
image-name: "fhevm-backend/coprocessor"
50+
generate-dev-image: false
51+
docker-file: "fhevm-engine/coprocessor/Dockerfile"
52+
arm-build: true

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

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Compile and test fhevm-backend on a single L40 GPU, on hyperstack
2-
name: GPU backend tests (L40)
2+
name: Coprocessor GPU backend tests (L40)
33

44
env:
55
CARGO_TERM_COLOR: always
@@ -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-coprocessor.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/docker-db-migration.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

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

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
name: "Docker - fhevm Host Contracts"
1+
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
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 }}

0 commit comments

Comments
 (0)