-
Notifications
You must be signed in to change notification settings - Fork 46
118 lines (99 loc) · 3.73 KB
/
docs.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
108
109
110
111
112
113
114
115
116
117
118
name: docs
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-18.04
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
path: main
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Upgrade Pip
run: python -m pip install --upgrade pip setuptools wheel
- name: Install apt package dependencies
run: |
# Install OpenEnclave 0.17.1
echo 'deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu bionic main' | sudo tee /etc/apt/sources.list.d/intel-sgx.list
wget -qO - https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | sudo apt-key add -
echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main" | sudo tee /etc/apt/sources.list.d/llvm-toolchain-bionic-7.list
wget -qO - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo "deb [arch=amd64] https://packages.microsoft.com/ubuntu/18.04/prod bionic main" | sudo tee /etc/apt/sources.list.d/msprod.list
wget -qO - https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo apt update
sudo apt -y install clang-8 libssl-dev gdb libsgx-enclave-common libsgx-quote-ex libprotobuf10 libsgx-dcap-ql libsgx-dcap-ql-dev az-dcap-client open-enclave=0.17.1
# CMake
wget https://github.com/Kitware/CMake/releases/download/v3.15.6/cmake-3.15.6-Linux-x86_64.sh
# Mbed TLS
sudo apt-get install -y libmbedtls-dev
- name: Build C++
run: |
# Build C++ source
cd main
cd src
mkdir build
cd build
cmake ..
make -j4
cd ../..
- name: Install Python dependencies
run: |
cd main
pip install -r requirements.txt
pip install -r client-docs/requirements.txt
- name: Install mc2client Python package
run: |
# Install the Python package
cd main/python-package
python setup.py install
- name: Checkout sequencefile Python package
uses: actions/checkout@master
with:
path: sequencefile
repository: opaque-systems/sequencefile
- name: Install sequencefile Python package
run: cd sequencefile; python setup.py install
shell: bash
- name: Little hack to make this repo's docs build properly
run: |
cd main/client-docs
mkdir -p _build/tmp
cp ../mc2.py _build/tmp
- name: Build docs
run: |
cd main/client-docs
make html
- name: Clone gh-pages branch
uses: actions/checkout@v2
with:
repository: mc2-project/mc2
ref: gh-pages
path: main/gh-pages
- name: Commit documentation changes
run: |
cp -r main/client-docs/_build/html/* main/gh-pages/
cd main/gh-pages
touch .nojekyll
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "${GITHUB_ACTOR}'s changes in ${GITHUB_SHA} triggered this build" -a || true
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: main/gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Update MC2 website
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.MC2_BOT_PAT }}
repository: mc2-project/mc2-project.github.io
event-type: client-docs-dispatch