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

ci: adapt paths filtering #586

Merged
merged 1 commit into from
May 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,20 +1,35 @@
name: Rust tests
name: Coprocessor Cargo tests

on:
pull_request:
paths:
- .github/workflows/cargo-tests.yml
- fhevm-engine/**
- proto/**

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
check-changes:
permissions:
actions: 'read'
contents: 'read'
pull-requests: 'read'
runs-on: ubuntu-latest
outputs:
changes-rust-files: ${{ steps.filter.outputs.rust-files }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
rust-files:
- .github/workflows/coprocessor-cargo-tests.yml
- fhevm-engine/**
- proto/**
cargo-tests:
needs: check-changes
if: ${{ needs.check-changes.outputs.changes-rust-files == 'true' }}
runs-on: large_ubuntu_16

steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
name: Dependency analysis
name: Coprocessor Dependency analysis

on:
pull_request:
paths-ignore:
- "deployments/**"
- "hardhat/**"

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

jobs:
check-changes:
permissions:
actions: 'read'
contents: 'read'
pull-requests: 'read'
runs-on: ubuntu-latest
outputs:
changes-rust-files: ${{ steps.filter.outputs.rust-files }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
rust-files:
- .github/workflows/coprocessor-dependency-analysis.yml
- fhevm-engine/**
dependencies-check:
needs: check-changes
if: ${{ needs.check-changes.outputs.changes-rust-files == 'true' }}
runs-on: ubuntu-latest
steps:

Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/coprocessor-docker-build-db-migration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Docker - Fhevm DB migration

on:
pull_request:
push:
branches:
- main
release:
types:
- published

concurrency:
group: fhevm-db-migration-${{ github.ref_name }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
check-changes:
permissions:
actions: 'read'
contents: 'read'
pull-requests: 'read'
runs-on: ubuntu-latest
outputs:
changes-db-migration-files: ${{ steps.filter.outputs.db-migration-files }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
db-migration-files:
- .github/workflows/coprocessor-docker-build-db-migration.yml
- fhevm-engine/fhevm-db/**
docker-fhevm-db-migration:
needs: check-changes
if: ${{ needs.check-changes.outputs.changes-db-migration-files == 'true' || github.event_name == 'release' }}
uses: zama-ai/ci-templates/.github/workflows/docker_common.yml@44333c96991d6747e0bef6a3308bfd98b20390f8 # main
secrets:
GHCR_ACTION_TOKEN: ${{ secrets.BLOCKCHAIN_ACTIONS_TOKEN }}
GRAVITON_BUILDER_SSH_PRIVATE_KEY: ${{ secrets.GRAVITON_BUILDER_SSH_PRIVATE_KEY }}
permissions:
contents: "read"
id-token: "write"
packages: "write"
with:
working-directory: "."
push_image: true
image-name: "fhevm-backend/db-migration"
generate-dev-image: false
docker-file: "fhevm-engine/fhevm-db/Dockerfile"
arm-build: true
52 changes: 52 additions & 0 deletions .github/workflows/coprocessor-docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Docker - Fhevm Coprocessor

on:
pull_request:
push:
branches:
- main
release:
types:
- published

concurrency:
group: fhevm-coprocessor-${{ github.ref_name }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
check-changes:
permissions:
actions: 'read'
contents: 'read'
pull-requests: 'read'
runs-on: ubuntu-latest
outputs:
changes-coprocessor-files: ${{ steps.filter.outputs.coprocessor-files }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
coprocessor-files:
- .github/workflows/coprocessor-docker-build.yml
- fhevm-engine/**
- proto/**
docker-fhevm-coprocessor:
needs: check-changes
if: ${{ needs.check-changes.outputs.changes-coprocessor-files == 'true' || github.event_name == 'release' }}
uses: zama-ai/ci-templates/.github/workflows/docker_common.yml@44333c96991d6747e0bef6a3308bfd98b20390f8 # main
secrets:
GHCR_ACTION_TOKEN: ${{ secrets.BLOCKCHAIN_ACTIONS_TOKEN }}
GRAVITON_BUILDER_SSH_PRIVATE_KEY: ${{ secrets.GRAVITON_BUILDER_SSH_PRIVATE_KEY }}
permissions:
contents: "read"
id-token: "write"
packages: "write"
with:
working-directory: "."
push_image: true
image-name: "fhevm-backend/coprocessor"
generate-dev-image: false
docker-file: "fhevm-engine/coprocessor/Dockerfile"
arm-build: true
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Compile and test fhevm-backend on a single L40 GPU, on hyperstack
name: GPU backend tests (L40)
name: Coprocessor GPU backend tests (L40)

env:
CARGO_TERM_COLOR: always
Expand All @@ -15,37 +15,9 @@ on:
# Allows you to run this workflow manually from the Actions tab as an alternative.
workflow_dispatch:
pull_request:
paths:
- fhevm-engine/Cargo.toml
- fhevm-engine/coprocessor/Cargo.toml
- fhevm-engine/coprocessor/build.rs
- fhevm-engine/coprocessor/src/**
- fhevm-engine/executor/Cargo.toml
- fhevm-engine/executor/build.rs
- fhevm-engine/executor/src/**
- fhevm-engine/scheduler/src/**
- fhevm-engine/scheduler/Cargo.toml
- fhevm-engine/scheduler/build.rs
- proto/**
- '.github/workflows/gpu-tests.yml'
- ci/slab.toml
push:
branches:
- main
paths:
- fhevm-engine/Cargo.toml
- fhevm-engine/coprocessor/Cargo.toml
- fhevm-engine/coprocessor/build.rs
- fhevm-engine/coprocessor/src/**
- fhevm-engine/executor/Cargo.toml
- fhevm-engine/executor/build.rs
- fhevm-engine/executor/src/**
- fhevm-engine/scheduler/src/**
- fhevm-engine/scheduler/Cargo.toml
- fhevm-engine/scheduler/build.rs
- proto/**
- '.github/workflows/gpu-tests.yml'
- ci/slab.toml

jobs:
should-run:
Expand Down Expand Up @@ -78,7 +50,7 @@ jobs:
- fhevm-engine/scheduler/Cargo.toml
- fhevm-engine/scheduler/build.rs
- proto/**
- '.github/workflows/gpu-tests.yml'
- '.github/workflows/coprocessor_gpu-tests.yml'
- ci/slab.toml

setup-instance:
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/docker-coprocessor.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/docker-db-migration.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
name: "Docker - fhevm Host Contracts"
name: Docker - Fhevm Host Contracts

on:
pull_request:
paths:
- .github/workflows/docker-contracts.yml
- contracts/**
push:
branches:
- main
paths:
- .github/workflows/docker-contracts.yml
- contracts/**
release:
types:
- published
Expand All @@ -20,7 +14,26 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
check-changes:
permissions:
actions: 'read'
contents: 'read'
pull-requests: 'read'
runs-on: ubuntu-latest
outputs:
changes-contracts-files: ${{ steps.filter.outputs.contracts-files }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
contracts-files:
- .github/workflows/host-contracts-docker-build.yml
- contracts/**
docker-fhevm-contracts:
needs: check-changes
if: ${{ needs.check-changes.outputs.changes-contracts-files == 'true' || github.event_name == 'release' }}
uses: zama-ai/ci-templates/.github/workflows/docker_common.yml@44333c96991d6747e0bef6a3308bfd98b20390f8 # main
secrets:
GHCR_ACTION_TOKEN: ${{ secrets.BLOCKCHAIN_ACTIONS_TOKEN }}
Expand Down
Loading
Loading