Expand SGX hardware mode CI test trigger type
Expands the trigger type to pull request with specific label.
This commit is contained in:
parent
3b915db774
commit
2d27837123
120
.github/workflows/hw_mode_test.yml
vendored
120
.github/workflows/hw_mode_test.yml
vendored
@ -1,12 +1,17 @@
|
|||||||
name: SGX Hardware Mode Test
|
name: SGX Hardware Mode Test
|
||||||
|
|
||||||
on: [push]
|
# Triggers the workflow on push and pull request labeled "SGX-hardware-test-required".
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request_target:
|
||||||
|
types: labeled
|
||||||
|
|
||||||
env:
|
env:
|
||||||
nap_time: 60
|
nap_time: 60
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Make-test-on-ubuntu:
|
Make-test-on-ubuntu:
|
||||||
|
if: github.event_name == 'push' || ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||||
runs-on: [self-hosted, SGX1-HW]
|
runs-on: [self-hosted, SGX1-HW]
|
||||||
steps:
|
steps:
|
||||||
- name: Clean before running
|
- name: Clean before running
|
||||||
@ -14,10 +19,20 @@ jobs:
|
|||||||
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v1
|
if: github.event_name == 'push'
|
||||||
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
|
- name: Checkout code from fork
|
||||||
|
# This step is only needed when the pull request is labeled.
|
||||||
|
if: ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
# For pull request, we need to merge the commit from fork to the base
|
||||||
|
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||||
|
submodules: true
|
||||||
|
|
||||||
- name: Get Occlum version
|
- name: Get Occlum version
|
||||||
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
|
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
|
||||||
|
|
||||||
@ -51,6 +66,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
C_cpp_rust_golang_embedded_mode_support_test:
|
C_cpp_rust_golang_embedded_mode_support_test:
|
||||||
|
if: github.event_name == 'push' || ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||||
runs-on: [self-hosted, SGX1-HW]
|
runs-on: [self-hosted, SGX1-HW]
|
||||||
steps:
|
steps:
|
||||||
- name: Clean before running
|
- name: Clean before running
|
||||||
@ -58,10 +74,18 @@ jobs:
|
|||||||
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v1
|
if: github.event_name == 'push'
|
||||||
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
|
- name: Checkout code from fork
|
||||||
|
if: ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||||
|
submodules: true
|
||||||
|
|
||||||
- name: Get Occlum version
|
- name: Get Occlum version
|
||||||
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
|
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
|
||||||
|
|
||||||
@ -113,8 +137,10 @@ jobs:
|
|||||||
occlum-go build -o web_server ./web_server.go;
|
occlum-go build -o web_server ./web_server.go;
|
||||||
./run_golang_on_occlum.sh" &
|
./run_golang_on_occlum.sh" &
|
||||||
|
|
||||||
|
# Sleeps longer to make sure the server is up.
|
||||||
- name: Curl test
|
- name: Curl test
|
||||||
run: |
|
run: |
|
||||||
|
sleep ${{ env.nap_time }};
|
||||||
sleep ${{ env.nap_time }};
|
sleep ${{ env.nap_time }};
|
||||||
docker exec $language_support_test bash -c "curl http://127.0.0.1:8090/ping"
|
docker exec $language_support_test bash -c "curl http://127.0.0.1:8090/ping"
|
||||||
|
|
||||||
@ -140,6 +166,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
Java_support_test:
|
Java_support_test:
|
||||||
|
if: github.event_name == 'push' || ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||||
runs-on: [self-hosted, SGX1-HW]
|
runs-on: [self-hosted, SGX1-HW]
|
||||||
steps:
|
steps:
|
||||||
- name: Clean before running
|
- name: Clean before running
|
||||||
@ -147,10 +174,18 @@ jobs:
|
|||||||
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v1
|
if: github.event_name == 'push'
|
||||||
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
|
- name: Checkout code from fork
|
||||||
|
if: ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||||
|
submodules: true
|
||||||
|
|
||||||
- name: Get Occlum version
|
- name: Get Occlum version
|
||||||
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
|
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
|
||||||
|
|
||||||
@ -187,6 +222,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
Bazel_test:
|
Bazel_test:
|
||||||
|
if: github.event_name == 'push' || ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||||
runs-on: [self-hosted, SGX1-HW]
|
runs-on: [self-hosted, SGX1-HW]
|
||||||
steps:
|
steps:
|
||||||
- name: Clean before running
|
- name: Clean before running
|
||||||
@ -194,10 +230,18 @@ jobs:
|
|||||||
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v1
|
if: github.event_name == 'push'
|
||||||
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
|
- name: Checkout code from fork
|
||||||
|
if: ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||||
|
submodules: true
|
||||||
|
|
||||||
- name: Get Occlum version
|
- name: Get Occlum version
|
||||||
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
|
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
|
||||||
|
|
||||||
@ -246,6 +290,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
Fish_test:
|
Fish_test:
|
||||||
|
if: github.event_name == 'push' || ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||||
runs-on: [self-hosted, SGX1-HW]
|
runs-on: [self-hosted, SGX1-HW]
|
||||||
steps:
|
steps:
|
||||||
- name: Clean before running
|
- name: Clean before running
|
||||||
@ -253,10 +298,18 @@ jobs:
|
|||||||
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v1
|
if: github.event_name == 'push'
|
||||||
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
|
- name: Checkout code from fork
|
||||||
|
if: ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||||
|
submodules: true
|
||||||
|
|
||||||
- name: Get Occlum version
|
- name: Get Occlum version
|
||||||
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
|
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
|
||||||
|
|
||||||
@ -302,6 +355,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
Xgboost_test:
|
Xgboost_test:
|
||||||
|
if: github.event_name == 'push' || ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||||
runs-on: [self-hosted, SGX1-HW]
|
runs-on: [self-hosted, SGX1-HW]
|
||||||
steps:
|
steps:
|
||||||
- name: Clean before running
|
- name: Clean before running
|
||||||
@ -309,10 +363,18 @@ jobs:
|
|||||||
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v1
|
if: github.event_name == 'push'
|
||||||
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
|
- name: Checkout code from fork
|
||||||
|
if: ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||||
|
submodules: true
|
||||||
|
|
||||||
- name: Get Occlum version
|
- name: Get Occlum version
|
||||||
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
|
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
|
||||||
|
|
||||||
@ -358,6 +420,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
Sqlite_test:
|
Sqlite_test:
|
||||||
|
if: github.event_name == 'push' || ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||||
runs-on: [self-hosted, SGX1-HW]
|
runs-on: [self-hosted, SGX1-HW]
|
||||||
steps:
|
steps:
|
||||||
- name: Clean before running
|
- name: Clean before running
|
||||||
@ -365,10 +428,18 @@ jobs:
|
|||||||
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v1
|
if: github.event_name == 'push'
|
||||||
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
|
- name: Checkout code from fork
|
||||||
|
if: ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||||
|
submodules: true
|
||||||
|
|
||||||
- name: Get Occlum version
|
- name: Get Occlum version
|
||||||
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
|
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
|
||||||
|
|
||||||
@ -410,6 +481,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
Python_support_test:
|
Python_support_test:
|
||||||
|
if: github.event_name == 'push' || ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||||
runs-on: [self-hosted, SGX1-HW]
|
runs-on: [self-hosted, SGX1-HW]
|
||||||
steps:
|
steps:
|
||||||
- name: Clean before running
|
- name: Clean before running
|
||||||
@ -417,10 +489,18 @@ jobs:
|
|||||||
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v1
|
if: github.event_name == 'push'
|
||||||
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
|
- name: Checkout code from fork
|
||||||
|
if: ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||||
|
submodules: true
|
||||||
|
|
||||||
- name: Create container
|
- name: Create container
|
||||||
run: |
|
run: |
|
||||||
docker pull occlumbackup/occlum:latest-ubuntu18.04-python
|
docker pull occlumbackup/occlum:latest-ubuntu18.04-python
|
||||||
@ -455,6 +535,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
Openvino_test:
|
Openvino_test:
|
||||||
|
if: github.event_name == 'push' || ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||||
runs-on: [self-hosted, SGX1-HW]
|
runs-on: [self-hosted, SGX1-HW]
|
||||||
steps:
|
steps:
|
||||||
- name: Clean before running
|
- name: Clean before running
|
||||||
@ -462,10 +543,18 @@ jobs:
|
|||||||
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v1
|
if: github.event_name == 'push'
|
||||||
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
|
- name: Checkout code from fork
|
||||||
|
if: ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||||
|
submodules: true
|
||||||
|
|
||||||
- name: Create container
|
- name: Create container
|
||||||
run: |
|
run: |
|
||||||
docker pull occlumbackup/occlum:latest-ubuntu18.04-openvino
|
docker pull occlumbackup/occlum:latest-ubuntu18.04-openvino
|
||||||
@ -497,6 +586,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
Grpc_test:
|
Grpc_test:
|
||||||
|
if: github.event_name == 'push' || ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||||
runs-on: [self-hosted, SGX1-HW]
|
runs-on: [self-hosted, SGX1-HW]
|
||||||
steps:
|
steps:
|
||||||
- name: Clean before running
|
- name: Clean before running
|
||||||
@ -504,10 +594,18 @@ jobs:
|
|||||||
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v1
|
if: github.event_name == 'push'
|
||||||
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
|
- name: Checkout code from fork
|
||||||
|
if: ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||||
|
submodules: true
|
||||||
|
|
||||||
- name: Create container
|
- name: Create container
|
||||||
run: |
|
run: |
|
||||||
docker pull occlumbackup/occlum:latest-ubuntu18.04-grpc
|
docker pull occlumbackup/occlum:latest-ubuntu18.04-grpc
|
||||||
|
Loading…
Reference in New Issue
Block a user