Refine CI actions to reuse old image

This commit is contained in:
Hui, Chunyang 2024-01-23 10:56:34 +00:00 committed by volcano
parent 49cc99418e
commit ded96d761d
4 changed files with 164 additions and 57 deletions

@ -5,7 +5,6 @@ name: Build Image for CI (Manual Trigger)
# GVisor syscall test also compiles slow. It needs its own image. The images # GVisor syscall test also compiles slow. It needs its own image. The images
# are stored in "occlumbackup/occlum" dockerhub repo. # are stored in "occlumbackup/occlum" dockerhub repo.
# This is a manual trigger. # This is a manual trigger.
on: on:
workflow_dispatch: workflow_dispatch:
@ -14,11 +13,9 @@ on:
description: 'image name (must choose from <grpc, gvisor_test, openvino, python, tf_serving>)' description: 'image name (must choose from <grpc, gvisor_test, openvino, python, tf_serving>)'
required: true required: true
default: 'grpc' default: 'grpc'
tag: reuse_image:
description: 'image tag' description: 'admin can choose to reuse an old image as the new CI image. set reuse image name, e.g.:0.30.0, 0.30.1-rc'
required: true required: false
default: 'latest'
jobs: jobs:
Build_grpc_image: Build_grpc_image:
@ -57,7 +54,9 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
# Rebuild the image
- name: Build and push - name: Build and push
if: "${{ github.event.inputs.reuse_image == '' }}"
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . context: .
@ -67,7 +66,15 @@ jobs:
"OCCLUM_VERSION=${{ env.OCCLUM_VERSION }}" "OCCLUM_VERSION=${{ env.OCCLUM_VERSION }}"
"OCCLUM_BRANCH=${{ env.OCCLUM_BRANCH }}" "OCCLUM_BRANCH=${{ env.OCCLUM_BRANCH }}"
push: true push: true
tags: occlumbackup/occlum:${{ github.event.inputs.tag }}-ubuntu20.04-grpc tags: occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-grpc
# Reuse the old image
- name: Reuse the old image
if: "${{ github.event.inputs.reuse_image != '' }}"
run: |
docker pull occlumbackup/occlum:${{ github.event.inputs.reuse_image }}-ubuntu20.04-grpc
docker tag occlumbackup/occlum:${{ github.event.inputs.reuse_image }}-ubuntu20.04-grpc occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-grpc
docker push occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-grpc
Build_gvisor_test_image: Build_gvisor_test_image:
@ -100,7 +107,9 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
# Rebuild the image
- name: Build and push - name: Build and push
if: "${{ github.event.inputs.reuse_image == '' }}"
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . context: .
@ -110,7 +119,15 @@ jobs:
"OCCLUM_VERSION=${{ env.OCCLUM_VERSION }}" "OCCLUM_VERSION=${{ env.OCCLUM_VERSION }}"
"OCCLUM_BRANCH=${{ env.OCCLUM_BRANCH }}" "OCCLUM_BRANCH=${{ env.OCCLUM_BRANCH }}"
push: true push: true
tags: occlumbackup/occlum:${{ github.event.inputs.tag }}-ubuntu20.04-gvisor_test tags: occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-gvisor_test
# Reuse the old image
- name: Reuse the old image
if: "${{ github.event.inputs.reuse_image != '' }}"
run: |
docker pull occlumbackup/occlum:${{ github.event.inputs.reuse_image }}-ubuntu20.04-gvisor_test
docker tag occlumbackup/occlum:${{ github.event.inputs.reuse_image }}-ubuntu20.04-gvisor_test occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-gvisor_test
docker push occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-gvisor_test
Build_openvino_image: Build_openvino_image:
@ -148,7 +165,9 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
# Rebuild the image
- name: Build and push - name: Build and push
if: "${{ github.event.inputs.reuse_image == '' }}"
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . context: .
@ -158,7 +177,15 @@ jobs:
"OCCLUM_VERSION=${{ env.OCCLUM_VERSION }}" "OCCLUM_VERSION=${{ env.OCCLUM_VERSION }}"
"OCCLUM_BRANCH=${{ env.OCCLUM_BRANCH }}" "OCCLUM_BRANCH=${{ env.OCCLUM_BRANCH }}"
push: true push: true
tags: occlumbackup/occlum:${{ github.event.inputs.tag }}-ubuntu20.04-openvino tags: occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-openvino
# Reuse the old image
- name: Reuse the old image
if: "${{ github.event.inputs.reuse_image != '' }}"
run: |
docker pull occlumbackup/occlum:${{ github.event.inputs.reuse_image }}-ubuntu20.04-openvino
docker tag occlumbackup/occlum:${{ github.event.inputs.reuse_image }}-ubuntu20.04-openvino occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-openvino
docker push occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-openvino
Build_python_image: Build_python_image:
@ -196,7 +223,9 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
# Rebuild the image
- name: Build and push - name: Build and push
if: "${{ github.event.inputs.reuse_image == '' }}"
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . context: .
@ -206,7 +235,15 @@ jobs:
"OCCLUM_VERSION=${{ env.OCCLUM_VERSION }}" "OCCLUM_VERSION=${{ env.OCCLUM_VERSION }}"
"OCCLUM_BRANCH=${{ env.OCCLUM_BRANCH }}" "OCCLUM_BRANCH=${{ env.OCCLUM_BRANCH }}"
push: true push: true
tags: occlumbackup/occlum:${{ github.event.inputs.tag }}-ubuntu20.04-python tags: occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-python
# Reuse the old image
- name: Reuse the old image
if: "${{ github.event.inputs.reuse_image != '' }}"
run: |
docker pull occlumbackup/occlum:${{ github.event.inputs.reuse_image }}-ubuntu20.04-python
docker tag occlumbackup/occlum:${{ github.event.inputs.reuse_image }}-ubuntu20.04-python occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-python
docker push occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-python
# TODO: Add actions to build tf_serving_base image. # TODO: Add actions to build tf_serving_base image.
@ -255,7 +292,9 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
# Rebuild the image
- name: Build and push - name: Build and push
if: "${{ github.event.inputs.reuse_image == '' }}"
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . context: .
@ -265,4 +304,12 @@ jobs:
"OCCLUM_VERSION=${{ env.OCCLUM_VERSION }}" "OCCLUM_VERSION=${{ env.OCCLUM_VERSION }}"
"OCCLUM_BRANCH=${{ env.OCCLUM_BRANCH }}" "OCCLUM_BRANCH=${{ env.OCCLUM_BRANCH }}"
push: true push: true
tags: occlumbackup/occlum:${{ github.event.inputs.tag }}-ubuntu20.04-tf_serving tags: occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-tf_serving
# Reuse the old image
- name: Reuse the old image
if: "${{ github.event.inputs.reuse_image != '' }}"
run: |
docker pull occlumbackup/occlum:${{ github.event.inputs.reuse_image }}-ubuntu20.04-tf_serving
docker tag occlumbackup/occlum:${{ github.event.inputs.reuse_image }}-ubuntu20.04-tf_serving occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-tf_serving
docker push occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-tf_serving

@ -12,6 +12,12 @@ on:
description: 'Whether it is a release image or test image (must choose from <Y/N/T>)' description: 'Whether it is a release image or test image (must choose from <Y/N/T>)'
required: true required: true
default: 'N' default: 'N'
# If rc image works well, directly tag with the release version
# source image: "reuse_image" specified here
# target iamge: Get from the current source code
reuse_image:
description: 'Set reuse image name, e.g.: 0.30.0-rc (When release is set to <Y>, admin can choose to reuse an old rc image as the new release image)'
required: false
jobs: jobs:
generate-anolis-image: generate-anolis-image:
@ -38,16 +44,6 @@ jobs:
# ${GITHUB_REF##*/} == branch-name # ${GITHUB_REF##*/} == branch-name
run: echo "OCCLUM_BRANCH=$(echo ${GITHUB_REF##*/})" >> $GITHUB_ENV; run: echo "OCCLUM_BRANCH=$(echo ${GITHUB_REF##*/})" >> $GITHUB_ENV;
- name: Get image tag name for release image
if: github.event.inputs.release == 'Y'
run: echo "IMAGE_TAG=${{ env.RELEASE_VERSION }}" >> $GITHUB_ENV
- name: Get image tage name for dev image
if: github.event.inputs.release == 'N'
run: echo "IMAGE_TAG=latest-dev-${GITHUB_SHA:0:7}" >> $GITHUB_ENV
- name: Get image tage name for test image
if: github.event.inputs.release == 'T'
run: echo "IMAGE_TAG=${{ env.RELEASE_VERSION }}-test" >> $GITHUB_ENV
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v1 uses: docker/setup-qemu-action@v1
@ -62,7 +58,19 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get image tag name for release image
if: github.event.inputs.release == 'Y'
run: echo "IMAGE_TAG=${{ env.RELEASE_VERSION }}" >> $GITHUB_ENV
- name: Get image tage name for dev image
if: github.event.inputs.release == 'N'
run: echo "IMAGE_TAG=latest-dev-${GITHUB_SHA:0:7}" >> $GITHUB_ENV
- name: Get image tage name for test image
if: github.event.inputs.release == 'T'
run: echo "IMAGE_TAG=${{ env.RELEASE_VERSION }}-test" >> $GITHUB_ENV
# Rebuild new image
- name: Build and push - name: Build and push
if: "${{ github.event.inputs.reuse_image == '' }}"
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . context: .
@ -72,6 +80,16 @@ jobs:
push: true push: true
tags: occlum/occlum:${{ env.IMAGE_TAG }}-anolis8.8 tags: occlum/occlum:${{ env.IMAGE_TAG }}-anolis8.8
# Reuse old image
- name: Reuse old image
if: "${{ github.event.inputs.reuse_image != '' }}"
run: |
echo "REUSE_VERSION=${{ github.event.inputs.reuse_image }}" >> $GITHUB_ENV;
docker pull occlum/occlum:${{ env.REUSE_VERSION }}-anolis8.8
docker tag occlum/occlum:${{ env.REUSE_VERSION }}-anolis8.8 occlum/occlum:${{ env.IMAGE_TAG }}-anolis8.8
docker push occlum/occlum:${{ env.IMAGE_TAG }}-anolis8.8
generate-ubuntu20-image: generate-ubuntu20-image:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: github.event.inputs.OS == 'ubuntu20' if: github.event.inputs.OS == 'ubuntu20'
@ -95,16 +113,6 @@ jobs:
# ${GITHUB_REF##*/} == branch-name # ${GITHUB_REF##*/} == branch-name
run: echo "OCCLUM_BRANCH=$(echo ${GITHUB_REF##*/})" >> $GITHUB_ENV; run: echo "OCCLUM_BRANCH=$(echo ${GITHUB_REF##*/})" >> $GITHUB_ENV;
- name: Get image tag name for release image
if: github.event.inputs.release == 'Y'
run: echo "IMAGE_TAG=${{ env.RELEASE_VERSION }}" >> $GITHUB_ENV
- name: Get image tage name for dev image
if: github.event.inputs.release == 'N'
run: echo "IMAGE_TAG=latest-dev-${GITHUB_SHA:0:7}" >> $GITHUB_ENV
- name: Get image tage name for test image
if: github.event.inputs.release == 'T'
run: echo "IMAGE_TAG=${{ env.RELEASE_VERSION }}-test" >> $GITHUB_ENV
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v1 uses: docker/setup-qemu-action@v1
@ -119,7 +127,19 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get image tag name for release image
if: github.event.inputs.release == 'Y'
run: echo "IMAGE_TAG=${{ env.RELEASE_VERSION }}" >> $GITHUB_ENV
- name: Get image tage name for dev image
if: github.event.inputs.release == 'N'
run: echo "IMAGE_TAG=latest-dev-${GITHUB_SHA:0:7}" >> $GITHUB_ENV
- name: Get image tage name for test image
if: github.event.inputs.release == 'T'
run: echo "IMAGE_TAG=${{ env.RELEASE_VERSION }}-test" >> $GITHUB_ENV
# Rebuild new image
- name: Build and push - name: Build and push
if: "${{ github.event.inputs.reuse_image == '' }}"
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . context: .
@ -128,3 +148,12 @@ jobs:
build-args: OCCLUM_BRANCH=${{ env.OCCLUM_BRANCH }} build-args: OCCLUM_BRANCH=${{ env.OCCLUM_BRANCH }}
push: true push: true
tags: occlum/occlum:${{ env.IMAGE_TAG }}-ubuntu20.04 tags: occlum/occlum:${{ env.IMAGE_TAG }}-ubuntu20.04
# Reuse old image
- name: Reuse old image
if: "${{ github.event.inputs.reuse_image != '' }}"
run: |
echo "REUSE_VERSION=${{ github.event.inputs.reuse_image }}" >> $GITHUB_ENV;
docker pull occlum/occlum:${{ env.REUSE_VERSION }}-ubuntu20.04
docker tag occlum/occlum:${{ env.REUSE_VERSION }}-ubuntu20.04 occlum/occlum:${{ env.IMAGE_TAG }}-ubuntu20.04
docker push occlum/occlum:${{ env.IMAGE_TAG }}-ubuntu20.04

@ -473,8 +473,11 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
- name: Create container - name: Create container
run: docker run -itd --name=${{ github.job }} -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:latest-ubuntu20.04-grpc run: docker run -itd --name=${{ github.job }} -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-grpc
- uses: ./.github/workflows/composite_action/prebuild - uses: ./.github/workflows/composite_action/prebuild
with: with:
@ -514,8 +517,11 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
- name: Create container - name: Create container
run: docker run -itd --name=${{ github.job }} -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:latest-ubuntu20.04-grpc run: docker run -itd --name=${{ github.job }} -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-grpc
- uses: ./.github/workflows/composite_action/prebuild - uses: ./.github/workflows/composite_action/prebuild
with: with:
@ -600,8 +606,11 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
- name: Create container - name: Create container
run: docker run -itd --name=${{ github.job }} -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:latest-ubuntu20.04-openvino run: docker run -itd --name=${{ github.job }} -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-openvino
- uses: ./.github/workflows/composite_action/prebuild - uses: ./.github/workflows/composite_action/prebuild
with: with:
@ -633,8 +642,12 @@ jobs:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
with: with:
submodules: true submodules: true
- name: Get occlum version
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
- name: Create container - name: Create container
run: docker run -itd --name=${{ github.job }} -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:latest-ubuntu20.04-python run: docker run -itd --name=${{ github.job }} -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-python
- uses: ./.github/workflows/composite_action/prebuild - uses: ./.github/workflows/composite_action/prebuild
with: with:
@ -1019,10 +1032,13 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
- name: Create container - name: Create container
run: | run: |
docker pull occlumbackup/occlum:latest-ubuntu20.04-gvisor_test docker pull occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-gvisor_test
gvisor_test=$(docker run -itd -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:latest-ubuntu20.04-gvisor_test); gvisor_test=$(docker run -itd -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-gvisor_test);
echo "gvisor_test=$gvisor_test" >> $GITHUB_ENV echo "gvisor_test=$gvisor_test" >> $GITHUB_ENV
- uses: ./.github/workflows/composite_action/prebuild - uses: ./.github/workflows/composite_action/prebuild

@ -441,16 +441,19 @@ jobs:
ref: refs/pull/${{ github.event.pull_request.number }}/merge ref: refs/pull/${{ github.event.pull_request.number }}/merge
submodules: true submodules: true
- name: Get occlum version
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
- name: Create container - name: Create container
run: | run: |
docker pull occlumbackup/occlum:latest-ubuntu20.04-python docker pull occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-python
if [[ "${{ matrix.self_runner[1] }}" == "SGX1-HW" ]]; then if [[ "${{ matrix.self_runner[1] }}" == "SGX1-HW" ]]; then
python_musl_support_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --net host --device /dev/isgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:latest-ubuntu20.04-python); python_musl_support_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --net host --device /dev/isgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-python);
elif [[ "${{ matrix.self_runner[1] }}" == "SGX2-HW" ]]; then elif [[ "${{ matrix.self_runner[1] }}" == "SGX2-HW" ]]; then
if [[ "${{ matrix.self_runner[2] }}" == "EDMM" ]]; then if [[ "${{ matrix.self_runner[2] }}" == "EDMM" ]]; then
python_musl_support_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --env ENABLE_EDMM=Y --net host -v /dev/sgx:/dev/sgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:latest-ubuntu20.04-python); python_musl_support_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --env ENABLE_EDMM=Y --net host -v /dev/sgx:/dev/sgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-python);
else else
python_musl_support_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --net host -v /dev/sgx:/dev/sgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:latest-ubuntu20.04-python); python_musl_support_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --net host -v /dev/sgx:/dev/sgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-python);
fi fi
else else
echo "Unsupported Hardware" echo "Unsupported Hardware"
@ -516,16 +519,19 @@ jobs:
ref: refs/pull/${{ github.event.pull_request.number }}/merge ref: refs/pull/${{ github.event.pull_request.number }}/merge
submodules: true submodules: true
- name: Get occlum version
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
- name: Create container - name: Create container
run: | run: |
docker pull occlumbackup/occlum:latest-ubuntu20.04-openvino docker pull occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-openvino
if [[ "${{ matrix.self_runner[1] }}" == "SGX1-HW" ]]; then if [[ "${{ matrix.self_runner[1] }}" == "SGX1-HW" ]]; then
openvino_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --net host --device /dev/isgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:latest-ubuntu20.04-openvino); openvino_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --net host --device /dev/isgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-openvino);
elif [[ "${{ matrix.self_runner[1] }}" == "SGX2-HW" ]]; then elif [[ "${{ matrix.self_runner[1] }}" == "SGX2-HW" ]]; then
if [[ "${{ matrix.self_runner[2] }}" == "EDMM" ]]; then if [[ "${{ matrix.self_runner[2] }}" == "EDMM" ]]; then
openvino_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --env ENABLE_EDMM=Y --net host -v /dev/sgx:/dev/sgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:latest-ubuntu20.04-openvino); openvino_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --env ENABLE_EDMM=Y --net host -v /dev/sgx:/dev/sgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-openvino);
else else
openvino_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --net host -v /dev/sgx:/dev/sgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:latest-ubuntu20.04-openvino); openvino_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --net host -v /dev/sgx:/dev/sgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-openvino);
fi fi
else else
echo "Unsupported Hardware" echo "Unsupported Hardware"
@ -588,16 +594,19 @@ jobs:
ref: refs/pull/${{ github.event.pull_request.number }}/merge ref: refs/pull/${{ github.event.pull_request.number }}/merge
submodules: true submodules: true
- name: Get occlum version
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
- name: Create container - name: Create container
run: | run: |
docker pull occlumbackup/occlum:latest-ubuntu20.04-grpc docker pull occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-grpc
if [[ "${{ matrix.self_runner[1] }}" == "SGX1-HW" ]]; then if [[ "${{ matrix.self_runner[1] }}" == "SGX1-HW" ]]; then
grpc_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --net host --device /dev/isgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:latest-ubuntu20.04-grpc); grpc_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --net host --device /dev/isgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-grpc);
elif [[ "${{ matrix.self_runner[1] }}" == "SGX2-HW" ]]; then elif [[ "${{ matrix.self_runner[1] }}" == "SGX2-HW" ]]; then
if [[ "${{ matrix.self_runner[2] }}" == "EDMM" ]]; then if [[ "${{ matrix.self_runner[2] }}" == "EDMM" ]]; then
grpc_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --env ENABLE_EDMM=Y --net host -v /dev/sgx:/dev/sgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:latest-ubuntu20.04-grpc); grpc_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --env ENABLE_EDMM=Y --net host -v /dev/sgx:/dev/sgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-grpc);
else else
grpc_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --net host -v /dev/sgx:/dev/sgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:latest-ubuntu20.04-grpc); grpc_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --net host -v /dev/sgx:/dev/sgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-grpc);
fi fi
else else
echo "Unsupported Hardware" echo "Unsupported Hardware"
@ -682,16 +691,19 @@ jobs:
ref: refs/pull/${{ github.event.pull_request.number }}/merge ref: refs/pull/${{ github.event.pull_request.number }}/merge
submodules: true submodules: true
- name: Get occlum version
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
- name: Create container - name: Create container
run: | run: |
docker pull occlumbackup/occlum:latest-ubuntu20.04-gvisor_test docker pull occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-gvisor_test
if [[ "${{ matrix.self_runner[1] }}" == "SGX1-HW" ]]; then if [[ "${{ matrix.self_runner[1] }}" == "SGX1-HW" ]]; then
gvisor_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --net host --device /dev/isgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:latest-ubuntu20.04-gvisor_test); gvisor_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --net host --device /dev/isgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-gvisor_test);
elif [[ "${{ matrix.self_runner[1] }}" == "SGX2-HW" ]]; then elif [[ "${{ matrix.self_runner[1] }}" == "SGX2-HW" ]]; then
if [[ "${{ matrix.self_runner[2] }}" == "EDMM" ]]; then if [[ "${{ matrix.self_runner[2] }}" == "EDMM" ]]; then
gvisor_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --env ENABLE_EDMM=Y --net host -v /dev/sgx:/dev/sgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:latest-ubuntu20.04-gvisor_test); gvisor_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --env ENABLE_EDMM=Y --net host -v /dev/sgx:/dev/sgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-gvisor_test);
else else
gvisor_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --net host -v /dev/sgx:/dev/sgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:latest-ubuntu20.04-gvisor_test); gvisor_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --net host -v /dev/sgx:/dev/sgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-gvisor_test);
fi fi
else else
echo "Unsupported Hardware" echo "Unsupported Hardware"
@ -836,16 +848,19 @@ jobs:
ref: refs/pull/${{ github.event.pull_request.number }}/merge ref: refs/pull/${{ github.event.pull_request.number }}/merge
submodules: true submodules: true
- name: Get occlum version
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
- name: Create container - name: Create container
run: | run: |
docker pull occlumbackup/occlum:latest-ubuntu20.04-tf_serving docker pull occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-tf_serving
if [[ "${{ matrix.self_runner[1] }}" == "SGX1-HW" ]]; then if [[ "${{ matrix.self_runner[1] }}" == "SGX1-HW" ]]; then
tf_serving_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --net host --device /dev/isgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:latest-ubuntu20.04-tf_serving); tf_serving_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --net host --device /dev/isgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-tf_serving);
elif [[ "${{ matrix.self_runner[1] }}" == "SGX2-HW" ]]; then elif [[ "${{ matrix.self_runner[1] }}" == "SGX2-HW" ]]; then
if [[ "${{ matrix.self_runner[2] }}" == "EDMM" ]]; then if [[ "${{ matrix.self_runner[2] }}" == "EDMM" ]]; then
tf_serving_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --env ENABLE_EDMM=Y --net host -v /dev/sgx:/dev/sgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:latest-ubuntu20.04-tf_serving); tf_serving_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --env ENABLE_EDMM=Y --net host -v /dev/sgx:/dev/sgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-tf_serving);
else else
tf_serving_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --net host -v /dev/sgx:/dev/sgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:latest-ubuntu20.04-tf_serving); tf_serving_test=$(docker run -itd --privileged --rm --env CARGO_HTTP_MULTIPLEXING=false --net host -v /dev/sgx:/dev/sgx -v $GITHUB_WORKSPACE:/root/occlum occlumbackup/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04-tf_serving);
fi fi
else else
echo "Unsupported Hardware" echo "Unsupported Hardware"