diff --git a/.github/workflows/concrete_ml_test.yml b/.github/workflows/concrete_ml_test.yml index 550b30b9a..9203f5e6f 100644 --- a/.github/workflows/concrete_ml_test.yml +++ b/.github/workflows/concrete_ml_test.yml @@ -50,6 +50,7 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: submodules: recursive + - name: Set release version run: echo "__version__ = \"$(date +"%Y.%m.%d")\"" >| frontends/concrete-python/version.txt - name: Expose release version from Python @@ -73,17 +74,17 @@ jobs: run: | set -e rm -rf /build/* - + export PYTHON=${{ format('python{0}', matrix.python-version) }} echo "Using $PYTHON" cd /concrete/frontends/concrete-python make PYTHON=$PYTHON venv source .venv/bin/activate - + cd /concrete/compilers/concrete-compiler/compiler make BUILD_DIR=/build CCACHE=ON DATAFLOW_EXECUTION_ENABLED=ON Python3_EXECUTABLE=$(which python) python-bindings - + echo "Debug: ccache statistics (after the build):" ccache -s @@ -91,7 +92,7 @@ jobs: export COMPILER_BUILD_DIRECTORY="/build" make whl - + deactivate - name: ML Tests @@ -100,22 +101,30 @@ jobs: WHEEL_PATH="frontends/concrete-python/dist" WHEEL_FILENAME=$(ls ${WHEEL_PATH}/*manylinux*.whl | xargs basename) - # Checkout the concrete-ml repository on branch main - git clone --branch main https://github.com/zama-ai/concrete-ml.git + # Copy the generated wheel to the concrete-ml directory + mkdir -p concrete-ml/wheels + cp ${WHEEL_PATH}/${WHEEL_FILENAME} concrete-ml/wheels/ + + # Copy the test script + mkdir -p concrete-ml/ci/scripts + cp ci/scripts/test_cml.sh concrete-ml/ # Make test script executable - chmod +x ci/scripts/test_cml.sh + chmod +x concrete-ml/test_cml.sh # Build the docker image with specific tag cd concrete-ml - make docker_build DEV_DOCKER_PYTHON=py38 + DOCKER_BUILDKIT=1 docker build \ + --pull \ + -t concrete-ml-dev:py38 \ + -f docker/Dockerfile.dev . # Run the tests docker run --rm \ -v "$(pwd):/src/" \ -w /src/concrete-ml \ concrete-ml-dev:py38 \ - /bin/bash -l -i -c "./ci/scripts/test_cml.sh --use-wheel \"/src/${WHEEL_PATH#$(pwd)/}/${WHEEL_FILENAME}\" --verbose" + /bin/bash -l -i -c "./test_cml.sh --use-wheel \"/src/wheels/${WHEEL_FILENAME}\" --verbose" - name: Slack Notification if: ${{ failure() && github.ref == 'refs/heads/main' }} @@ -146,5 +155,4 @@ jobs: uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 env: SLACK_COLOR: ${{ job.status }} - SLACK_MESSAGE: "Instance teardown finished with status: ${{ job.status }}. (${{ env.ACTION_RUN_URL }})" - + SLACK_MESSAGE: "Instance teardown finished with status: ${{ job.status }}. (${{ env.ACTION_RUN_URL }})" \ No newline at end of file