mirror of
https://github.com/zama-ai/concrete.git
synced 2026-04-17 03:00:54 -04:00
ci: new unified build system
This commit is contained in:
24
.github/workflows/conformance.yml
vendored
24
.github/workflows/conformance.yml
vendored
@@ -17,25 +17,23 @@ jobs:
|
||||
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
|
||||
submodules: recursive
|
||||
|
||||
- name: Log LLVM commit
|
||||
run: echo "LLVM commit" && cd ${{ github.workspace }}/llvm-project && git log -1
|
||||
|
||||
- name: Build and test compiler
|
||||
uses: addnab/docker-run-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image: ghcr.io/zama-ai/mlir@sha256:5b7adfbf4e28c5a7517ed0b2bb0347455dea86f495b3ba060f6bea70c9dc10d3
|
||||
image: ghcr.io/zama-ai/zamalang-compiler:latest
|
||||
username: ${{ secrets.GHCR_LOGIN }}
|
||||
password: ${{ secrets.GHCR_PASSWORD }}
|
||||
options: -v ${{ github.workspace }}:/workspace -e PYTHONPATH=/llvm-project/build/python:/workspace/compiler/build/python -e LD_LIBRARY_PATH=/workspace/compiler/build/lib/Runtime/
|
||||
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=./build/lib/Runtime/libZamalangRuntime.so make test_python
|
||||
options: -v ${{ github.workspace }}/compiler:/compiler
|
||||
run: |
|
||||
cd /compiler
|
||||
pip install pytest
|
||||
make BUILD_DIR=/build test
|
||||
|
||||
29
.github/workflows/docker-mlir.yml
vendored
29
.github/workflows/docker-mlir.yml
vendored
@@ -1,29 +0,0 @@
|
||||
name: Docker image (MLIR)
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- builders/Dockerfile.mlir-env
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_publish:
|
||||
name: Build & Publish the Docker image
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
IMAGE: ghcr.io/zama-ai/mlir
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: build
|
||||
run: docker build -t $IMAGE -f builders/Dockerfile.mlir-env .
|
||||
|
||||
- name: login
|
||||
run: echo "${{ secrets.GHCR_PASSWORD }}" | docker login -u ${{ secrets.GHCR_LOGIN }} --password-stdin ghcr.io
|
||||
|
||||
- name: tag and publish
|
||||
run: |
|
||||
docker push $IMAGE:latest
|
||||
16
.github/workflows/docker-zamalang.yml
vendored
16
.github/workflows/docker-zamalang.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Docker image (ZamaLang)
|
||||
name: Docker image
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -19,21 +19,23 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: login
|
||||
run: echo "${{ secrets.GHCR_PASSWORD }}" | docker login -u ${{ secrets.GHCR_LOGIN }} --password-stdin ghcr.io
|
||||
|
||||
- name: build
|
||||
run: docker build -t $IMAGE -f builders/Dockerfile.zamalang-env .
|
||||
run: docker image build --no-cache --label "commit-sha=${{ github.sha }}" -t $IMAGE -f builders/Dockerfile.zamalang-env .
|
||||
|
||||
- name: tag and publish
|
||||
run: |
|
||||
docker tag $IMAGE $IMAGE:${{ github.sha }}
|
||||
docker push $IMAGE:latest
|
||||
docker push $IMAGE:${{ github.sha }}
|
||||
docker image tag $IMAGE $IMAGE:${{ github.sha }}
|
||||
docker image push $IMAGE:latest
|
||||
docker image push $IMAGE:${{ github.sha }}
|
||||
|
||||
- name: tag and publish release image
|
||||
if: github.event_name == 'release'
|
||||
run: |
|
||||
docker tag $IMAGE $IMAGE:${{ github.event.release.tag_name }}
|
||||
docker push $IMAGE:${{ github.event.release.tag_name }}
|
||||
docker image tag $IMAGE $IMAGE:${{ github.event.release.tag_name }}
|
||||
docker image push $IMAGE:${{ github.event.release.tag_name }}
|
||||
|
||||
Reference in New Issue
Block a user