diff --git a/.github/workflows/concrete_python_tests_linux.yml b/.github/workflows/concrete_python_tests_linux.yml index b2904ffde..14156f29e 100644 --- a/.github/workflows/concrete_python_tests_linux.yml +++ b/.github/workflows/concrete_python_tests_linux.yml @@ -35,3 +35,77 @@ jobs: echo "AMI: ${{ inputs.instance_image_id }}" echo "Type: ${{ inputs.instance_type }}" echo "Request ID: ${{ inputs.request_id }}" + + - name: Set up SSH agent + uses: webfactory/ssh-agent@v0.7.0 + with: + ssh-private-key: ${{ secrets.CONCRETE_CI_SSH_PRIVATE }} + + - name: Set up GitHub environment + run: | + echo "HOME=/home/ubuntu" >> "${GITHUB_ENV}" + #echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK)" >> "${GITHUB_ENV}" + echo "SSH_AUTH_SOCK_DIR=$(dirname $SSH_AUTH_SOCK)" >> "${GITHUB_ENV}" + + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: recursive + token: ${{ secrets.CONCRETE_ACTIONS_TOKEN }} + + - name: Create build directory + run: mkdir build + + - name: Build bindings + uses: addnab/docker-run-action@v3 + id: build-compiler-bindings + with: + registry: ghcr.io + image: ${{ env.DOCKER_IMAGE_TEST }} + username: ${{ secrets.GHCR_LOGIN }} + password: ${{ secrets.GHCR_PASSWORD }} + options: >- + -v ${{ github.workspace }}:/concrete + -v ${{ github.workspace }}/build:/build + -v ${{ env.SSH_AUTH_SOCK }}:/ssh.socket + -e SSH_AUTH_SOCK=/ssh.socket + ${{ env.DOCKER_GPU_OPTION }} + shell: bash + run: | + set -e + rm -rf /build/* + + cd /concrete/frontends/concrete-python + make venv + source .venv/bin/activate + + cd /concrete/compilers/concrete-compiler/compiler + make BUILD_DIR=/build CCACHE=ON DATAFLOW_EXECUTION_ENABLED=ON Python3_EXECUTABLE=$(which python3) python-bindings + + echo "Debug: ccache statistics (after the build):" + ccache -s + + - name: Test + uses: addnab/docker-run-action@v3 + with: + registry: ghcr.io + image: ${{ env.DOCKER_IMAGE_TEST }} + username: ${{ secrets.GHCR_LOGIN }} + password: ${{ secrets.GHCR_PASSWORD }} + options: >- + -v ${{ github.workspace }}:/concrete + -v ${{ github.workspace }}/build:/build + ${{ env.DOCKER_GPU_OPTION }} + shell: bash + run: | + set -e + + cd /concrete/frontends/concrete-python + make venv + source .venv/bin/activate + + export COMPILER_BUILD_DIRECTORY=/build + export KEY_CACHE_DIRECTORY=/tmp/KeySetCache + make pytest + + chmod -R ugo+rwx /tmp/KeySetCache