From cf5e911a480f7120da480f046417a209e222e101 Mon Sep 17 00:00:00 2001 From: Kun Lai Date: Tue, 26 Mar 2024 13:21:26 +0800 Subject: [PATCH] workflow: migrate Dockerfile from rats-tls to librats (#189) Signed-off-by: Kun Lai --- .../Dockerfile-compilation-testing-anolis8.6 | 43 ------------------- ...Dockerfile-compilation-testing-ubuntu20.04 | 42 ------------------ .../manually_compilation_testing_image.yml | 38 ---------------- 3 files changed, 123 deletions(-) delete mode 100644 .github/workflows/docker/Dockerfile-compilation-testing-anolis8.6 delete mode 100644 .github/workflows/docker/Dockerfile-compilation-testing-ubuntu20.04 delete mode 100644 .github/workflows/manually_compilation_testing_image.yml diff --git a/.github/workflows/docker/Dockerfile-compilation-testing-anolis8.6 b/.github/workflows/docker/Dockerfile-compilation-testing-anolis8.6 deleted file mode 100644 index 49c697d7..00000000 --- a/.github/workflows/docker/Dockerfile-compilation-testing-anolis8.6 +++ /dev/null @@ -1,43 +0,0 @@ -FROM openanolis/anolisos:8.6-x86_64 - -LABEL maintainer="Shirong Hao " - -RUN yum install -y --nogpgcheck epel-release - -RUN dnf clean all && rm -r /var/cache/dnf && \ - dnf --enablerepo=PowerTools install -y git wget \ - make cmake autoconf libtool gcc gcc-c++ \ - openssl-devel libcurl-devel dnf-utils patch \ - libcbor-devel - -WORKDIR /root - -# install rust -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path -ENV PATH /root/.cargo/bin:$PATH - -ENV SGX_SDK_VERSION 2.18 -ENV SGX_SDK_RELEASE_NUMBER 2.18.100.3 - -# install LVI binutils for rats-tls build -RUN wget https://download.01.org/intel-sgx/sgx-linux/$SGX_SDK_VERSION/as.ld.objdump.r4.tar.gz && \ - tar -zxvf as.ld.objdump.r4.tar.gz && cp -rf external/toolset/anolis8.6/* /usr/local/bin/ && \ - rm -rf external && rm -rf as.ld.objdump.r4.tar.gz - -# install SGX -RUN [ ! -f sgx_linux_x64_sdk_$SGX_SDK_RELEASE_NUMBER.bin ] && \ - wget https://download.01.org/intel-sgx/latest/linux-latest/distro/Anolis86/sgx_linux_x64_sdk_$SGX_SDK_RELEASE_NUMBER.bin && \ - chmod +x sgx_linux_x64_sdk_$SGX_SDK_RELEASE_NUMBER.bin && echo -e 'n\n\/opt/intel\n' | ./sgx_linux_x64_sdk_$SGX_SDK_RELEASE_NUMBER.bin && \ - source /opt/intel/sgxsdk/environment && \ - rm -rf sgx_linux_x64_sdk_$SGX_SDK_RELEASE_NUMBER.bin - -RUN [ ! -f sgx_rpm_local_repo.tgz ] && \ - wget https://download.01.org/intel-sgx/latest/linux-latest/distro/Anolis86/sgx_rpm_local_repo.tgz && \ - tar zxvf sgx_rpm_local_repo.tgz && \ - dnf config-manager --add-repo sgx_rpm_local_repo && \ - dnf makecache && rm -rf sgx_rpm_local_repo.tgz - -RUN dnf install --nogpgcheck -y libsgx-headers libsgx-dcap-quote-verify-devel libsgx-dcap-ql-devel - -# install tdx -RUN dnf install --nogpgcheck -y libtdx-attest-devel diff --git a/.github/workflows/docker/Dockerfile-compilation-testing-ubuntu20.04 b/.github/workflows/docker/Dockerfile-compilation-testing-ubuntu20.04 deleted file mode 100644 index 63fa219c..00000000 --- a/.github/workflows/docker/Dockerfile-compilation-testing-ubuntu20.04 +++ /dev/null @@ -1,42 +0,0 @@ -FROM ubuntu:20.04 - -LABEL maintainer="Huiting Hou " - -ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 -ENV DEBIAN_FRONTEND noninteractive - -# install dependencies -RUN apt-get update && apt-get install -y make git vim clang-format-9 gcc \ - pkg-config protobuf-compiler debhelper cmake \ - wget net-tools curl file gnupg tree libcurl4-openssl-dev \ - libbinutils libseccomp-dev libssl-dev binutils-dev libprotoc-dev \ - libcbor-dev - -WORKDIR /root - -# install rust -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path -ENV PATH /root/.cargo/bin:$PATH - -ENV SGX_SDK_VERSION 2.18 -ENV SGX_SDK_RELEASE_NUMBER 2.18.100.3 - -# install LVI binutils for rats-tls build -RUN wget https://download.01.org/intel-sgx/sgx-linux/$SGX_SDK_VERSION/as.ld.objdump.r4.tar.gz && \ - tar -zxvf as.ld.objdump.r4.tar.gz && cp -rf external/toolset/ubuntu20.04/* /usr/local/bin/ && \ - rm -rf external && rm -rf as.ld.objdump.r4.tar.gz - -# install Intel SGX SDK and DCAP -RUN [ ! -f sgx_linux_x64_sdk_$SGX_SDK_RELEASE_NUMBER.bin ] && \ - wget https://download.01.org/intel-sgx/sgx-linux/$SGX_SDK_VERSION/distro/ubuntu20.04-server/sgx_linux_x64_sdk_$SGX_SDK_RELEASE_NUMBER.bin && \ - chmod +x sgx_linux_x64_sdk_$SGX_SDK_RELEASE_NUMBER.bin && echo -e 'no\n/opt/intel\n' | ./sgx_linux_x64_sdk_$SGX_SDK_RELEASE_NUMBER.bin && \ - rm -f sgx_linux_x64_sdk_$SGX_SDK_RELEASE_NUMBER.bin - -RUN echo "deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main" | tee /etc/apt/sources.list.d/intel-sgx.list && wget -qO - https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | apt-key add - - -RUN echo "deb http://cz.archive.ubuntu.com/ubuntu bionic main" >> /etc/apt/sources.list && apt-get update && apt-get install -y libprotobuf10 - -RUN apt-get update -y && apt-get install -y libsgx-dcap-quote-verify libsgx-dcap-quote-verify-dev libsgx-dcap-ql-dev libsgx-uae-service - -# install tdx -RUN apt-get install -y libtdx-attest-dev diff --git a/.github/workflows/manually_compilation_testing_image.yml b/.github/workflows/manually_compilation_testing_image.yml deleted file mode 100644 index 40fbf905..00000000 --- a/.github/workflows/manually_compilation_testing_image.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Build compilation testing image - -# This is a manual trigger. -on: [workflow_dispatch] - -jobs: - build-compilation-testing-image: - # Run all steps in the compilation testing containers - strategy: - matrix: - os: [anolis8.6, ubuntu20.04] - - runs-on: ubuntu-20.04 - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - # Because "Build and push" step `context` field can't be subdir, - # we need to copy files needed by dockerfile to root dir of the project - - name: Copy context for docker build - run: | - cp -r .github/workflows/docker . - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.TEST_DOCKER_USERNAME }} - password: ${{ secrets.TEST_DOCKER_PASSWORD }} - - - name: Build and push the image - uses: docker/build-push-action@v2 - with: - context: . - file: ./docker/Dockerfile-compilation-testing-${{ matrix.os }} - platforms: linux/amd64 - push: true - tags: runetest/compilation-testing:${{ matrix.os }}