Merge pull request #9 from quarkslab/fix/linux-static #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Documentation | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
release: | |
types: [created] | |
jobs: | |
doc: | |
runs-on: ubuntu-20.04 | |
container: quay.io/pypa/manylinux2014_x86_64 | |
env: | |
LIEF_VERSION: 0.11.5 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build doc | |
run: | | |
yum install -y doxygen graphviz rsync | |
export PATH=/opt/python/cp39-cp39/bin:$PATH | |
pip install lief==$LIEF_VERSION | |
pip install -r docs/requirements.txt | |
curl -sSL -o LIEF.tar.bz2 https://github.com/lief-project/LIEF/releases/download/$LIEF_VERSION/LIEF-${LIEF_VERSION}-Linux-x86_64-manylinux2014.tar.bz2 | |
tar xf LIEF.tar.bz2 && rm LIEF.tar.bz2 && mv LIEF-* LIEF | |
mkdir build_doc && cd build_doc | |
cmake -DQBDL_BUILD_DOCS=ON -DCMAKE_BUILD_TYPE=Release -DQBDL_PYTHON_BINDING=ON -DLIEF_DIR=$PWD/../LIEF/share/LIEF/cmake .. | |
make doc -j$(nproc) | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: qbdl-doc | |
path: build_doc/docs/qbdl-doc | |
- name: Prepare deployment | |
if: ${{ !github.event.pull_request }} | |
id: doc_name | |
run: | | |
NAME=${GITHUB_REF##*/} | |
echo "::set-output name=directory::$NAME" | |
- name: Deploy to Github Pages | |
if: ${{ !github.event.pull_request }} | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: build_doc/docs/qbdl-doc | |
target-folder: ${{ steps.doc_name.outputs.directory }} |