-
Notifications
You must be signed in to change notification settings - Fork 32
84 lines (70 loc) · 2.85 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
name: docs
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-18.04
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
- 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
mkdir build
cd build
cmake ..
make -j4
- name: Install Python dependencies
run: |
pip install numpy pandas sklearn numproto grpcio grpcio-tools requests
pip install -r doc/requirements.txt
- name: Install Secure XGBoost Python package
run: |
# Install the Python package
cd python-package
python setup.py install
- name: Build docs
run: |
cd doc
make html
- name: Commit documentation changes
run: |
git clone https://github.com/mc2-project/secure-xgboost.git --branch gh-pages --single-branch gh-pages
cp -r doc/_build/html/* gh-pages/
cd gh-pages
touch .nojekyll
git config --local user.email "action@github.com"
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: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}