forked from occlum/occlum
-
Notifications
You must be signed in to change notification settings - Fork 1
107 lines (84 loc) · 3.55 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Essential Test
on:
push:
pull_request:
schedule:
# Schedule to run everyday at 6PM UTC (2AM CST)
- cron: '0 18 * * *'
# Cancel previous running jobs on push or pull request
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.event.pull_request.number }}
cancel-in-progress: true
jobs:
Make_test_on_ubuntu:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
with:
submodules: true
- 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=${{ github.job }} -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu20.04
shell: bash
- uses: ./.github/workflows/composite_action/prebuild
with:
container-name: ${{ github.job }}
- name: Build dependencies
run: docker exec ${{ github.job }} bash -c "cd /root/occlum; make submodule"
shell: bash
- name: Make install
run: docker exec ${{ github.job }} bash -c "source /opt/intel/sgxsdk/environment; cd /root/occlum; OCCLUM_RELEASE_BUILD=1 make install"
shell: bash
# - uses: ./.github/workflows/composite_action/sim
# with:
# container-name: ${{ github.job }}
# build-envs: 'OCCLUM_RELEASE_BUILD=1'
- name: Check format
run: docker exec ${{ github.job }} bash -c 'cd /root/occlum; info=$(make format-check);
if [[ -n $info ]]; then
echo "Format error detected.";
echo "$info";
exit 1;
fi'
- name: Integration test
run: docker exec ${{ github.job }} bash -c "cd /root/occlum; OCCLUM_LOG_LEVEL=trace SGX_MODE=SIM make test"
- name: Integration test with Glibc
run: docker exec ${{ github.job }} bash -c "cd /root/occlum; OCCLUM_LOG_LEVEL=trace SGX_MODE=SIM make test-glibc"
- name: Show failed cases
if: ${{ failure() }}
run: docker exec ${{ github.job }} bash -c "cat /root/occlum/build/test/.fail"
- name: Integration test with optional Occlum features
run: |
docker exec ${{ github.job }} bash -c 'source /opt/intel/sgxsdk/environment; cd /root/occlum; make clean && LIBOS_FEATURES="kernel_heap_monitor" make install'
docker exec ${{ github.job }} bash -c "cd /root/occlum; SGX_MODE=SIM make test-glibc"
shell: bash
# Make_test_on_centos:
# runs-on: ubuntu-18.04
# steps:
# - uses: actions/checkout@v1
# with:
# submodules: true
# - uses: ./.github/workflows/composite_action/sim
# with:
# container-name: ${{ github.job }}
# build-envs: 'OCCLUM_RELEASE_BUILD=1'
# os: 'centos8.2'
# - name: Check format
# run: docker exec ${{ github.job }} bash -c 'cd /root/occlum; info=$(make format-check);
# if [[ -n $info ]]; then
# echo "Format error detected.";
# echo "$info";
# exit 1;
# fi'
# - name: Integration test
# run: docker exec ${{ github.job }} bash -c "cd /root/occlum; OCCLUM_LOG_LEVEL=trace SGX_MODE=SIM make test"
# - name: Integration test with Glibc
# run: docker exec ${{ github.job }} bash -c "cd /root/occlum; OCCLUM_LOG_LEVEL=trace SGX_MODE=SIM make test-glibc"
# - name: Show failed cases
# if: ${{ failure() }}
# run: docker exec ${{ github.job }} bash -c "cat /root/occlum/build/test/.fail"