mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 03:55:04 -05:00
80 lines
2.2 KiB
YAML
80 lines
2.2 KiB
YAML
name: Continuous integration - compiler
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, testci ]
|
|
pull_request:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
conditions:
|
|
runs-on: ubuntu-20.04
|
|
outputs:
|
|
proceed: ${{ steps.interface-changes.outputs.any_changed == 'true' || github.ref == 'refs/heads/main' }}
|
|
steps:
|
|
- name: Code checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Detect changes on API to compiler
|
|
uses: tj-actions/changed-files@v34
|
|
id: interface-changes
|
|
with:
|
|
files: |
|
|
concrete-optimizer-cpp/src/cpp/*
|
|
|
|
- run: echo ${{ steps.interface-changes.outputs.any_changed }}
|
|
|
|
check-compiler-compatibility:
|
|
runs-on: ubuntu-20.04
|
|
needs: conditions
|
|
if: ${{ needs.conditions.outputs.proceed == 'true' }}
|
|
steps:
|
|
# A SSH private key is required as some dependencies are from private repos
|
|
- name: Set ssh keys
|
|
uses: webfactory/ssh-agent@v0.6.0
|
|
with:
|
|
ssh-private-key: ${{ secrets.CONCRETE_COMPILER_CI_SSH_PRIVATE }}
|
|
|
|
- name: Compiler checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
repository: zama-ai/concrete-compiler-internal
|
|
ssh-key: ${{ secrets.CONCRETE_COMPILER_CI_SSH_PRIVATE }}
|
|
|
|
- name: Override optimizer for compiler
|
|
uses: actions/checkout@v3
|
|
with:
|
|
path: compiler/concrete-optimizer
|
|
|
|
- name: Install rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
|
|
- name: Download cargo cache
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Concrete-Optimizer
|
|
run: |
|
|
cd compiler
|
|
make concrete-optimizer-lib
|
|
|
|
- name: Build compiler
|
|
uses: addnab/docker-run-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
image: ghcr.io/zama-ai/concrete-compiler
|
|
username: zama-bot
|
|
password: ${{ secrets.ZAMA_BOT_TOKEN }}
|
|
options: >-
|
|
-v ${{ github.workspace }}/compiler:/compiler
|
|
shell: bash
|
|
run: |
|
|
set -e
|
|
cd /compiler
|
|
export PYTHONPATH=""
|
|
make CCACHE=ON BUILD_DIR=/build concretecompiler
|