Create composite action for occlum container run and src build/install

This commit is contained in:
Zheng, Qi 2021-11-08 16:22:53 +08:00 committed by Zongmin.Gu
parent 17e86e87d0
commit 821ea843ae
3 changed files with 124 additions and 233 deletions

@ -0,0 +1,37 @@
name: 'Occlum composite action'
description: 'Occlum container run and source build/install'
inputs:
container-name:
description: 'Occlum container name'
required: true
build-envs:
description: 'Occlum build environments'
required: false
default: 'OCCLUM_RELEASE_BUILD=1'
os:
description: 'Occlum docker image base OS'
required: false
default: 'ubuntu18.04'
runs:
using: "composite"
steps:
- name: Print info
run: echo Occlum build environment ${{ inputs.build-envs }}
shell: bash
- name: Get occlum version
run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV
shell: bash
- name: Create container
run: docker run -itd --name=${{ inputs.container-name }} -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-${{ inputs.os }}
shell: bash
- name: Build dependencies
run: docker exec ${{ inputs.container-name }} bash -c "cd /root/occlum; make submodule"
shell: bash
- name: Make install
run: docker exec ${{ inputs.container-name }} bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; ${{ inputs.build-envs}} make install"
shell: bash

@ -15,17 +15,10 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version - uses: ./.github/workflows/composite_action
run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV with:
container-name: 'language_support_test'
- name: Create container build-envs: 'OCCLUM_RELEASE_BUILD=1'
run: docker run -itd --name=language_support_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04
- name: Build dependencies
run: docker exec language_support_test bash -c "cd /root/occlum; make submodule"
- name: Make install
run: docker exec language_support_test bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=1 make install"
- name: C test - name: C test
run: docker exec language_support_test bash -c "cd /root/occlum/demos/hello_c && make; run: docker exec language_support_test bash -c "cd /root/occlum/demos/hello_c && make;
@ -89,18 +82,11 @@ jobs:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
with: with:
submodules: true submodules: true
- name: Get occlum version - uses: ./.github/workflows/composite_action
run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV with:
container-name: 'java_support_test'
- name: Create container build-envs: 'OCCLUM_RELEASE_BUILD=1'
run: docker run -itd --name=java_support_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04
- name: Build dependencies
run: docker exec java_support_test bash -c "cd /root/occlum; make submodule"
- name: Make install
run: docker exec java_support_test bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=1 make install"
- name: Compile Java - name: Compile Java
run: docker exec java_support_test bash -c "cd /root/occlum/demos/java && occlum-javac ./hello_world/Main.java" run: docker exec java_support_test bash -c "cd /root/occlum/demos/java && occlum-javac ./hello_world/Main.java"
@ -121,17 +107,10 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version - uses: ./.github/workflows/composite_action
run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV with:
container-name: 'fish_test'
- name: Create container build-envs: 'OCCLUM_RELEASE_BUILD=1'
run: docker run -itd --name=fish_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04
- name: Build dependencies
run: docker exec fish_test bash -c "cd /root/occlum; make submodule"
- name: Make install
run: docker exec fish_test bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=1 make install"
- name: Build Fish dependencies - name: Build Fish dependencies
run: docker exec fish_test bash -c "cd /root/occlum/demos/fish && ./download_and_build.sh" run: docker exec fish_test bash -c "cd /root/occlum/demos/fish && ./download_and_build.sh"
@ -149,17 +128,10 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version - uses: ./.github/workflows/composite_action
run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV with:
container-name: 'hello_bazel_test'
- name: Create container build-envs: 'OCCLUM_RELEASE_BUILD=1'
run: docker run -itd --name=hello_bazel_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04
- name: Build dependencies
run: docker exec hello_bazel_test bash -c "cd /root/occlum; make submodule"
- name: Make install
run: docker exec hello_bazel_test bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=1 make install"
- name: Install bazel - name: Install bazel
run: docker exec hello_bazel_test bash -c "cd /root/occlum/demos/hello_bazel && wget https://github.com/bazelbuild/bazel/releases/download/3.2.0/bazel-3.2.0-installer-linux-x86_64.sh; run: docker exec hello_bazel_test bash -c "cd /root/occlum/demos/hello_bazel && wget https://github.com/bazelbuild/bazel/releases/download/3.2.0/bazel-3.2.0-installer-linux-x86_64.sh;
@ -183,17 +155,10 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version - uses: ./.github/workflows/composite_action
run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV with:
container-name: 'https_test'
- name: Create container build-envs: 'OCCLUM_RELEASE_BUILD=1'
run: docker run -itd --name=https_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04
- name: Build dependencies
run: docker exec https_test bash -c "cd /root/occlum; make submodule"
- name: Make install
run: docker exec https_test bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=y make install"
- name: Build https server dependencies - name: Build https server dependencies
run: docker exec https_test bash -c "cd /root/occlum/demos/https_server && ./download_and_build_mongoose.sh" run: docker exec https_test bash -c "cd /root/occlum/demos/https_server && ./download_and_build_mongoose.sh"
@ -214,17 +179,10 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version - uses: ./.github/workflows/composite_action
run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV with:
container-name: 'la_test'
- name: Create container build-envs: 'OCCLUM_RELEASE_BUILD=1'
run: docker run -itd --name=la_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04
- name: Build dependencies
run: docker exec la_test bash -c "cd /root/occlum; make submodule"
- name: Make install
run: docker exec la_test bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=1 make install"
- name: Build LA dependencies - name: Build LA dependencies
run: docker exec la_test bash -c "cd /root/occlum/demos/local_attestation && ./download_src_and_build_deps.sh" run: docker exec la_test bash -c "cd /root/occlum/demos/local_attestation && ./download_src_and_build_deps.sh"
@ -241,17 +199,10 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version - uses: ./.github/workflows/composite_action
run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV with:
container-name: 'sqlite_test'
- name: Create container build-envs: 'OCCLUM_RELEASE_BUILD=1'
run: docker run -itd --name=sqlite_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04
- name: Build dependencies
run: docker exec sqlite_test bash -c "cd /root/occlum; make submodule"
- name: Make install
run: docker exec sqlite_test bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=1 make install"
- name: Build sqlite dependencies - name: Build sqlite dependencies
run: docker exec sqlite_test bash -c "cd /root/occlum/demos/sqlite && ./download_and_build_sqlite.sh" run: docker exec sqlite_test bash -c "cd /root/occlum/demos/sqlite && ./download_and_build_sqlite.sh"
@ -267,17 +218,10 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version - uses: ./.github/workflows/composite_action
run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV with:
container-name: 'xgboost_test'
- name: Create container build-envs: 'OCCLUM_RELEASE_BUILD=1'
run: docker run -itd --name=xgboost_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04
- name: Build dependencies
run: docker exec xgboost_test bash -c "cd /root/occlum; make submodule"
- name: Make install
run: docker exec xgboost_test bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=1 make install"
- name: Build xgboost dependencies - name: Build xgboost dependencies
run: docker exec xgboost_test bash -c "cd /root/occlum/demos/xgboost && ./download_and_build_xgboost.sh" run: docker exec xgboost_test bash -c "cd /root/occlum/demos/xgboost && ./download_and_build_xgboost.sh"
@ -296,17 +240,10 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version - uses: ./.github/workflows/composite_action
run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV with:
container-name: 'tflite_test'
- name: Create container build-envs: 'OCCLUM_RELEASE_BUILD=1'
run: docker run -itd --name=tflite_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04
- name: Build dependencies
run: docker exec tflite_test bash -c "cd /root/occlum; make submodule"
- name: Make install
run: docker exec tflite_test bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=y make install"
- name: Build Tensorflow-lite dependencies - name: Build Tensorflow-lite dependencies
run: docker exec tflite_test bash -c "cd /root/occlum/demos/tensorflow_lite && ./download_and_build_tflite.sh" run: docker exec tflite_test bash -c "cd /root/occlum/demos/tensorflow_lite && ./download_and_build_tflite.sh"
@ -325,17 +262,10 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version - uses: ./.github/workflows/composite_action
run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV with:
container-name: 'pytorch_test'
- name: Create container build-envs: 'OCCLUM_RELEASE_BUILD=1'
run: docker run -itd --cpuset-cpus="0" --name=pytorch_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04
- name: Build dependencies
run: docker exec pytorch_test bash -c "cd /root/occlum; make submodule"
- name: Make install
run: docker exec pytorch_test bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=1 make install"
- name: Build python and pytorch - name: Build python and pytorch
run: docker exec pytorch_test bash -c "cd /root/occlum/demos/pytorch; ./install_python_with_conda.sh" run: docker exec pytorch_test bash -c "cd /root/occlum/demos/pytorch; ./install_python_with_conda.sh"
@ -362,17 +292,10 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version - uses: ./.github/workflows/composite_action
run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV with:
container-name: 'tensorflow_test'
- name: Create container build-envs: 'OCCLUM_RELEASE_BUILD=1'
run: docker run -itd --cpuset-cpus="0" --name=tensorflow_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04
- name: Build dependencies
run: docker exec tensorflow_test bash -c "cd /root/occlum; make submodule"
- name: Make install
run: docker exec tensorflow_test bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=1 make install"
- name: Build python and tensorflow - name: Build python and tensorflow
run: docker exec tensorflow_test bash -c "cd /root/occlum/demos/tensorflow/tensorflow_training; ./install_python_with_conda.sh" run: docker exec tensorflow_test bash -c "cd /root/occlum/demos/tensorflow/tensorflow_training; ./install_python_with_conda.sh"
@ -460,17 +383,10 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version - uses: ./.github/workflows/composite_action
run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV with:
container-name: 'python_glibc_support_test'
- name: Create container build-envs: 'OCCLUM_RELEASE_BUILD=1'
run: docker run -itd --cpuset-cpus="0" --name=python_glibc_support_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04
- name: Build dependencies
run: docker exec python_glibc_support_test bash -c "cd /root/occlum; make submodule"
- name: Make install
run: docker exec python_glibc_support_test bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=1 make install"
- name: download conda and build python - name: download conda and build python
run: docker exec python_glibc_support_test bash -c "cd /root/occlum/demos/python/python_glibc; ./install_python_with_conda.sh" run: docker exec python_glibc_support_test bash -c "cd /root/occlum/demos/python/python_glibc; ./install_python_with_conda.sh"
@ -489,17 +405,10 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version - uses: ./.github/workflows/composite_action
run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV with:
container-name: 'redis_support_test'
- name: Create container build-envs: 'OCCLUM_RELEASE_BUILD=1'
run: docker run -itd --name=redis_support_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04
- name: Build dependencies
run: docker exec redis_support_test bash -c "cd /root/occlum; make submodule"
- name: Make install
run: docker exec redis_support_test bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=1 make install"
- name: download and build redis - name: download and build redis
run: docker exec redis_support_test bash -c "cd /root/occlum/demos/redis; ./download_and_build_redis.sh" run: docker exec redis_support_test bash -c "cd /root/occlum/demos/redis; ./download_and_build_redis.sh"
@ -525,17 +434,10 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version - uses: ./.github/workflows/composite_action
run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV with:
container-name: 'flink_test'
- name: Create container build-envs: 'OCCLUM_RELEASE_BUILD=1'
run: docker run -itd --name=flink_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04
- name: Build dependencies
run: docker exec flink_test bash -c "cd /root/occlum; make submodule"
- name: Make install
run: docker exec flink_test bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=y make install"
- name: Download flink - name: Download flink
run: docker exec flink_test bash -c "cd /root/occlum/demos/flink && ./download_flink.sh" run: docker exec flink_test bash -c "cd /root/occlum/demos/flink && ./download_flink.sh"
@ -558,17 +460,10 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version - uses: ./.github/workflows/composite_action
run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV with:
container-name: 'cluster_serving_test'
- name: Create container build-envs: 'OCCLUM_RELEASE_BUILD=1'
run: docker run -itd --name=cluster_serving_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04
- name: Build dependencies
run: docker exec cluster_serving_test bash -c "cd /root/occlum; make submodule"
- name: Make install
run: docker exec cluster_serving_test bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=1 make install"
- name: Set up environment - name: Set up environment
run: docker exec cluster_serving_test bash -c "cd /root/occlum/demos/cluster_serving; source ./environment.sh; ./install-dependencies.sh" run: docker exec cluster_serving_test bash -c "cd /root/occlum/demos/cluster_serving; source ./environment.sh; ./install-dependencies.sh"
@ -583,17 +478,10 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version - uses: ./.github/workflows/composite_action
run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV with:
container-name: 'enclave_ra_tls_test'
- name: Create container build-envs: 'OCCLUM_RELEASE_BUILD=1'
run: docker run -itd --name=enclave_ra_tls_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04
- name: Build dependencies
run: docker exec enclave_ra_tls_test bash -c "cd /root/occlum; make submodule"
- name: Make install
run: docker exec enclave_ra_tls_test bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=y make install"
- name: Download and build Enclave TLS - name: Download and build Enclave TLS
run: docker exec enclave_ra_tls_test bash -c "cd /root/occlum/demos/enclave_tls && ./download_and_build_enclave_tls.sh" run: docker exec enclave_ra_tls_test bash -c "cd /root/occlum/demos/enclave_tls && ./download_and_build_enclave_tls.sh"
@ -614,17 +502,10 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version - uses: ./.github/workflows/composite_action
run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV with:
container-name: 'vault_test'
- name: Create container build-envs: 'OCCLUM_RELEASE_BUILD=1'
run: docker run -itd --name=vault_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04
- name: Build dependencies
run: docker exec vault_test bash -c "cd /root/occlum; make submodule"
- name: Make install
run: docker exec vault_test bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=y make install"
- name: Download and build HashiCorp Vault - name: Download and build HashiCorp Vault
run: docker exec vault_test bash -c "cd /root/occlum/demos/golang/vault && ./prepare_vault.sh" run: docker exec vault_test bash -c "cd /root/occlum/demos/golang/vault && ./prepare_vault.sh"
@ -644,21 +525,14 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version - uses: ./.github/workflows/composite_action
run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV with:
container-name: 'sofaboot_test'
- name: Create container build-envs: 'OCCLUM_RELEASE_BUILD=1'
run: docker run -itd --name=sofaboot_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04
- name: Install Maven - name: Install Maven
run: docker exec sofaboot_test bash -c "apt update && apt install -y maven" run: docker exec sofaboot_test bash -c "apt update && apt install -y maven"
- name: Build dependencies
run: docker exec sofaboot_test bash -c "cd /root/occlum; make submodule"
- name: Make install
run: docker exec sofaboot_test bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=y make install"
- name: Download and compile sofaboot web demos - name: Download and compile sofaboot web demos
run: docker exec sofaboot_test bash -c "cd /root/occlum/demos/sofaboot && ./download_compile_sofaboot.sh" run: docker exec sofaboot_test bash -c "cd /root/occlum/demos/sofaboot && ./download_compile_sofaboot.sh"
@ -677,17 +551,10 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version - uses: ./.github/workflows/composite_action
run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV with:
container-name: 'bash_test'
- name: Create container build-envs: 'OCCLUM_RELEASE_BUILD=1'
run: docker run -itd --name=bash_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04
- name: Build dependencies
run: docker exec bash_test bash -c "cd /root/occlum; make submodule"
- name: Make install
run: docker exec bash_test bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=1 make install"
- name: Run musl-libc Bash test - name: Run musl-libc Bash test
run: docker exec bash_test bash -c "cd /root/occlum/demos/bash && SGX_MODE=SIM ./run_bash_demo.sh musl" run: docker exec bash_test bash -c "cd /root/occlum/demos/bash && SGX_MODE=SIM ./run_bash_demo.sh musl"

@ -15,12 +15,11 @@ jobs:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
with: with:
submodules: true submodules: true
- name: Get occlum version - uses: ./.github/workflows/composite_action
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV; with:
container-name: 'ubuntu-test'
- name: Create container with ubuntu image build-envs: 'OCCLUM_RELEASE_BUILD=1'
run: docker run -itd --name=ubuntu-test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04
- name: Check format - name: Check format
run: docker exec ubuntu-test bash -c 'cd /root/occlum; info=$(make format-check); run: docker exec ubuntu-test bash -c 'cd /root/occlum; info=$(make format-check);
@ -30,12 +29,6 @@ jobs:
exit 1; exit 1;
fi' fi'
- name: Build dependencies
run: docker exec ubuntu-test bash -c "cd /root/occlum; make submodule"
- name: Build source
run: docker exec ubuntu-test bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=y SGX_MODE=SIM make"
- name: Integration test - name: Integration test
run: docker exec ubuntu-test bash -c "cd /root/occlum; OCCLUM_LOG_LEVEL=trace SGX_MODE=SIM make test" run: docker exec ubuntu-test bash -c "cd /root/occlum; OCCLUM_LOG_LEVEL=trace SGX_MODE=SIM make test"
@ -54,11 +47,11 @@ jobs:
with: with:
submodules: true submodules: true
- name: Get occlum version - uses: ./.github/workflows/composite_action
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV; with:
container-name: 'centos-test'
- name: Create container with centos image build-envs: 'OCCLUM_RELEASE_BUILD=1'
run: docker run -itd --name=centos-test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-centos8.2 os: 'centos8.2'
- name: Check format - name: Check format
run: docker exec centos-test bash -c 'cd /root/occlum; info=$(make format-check); run: docker exec centos-test bash -c 'cd /root/occlum; info=$(make format-check);
@ -68,12 +61,6 @@ jobs:
exit 1; exit 1;
fi' fi'
- name: Build dependencies
run: docker exec centos-test bash -c "cd /root/occlum; make submodule"
- name: Build source
run: docker exec centos-test bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=y SGX_MODE=SIM make"
- name: Integration test - name: Integration test
run: docker exec centos-test bash -c "cd /root/occlum; OCCLUM_LOG_LEVEL=trace SGX_MODE=SIM make test" run: docker exec centos-test bash -c "cd /root/occlum; OCCLUM_LOG_LEVEL=trace SGX_MODE=SIM make test"