mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 03:55:04 -05:00
feat(ci): check compiler compiles
This commit is contained in:
79
.github/workflows/compiler.yml
vendored
Normal file
79
.github/workflows/compiler.yml
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
name: Continuous integration - compiler
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
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/master' }}
|
||||
steps:
|
||||
- name: Code checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Detect changes on API to compiler
|
||||
uses: tj-actions/changed-files@v19
|
||||
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.5.2
|
||||
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/.dependencies/concrete-optimizer
|
||||
|
||||
- name: Install rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: Download cargo cache
|
||||
uses: Swatinem/rust-cache@v1
|
||||
|
||||
- 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
|
||||
@@ -8,13 +8,13 @@ on:
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
jobs:
|
||||
all:
|
||||
check-concrete-optimizer:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
RUSTFLAGS: -D warnings
|
||||
steps:
|
||||
- name: Code checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Rust install
|
||||
uses: actions-rs/toolchain@v1
|
||||
@@ -25,7 +25,8 @@ jobs:
|
||||
uses: Swatinem/rust-cache@v1
|
||||
|
||||
# A SSH private key is required as some dependencies are from private repos
|
||||
- uses: webfactory/ssh-agent@v0.5.2
|
||||
- name: Set ssh keys
|
||||
uses: webfactory/ssh-agent@v0.5.2
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.CONCRETE_COMPILER_CI_SSH_PRIVATE }}
|
||||
|
||||
Reference in New Issue
Block a user