-
Notifications
You must be signed in to change notification settings - Fork 10
95 lines (78 loc) · 2.74 KB
/
documentation.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
name: Build documentation
on:
schedule:
- cron: '0 0 * * SAT' # every Saturday
workflow_dispatch:
jobs:
update-docs:
runs-on: ubuntu-18.04
steps:
- name: Checkout blog️
uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials
with: # to false in most cases for the deployment to work correctly.
persist-credentials: false
- name: Install OCaml
uses: avsm/setup-ocaml@v1
with:
ocaml-version: 4.09.1
- name: Add the testing Repository
run: opam repo add bap git+https://github.com/BinaryAnalysisPlatform/opam-repository#testing
- name: Pin OASIS
run: opam pin add oasis https://github.com/BinaryAnalysisPlatform/oasis.git
- name: Checkout bap
uses: actions/checkout@v2
with:
repository: BinaryAnalysisPlatform/bap
path: bap.master
- name: Pin BAP
run:
opam pin add bap bap.master --no-action
- name: Install system dependencies
run: opam depext -u bap-extra
- name: Install Ghidra
run: |
sudo add-apt-repository ppa:ivg/ghidra -y
sudo apt-get install libghidra-dev -y
sudo apt-get install libghidra-data -y
- name: Install opam dependencies
run: |
opam install bap --deps-only
opam install omake
- name: Install Bap
run: |
cd bap.master
opam exec -- ./configure-omake \
--with-llvm-version=9 \
--with-llvm-config=llvm-config-9
opam exec -- make
opam exec -- make reinstall
- name: Build Documentation
run: |
ls -l
sudo apt-get install emacs-nox man2html --yes
opam install odig
opam exec -- make -C bap.master clean
opam exec -- make -C bap.master doc
echo BLOG_COMMIT_MESSAGE=$(git -C bap.master rev-parse --short HEAD) >> $GITHUB_ENV
- uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: bapdoc-log
path: bap.master/doc/bapdoc.log
- name: update
run: |
mkdir ready
mv bap.master/doc/man1 ready/
mv bap.master/doc/man3 ready/
mv bap.master/doc/lisp ready/
mv bap.master/doc/primus ready/
cp -rL bap.master/doc/odoc ready/
(cd ready; ln -s odoc master; ln -s man1 man)
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: master
FOLDER: ready
TARGET_FOLDER: bap/api
COMMIT_MESSAGE: ${{ env.BLOG_COMMIT_MESSAGE }}