-
Notifications
You must be signed in to change notification settings - Fork 13
55 lines (45 loc) · 1.74 KB
/
pr_basic_compilation_check.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
name: Basic Compilation Check
on: [push, pull_request]
jobs:
basic_complication_check:
# Run all steps in the compilation testing containers
strategy:
matrix:
tag: [anolis8.6, ubuntu20.04]
build_mode: [host, occlum, sgx, tdx, wasm]
container: runetest/compilation-testing:${{ matrix.tag }}
# Use GitHub-hosted runner Ubuntu 20.04
runs-on: ubuntu-20.04
defaults:
run:
shell: bash
working-directory: ${{ github.workspace }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- if: ${{ matrix.build_mode == 'wasm' }}
name: Run pre_build.sh (for wasm mode only)
run:
if [[ ${{ matrix.tag }} == ubuntu* ]]; then apt-get update && apt-get install -y python3 ; else dnf makecache && dnf install -y which python3 lbzip2 file ; fi && bash wasm/emscripten/pre_build.sh
env:
HOME: /root
- name: Compile "librats" ${{ matrix.build_mode }} mode
run:
if [[ ${{ matrix.build_mode }} == 'wasm' ]]; then
export PS1=1 && source /root/.bashrc && cmake -DRATS_BUILD_MODE="${{ matrix.build_mode }}" -H. -Bbuild && make -C build all;
else
export PS1=1 && source /root/.bashrc && cmake -DRATS_BUILD_MODE="${{ matrix.build_mode }}" -DBUILD_SAMPLES=on -H. -Bbuild && make -C build all && make -C build install;
fi
env:
HOME: /root
- name: Run "librats" ${{ matrix.build_mode }} mode
if: ${{ matrix.build_mode == 'host'}}
run: |
/usr/share/librats/samples/cert-app
env:
HOME: /root
- name: Clean for ${{ matrix.build_mode }} mode
run: |
make -C build clean
env:
HOME: /root