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@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/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