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
|
||||
|
||||
on: [push]
|
||||
# Triggers the workflow on push and pull request labeled "SGX-hardware-test-required".
|
||||
on:
|
||||
push:
|
||||
pull_request_target:
|
||||
types: labeled
|
||||
|
||||
env:
|
||||
nap_time: 60
|
||||
|
||||
jobs:
|
||||
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]
|
||||
steps:
|
||||
- name: Clean before running
|
||||
@ -14,10 +19,20 @@ jobs:
|
||||
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v1
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
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
|
||||
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:
|
||||
if: github.event_name == 'push' || ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||
runs-on: [self-hosted, SGX1-HW]
|
||||
steps:
|
||||
- name: Clean before running
|
||||
@ -58,10 +74,18 @@ jobs:
|
||||
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v1
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
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
|
||||
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;
|
||||
./run_golang_on_occlum.sh" &
|
||||
|
||||
# Sleeps longer to make sure the server is up.
|
||||
- name: Curl test
|
||||
run: |
|
||||
sleep ${{ env.nap_time }};
|
||||
sleep ${{ env.nap_time }};
|
||||
docker exec $language_support_test bash -c "curl http://127.0.0.1:8090/ping"
|
||||
|
||||
@ -140,6 +166,7 @@ jobs:
|
||||
|
||||
|
||||
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]
|
||||
steps:
|
||||
- name: Clean before running
|
||||
@ -147,10 +174,18 @@ jobs:
|
||||
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v1
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
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
|
||||
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
|
||||
|
||||
@ -187,6 +222,7 @@ jobs:
|
||||
|
||||
|
||||
Bazel_test:
|
||||
if: github.event_name == 'push' || ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||
runs-on: [self-hosted, SGX1-HW]
|
||||
steps:
|
||||
- name: Clean before running
|
||||
@ -194,10 +230,18 @@ jobs:
|
||||
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v1
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
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
|
||||
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
|
||||
|
||||
@ -246,6 +290,7 @@ jobs:
|
||||
|
||||
|
||||
Fish_test:
|
||||
if: github.event_name == 'push' || ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||
runs-on: [self-hosted, SGX1-HW]
|
||||
steps:
|
||||
- name: Clean before running
|
||||
@ -253,10 +298,18 @@ jobs:
|
||||
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v1
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
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
|
||||
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
|
||||
|
||||
@ -302,6 +355,7 @@ jobs:
|
||||
|
||||
|
||||
Xgboost_test:
|
||||
if: github.event_name == 'push' || ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||
runs-on: [self-hosted, SGX1-HW]
|
||||
steps:
|
||||
- name: Clean before running
|
||||
@ -309,10 +363,18 @@ jobs:
|
||||
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v1
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
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
|
||||
run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
|
||||
|
||||
@ -358,6 +420,7 @@ jobs:
|
||||
|
||||
|
||||
Sqlite_test:
|
||||
if: github.event_name == 'push' || ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||
runs-on: [self-hosted, SGX1-HW]
|
||||
steps:
|
||||
- name: Clean before running
|
||||
@ -365,10 +428,18 @@ jobs:
|
||||
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v1
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
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
|
||||
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:
|
||||
if: github.event_name == 'push' || ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||
runs-on: [self-hosted, SGX1-HW]
|
||||
steps:
|
||||
- name: Clean before running
|
||||
@ -417,10 +489,18 @@ jobs:
|
||||
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v1
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
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
|
||||
run: |
|
||||
docker pull occlumbackup/occlum:latest-ubuntu18.04-python
|
||||
@ -455,6 +535,7 @@ jobs:
|
||||
|
||||
|
||||
Openvino_test:
|
||||
if: github.event_name == 'push' || ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||
runs-on: [self-hosted, SGX1-HW]
|
||||
steps:
|
||||
- name: Clean before running
|
||||
@ -462,10 +543,18 @@ jobs:
|
||||
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v1
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
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
|
||||
run: |
|
||||
docker pull occlumbackup/occlum:latest-ubuntu18.04-openvino
|
||||
@ -497,6 +586,7 @@ jobs:
|
||||
|
||||
|
||||
Grpc_test:
|
||||
if: github.event_name == 'push' || ${{ contains(github.event.pull_request.labels.*.name, 'SGX-hardware-test-required') }}
|
||||
runs-on: [self-hosted, SGX1-HW]
|
||||
steps:
|
||||
- name: Clean before running
|
||||
@ -504,10 +594,18 @@ jobs:
|
||||
sudo chown -R ${{ secrets.CI_ADMIN }} "${{ github.workspace }}"
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v1
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
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
|
||||
run: |
|
||||
docker pull occlumbackup/occlum:latest-ubuntu18.04-grpc
|
||||
|
Loading…
Reference in New Issue
Block a user