Files
concrete/.github/workflows/conformance.yml
2021-08-18 17:38:46 +02:00

42 lines
1.7 KiB
YAML

name: Conformance
on:
push:
branches: [master, test-ci]
pull_request:
types: [opened, synchronize, reopened]
jobs:
Formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Format with clang-format
run: .github/workflows/scripts/format_cpp.sh
BuildAndTest:
runs-on: ubuntu-latest
env:
LLVM_PROJECT: $GITHUB_WORKSPACE/llvm_project
steps:
- uses: actions/checkout@v2
- name: Get the concrete CAPI release
uses: addnab/docker-run-action@v3
with:
registry: ghcr.io
image: ghcr.io/zama-ai/concrete-api-env:latest
username: ${{ secrets.GHCR_LOGIN }}
password: ${{ secrets.GHCR_PASSWORD }}
options: -v ${{ github.workspace }}:/workspace
run: mkdir -p /workspace/concrete/target && cp -r /target/release /workspace/concrete/target
- name: Build and test compiler
uses: addnab/docker-run-action@v3
with:
registry: ghcr.io
image: ghcr.io/zama-ai/mlir@sha256:5b7adfbf4e28c5a7517ed0b2bb0347455dea86f495b3ba060f6bea70c9dc10d3
username: ${{ secrets.GHCR_LOGIN }}
password: ${{ secrets.GHCR_PASSWORD }}
options: -v ${{ github.workspace }}:/workspace -e PYTHONPATH=/llvm-project/build/python:/workspace/compiler/build/python
run: cd /workspace/compiler && mkdir build && cmake -B build . -DCONCRETE_FFI_RELEASE=/workspace/concrete/target/release -DLLVM_DIR=$LLVM_PROJECT/build/lib/cmake/llvm -DMLIR_DIR=$LLVM_PROJECT/build/lib/cmake/mlir && make -C build/ all zamacompiler && make test && pip install pytest && LD_PRELOAD=/workspace/concrete/target/release/libconcrete_ffi.so make test_python