mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
123 lines
4.3 KiB
YAML
123 lines
4.3 KiB
YAML
# This job is the main jobs will dispatch build and test for every modules of our mono repo.
|
|
name: Main
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
|
|
jobs:
|
|
# This jobs outputs for each modules of our mono-repo if it changed,
|
|
# in order to launch jobs only for the changed modules
|
|
file-change:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
pull-requests: write
|
|
outputs:
|
|
concrete-python: ${{ steps.concrete-python.outputs.any_changed }}
|
|
compiler: ${{ steps.compiler.outputs.any_changed }}
|
|
optimizer: ${{ steps.optimizer.outputs.any_changed }}
|
|
concrete-cpu: ${{ steps.concrete-cpu.outputs.any_changed }}
|
|
concrete-cuda: ${{ steps.concrete-cuda.outputs.any_changed }}
|
|
test-all: ${{ steps.test-all.outputs.test-all }}
|
|
steps:
|
|
- name: Checkout the repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
token: ${{ secrets.CONCRETE_ACTIONS_TOKEN }}
|
|
|
|
- name: Get changed files in the concrete-python directory
|
|
id: concrete-python
|
|
uses: tj-actions/changed-files@7a453ffa2eb31a7e84f3281f88ef6d774c4d807d
|
|
with:
|
|
files: frontends/concrete-python
|
|
|
|
- name: Get changed files in the concrete-compiler directory
|
|
id: compiler
|
|
uses: tj-actions/changed-files@7a453ffa2eb31a7e84f3281f88ef6d774c4d807d
|
|
with:
|
|
files: compilers/concrete-compiler
|
|
|
|
- name: Get changed files in the concrete-optimizer directory
|
|
id: optimizer
|
|
uses: tj-actions/changed-files@7a453ffa2eb31a7e84f3281f88ef6d774c4d807d
|
|
with:
|
|
files: compilers/concrete-optimizer
|
|
|
|
- name: Get changed files in the concrete-cpu directory
|
|
id: concrete-cpu
|
|
uses: tj-actions/changed-files@7a453ffa2eb31a7e84f3281f88ef6d774c4d807d
|
|
with:
|
|
files: backends/concrete-cpu
|
|
|
|
- name: Get changed files in the concrete-cuda directory
|
|
id: concrete-cpu
|
|
uses: tj-actions/changed-files@7a453ffa2eb31a7e84f3281f88ef6d774c4d807d
|
|
with:
|
|
files: backends/concrete-cuda
|
|
|
|
- name: Set the test-all
|
|
id: test-all
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
run: echo "test-all=true" >> "$GITHUB_OUTPUT"
|
|
|
|
#################################################
|
|
# concrete-python jobs ##########################
|
|
concrete-python:
|
|
needs: file-change
|
|
if: needs.file-change.outputs.concrete-python == 'true' || needs.file-change.outputs.test-all
|
|
uses: ./.github/workflows/concrete_python_build_and_test.yml
|
|
secrets: inherit
|
|
|
|
#################################################
|
|
# Compiler jobs #################################
|
|
compiler-compliance:
|
|
needs: file-change
|
|
if: needs.file-change.outputs.compiler == 'true'
|
|
uses: ./.github/workflows/compiler_format_and_linting.yml
|
|
|
|
compiler-aws-tests:
|
|
needs: file-change
|
|
if: needs.file-change.outputs.compiler == 'true' || needs.file-change.outputs.test-all
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Launch compiler test on AWS using Slab
|
|
uses: mshick/add-pr-comment@v2
|
|
with:
|
|
allow-repeats: true
|
|
message: |
|
|
@slab-ci compiler-cpu-build
|
|
@slab-ci compiler-gpu-build
|
|
|
|
compiler-macos-tests:
|
|
needs: file-change
|
|
if: needs.file-change.outputs.compiler == 'true'
|
|
uses: ./.github/workflows/compiler_macos_build_and_test.yml
|
|
secrets: inherit
|
|
|
|
#################################################
|
|
# Optimizer jobs ################################
|
|
optimizer:
|
|
needs: file-change
|
|
if: needs.file-change.outputs.optimizer == 'true' || needs.file-change.outputs.test-all
|
|
uses: ./.github/workflows/optimizer.yml
|
|
secrets: inherit
|
|
|
|
#################################################
|
|
# ConcreteCPU jobs ##############################
|
|
concrete-cpu:
|
|
needs: file-change
|
|
if: needs.file-change.outputs.concrete-cpu == 'true' || needs.file-change.outputs.test-all
|
|
uses: ./.github/workflows/concrete_cpu_test.yml
|
|
secrets: inherit
|
|
|
|
#################################################
|
|
# Concrete-cuda jobs ############################
|
|
concrete-cuda:
|
|
needs: file-change
|
|
if: needs.file-change.outputs.concrete-cuda == 'true' || needs.file-change.outputs.test-all
|
|
uses: ./.github/workflows/concrete_cuda_test.yml
|
|
secrets: inherit
|