From ea46bd70bb50997f357f74fdd872b81530f9162a Mon Sep 17 00:00:00 2001 From: Quentin Bourgerie Date: Mon, 6 Mar 2023 17:41:35 +0100 Subject: [PATCH] chore: Fix compiler CI --- .github/workflows/build_on_pr_push.yml | 4 ++-- ...pu.yml => compiler_build_and_test_cpu.yml} | 10 +-------- ...pu.yml => compiler_build_and_test_gpu.yml} | 9 +++----- ci/slab.toml | 22 ++++++++++--------- .../concrete-compiler/compiler/CMakeLists.txt | 3 +-- 5 files changed, 19 insertions(+), 29 deletions(-) rename .github/workflows/{aws_build_cpu.yml => compiler_build_and_test_cpu.yml} (96%) rename .github/workflows/{aws_build_gpu.yml => compiler_build_and_test_gpu.yml} (91%) diff --git a/.github/workflows/build_on_pr_push.yml b/.github/workflows/build_on_pr_push.yml index a8c5b398a..55ff19983 100644 --- a/.github/workflows/build_on_pr_push.yml +++ b/.github/workflows/build_on_pr_push.yml @@ -14,5 +14,5 @@ jobs: with: allow-repeats: true message: | - @slab-ci cpu-build - @slab-ci gpu-build + @slab-ci compiler-cpu-build + @slab-ci compiler-gpu-build diff --git a/.github/workflows/aws_build_cpu.yml b/.github/workflows/compiler_build_and_test_cpu.yml similarity index 96% rename from .github/workflows/aws_build_cpu.yml rename to .github/workflows/compiler_build_and_test_cpu.yml index 9b09e082c..38ed468b5 100644 --- a/.github/workflows/aws_build_cpu.yml +++ b/.github/workflows/compiler_build_and_test_cpu.yml @@ -1,5 +1,4 @@ -# Build on an AWS instance (CPU). -name: AwsEc2BuildCpu +name: Compiler Build and Test (CPU) on: workflow_dispatch: @@ -51,7 +50,6 @@ jobs: ssh-private-key: ${{ secrets.CONCRETE_CI_SSH_PRIVATE }} - name: Set up env - # "Install rust" step require root user to have a HOME directory which is not set. run: | echo "HOME=/home/ubuntu" >> "${GITHUB_ENV}" #echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK)" >> "${GITHUB_ENV}" @@ -63,12 +61,6 @@ jobs: submodules: recursive token: ${{ secrets.CONCRETE_ACTIONS_TOKEN }} - - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - name: Create build dir run: mkdir build diff --git a/.github/workflows/aws_build_gpu.yml b/.github/workflows/compiler_build_and_test_gpu.yml similarity index 91% rename from .github/workflows/aws_build_gpu.yml rename to .github/workflows/compiler_build_and_test_gpu.yml index 657897b4d..9453db43e 100644 --- a/.github/workflows/aws_build_gpu.yml +++ b/.github/workflows/compiler_build_and_test_gpu.yml @@ -1,5 +1,4 @@ -# Build on an AWS instance (GPU). -name: AwsEc2BuildGpu +name: Compiler Build and Test (GPU) on: workflow_dispatch: @@ -55,7 +54,6 @@ jobs: # "Install rust" step require root user to have a HOME directory which is not set. 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: Fetch repository @@ -82,8 +80,7 @@ jobs: username: ${{ secrets.GHCR_LOGIN }} password: ${{ secrets.GHCR_PASSWORD }} options: >- - -v ${{ github.workspace }}/llvm-project:/llvm-project - -v ${{ github.workspace }}/compiler:/compiler + -v ${{ github.workspace }}:/concrete -v ${{ github.workspace }}/build:/build -v ${{ github.workspace }}/wheels:/wheels -v ${{ env.SSH_AUTH_SOCK }}:/ssh.socket @@ -92,7 +89,7 @@ jobs: shell: bash run: | set -e - cd /compiler + cd /concrete/compilers/concrete-compiler/compiler rm -rf /build/* mkdir -p /tmp/concrete_compiler/gpu_tests/ make BINDINGS_PYTHON_ENABLED=OFF CCACHE=ON Python3_EXECUTABLE=$PYTHON_EXEC CUDA_SUPPORT=ON CUDA_PATH=${{ env.CUDA_PATH }} run-end-to-end-tests-gpu diff --git a/ci/slab.toml b/ci/slab.toml index 5addcbeb4..07b1e5a32 100644 --- a/ci/slab.toml +++ b/ci/slab.toml @@ -8,7 +8,7 @@ security_group= ["sg-0bf1c1d79c97bc88f", ] [profile.m6i-old] region = "eu-west-3" image_id = "ami-05e4c0e628378ad6d" # Based on Ubuntu 20.4 -instance_type = "m6i.metal" +instance_type = "m6i.16xlarge" subnet_id = "subnet-a886b4c1" security_group= ["sg-0bf1c1d79c97bc88f", ] @@ -19,17 +19,19 @@ instance_type = "p3.2xlarge" subnet_id = "subnet-8123c9e7" security_group= ["sg-0f8b52622a2669491", ] -# Trigger CPU build -[command.cpu-build] -workflow = "aws_build_cpu.yml" -profile = "m6i-old" -check_run_name = "AWS CPU build (Slab)" +################################################# +# Compiler commands +################################################# -# Trigger GPU build -[command.gpu-build] -workflow = "aws_build_gpu.yml" +[command.compiler-cpu-build] +workflow = "compiler_build_and_test_cpu.yml" +profile = "m6i-old" +check_run_name = "Compiler Build and Test (CPU)" + +[command.compiler-gpu-build] +workflow = "compiler_build_and_test_gpu.yml" profile = "gpu" -check_run_name = "AWS GPU build (Slab)" +check_run_name = "Compiler Build and Test (GPU)" # Trigger Docker images build [command.docker-images-build] diff --git a/compilers/concrete-compiler/compiler/CMakeLists.txt b/compilers/concrete-compiler/compiler/CMakeLists.txt index a93cea61f..b88d1b990 100644 --- a/compilers/concrete-compiler/compiler/CMakeLists.txt +++ b/compilers/concrete-compiler/compiler/CMakeLists.txt @@ -73,8 +73,7 @@ ExternalProject_Add( concrete_optimizer_rust DOWNLOAD_COMMAND "" CONFIGURE_COMMAND "" OUTPUT "${CONCRETE_OPTIMIZER_STATIC_LIB}" - BUILD_COMMAND cargo build - COMMAND cargo build -p concrete-optimizer-cpp --profile release + BUILD_COMMAND cargo build -p concrete-optimizer-cpp --profile release BINARY_DIR "${CONCRETE_OPTIMIZER_DIR}" INSTALL_COMMAND "" LOG_BUILD ON