Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github pages CI #18

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: deploy-rz-bindgen-pages
on:
push:
paths:
- 'src/**.py'
- 'src/**.pyi'
- 'src/**.i'
- 'meson.build'
- 'meson_options.txt'
workflow_dispatch:

jobs:
build:
name: Build rz-bindings reference
runs-on: ubuntu-22.04
steps:
- name: Checkout rizin
uses: actions/checkout@v3
with:
repository: rizinorg/rizin
ref: stable
path: rizin

- name: Install deps
run: |
sudo pip install meson ninja sphinx furo
sudo apt update
sudo apt install libclang-14-dev doxygen

- name: Build rizin
working-directory: rizin
run: |
meson setup build
sudo meson install -C build

- name: Run doxygen
working-directory: rizin
run: |
sed -i -e 's/\(GENERATE_XML.*\)NO/\1YES/' \
-e 's/\(XML_PROGRAMLISTING.*\)YES/NO/' Doxyfile
doxygen

- name: Checkout rz-bindgen
uses: actions/checkout@v3
with:
path: rz-bindgen

- name: Run rz-bindgen
working-directory: rz-bindgen
run: |
meson setup -Dtargets=sphinx \
-Ddoxygen_path="$GITHUB_WORKSPACE/rizin/doc/doxygen/" build
ninja -C build

- name: Configure Pages
uses: actions/configure-pages@v1

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: rz-bindgen/build/sphinx_output

deploy:
name: Deploy to Github Pages
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1