Skip to content

QUBO and PUBO format output #838

QUBO and PUBO format output

QUBO and PUBO format output #838

Workflow file for this run

name: Documents
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
protobuf:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1
with:
github_token: ${{ github.token }}
- name: Generate API docs
run: buf generate --template buf.gen.docs.yaml
working-directory: proto
- name: Upload HTML
uses: actions/upload-artifact@v4
with:
name: doc-protobuf
path: ./doc
retention-days: 30
rust:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Check warnings in documents
uses: actions-rs/cargo@v1
with:
command: doc
args: --no-deps
env:
RUSTDOCFLAGS: -D warnings
- name: Upload HTML
uses: actions/upload-artifact@v4
with:
name: doc-rust
path: ./target/doc
retention-days: 30
python:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install dependencies
run: |
pip install "python/ommx[dev]"
pip install "python/ommx-python-mip-adapter[dev]"
- name: Build Python documentation
run: |
sphinx-build -b html ./python/ommx/docs/source ./python/ommx/docs/build
- name: Upload HTML
uses: actions/upload-artifact@v4
with:
name: doc-python-ommx
path: ./python/ommx/docs/build
retention-days: 30
- name: Build Python documentation
run: |
sphinx-build -b html ./python/ommx-python-mip-adapter/docs/source ./python/ommx-python-mip-adapter/docs/build
- name: Upload HTML
uses: actions/upload-artifact@v4
with:
name: doc-python-ommx-python-mip-adapter
path: ./python/ommx-python-mip-adapter/docs/build
retention-days: 30
package:
needs: [protobuf, rust, python]
runs-on: ubuntu-latest
steps:
- name: Download HTML of protobuf
uses: actions/download-artifact@v4
with:
name: doc-protobuf
path: ./doc
- name: Download HTML of rust
uses: actions/download-artifact@v4
with:
name: doc-rust
path: ./doc/rust
- name: Download HTML of python
uses: actions/download-artifact@v4
with:
name: doc-python-ommx
path: ./doc/python/ommx
- name: Download HTML of python
uses: actions/download-artifact@v4
with:
name: doc-python-ommx-python-mip-adapter
path: ./doc/python/ommx-python-mip-adapter
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: doc
path: doc
retention-days: 30
deploy:
if: github.ref == 'refs/heads/main'
needs: package
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Download HTML
uses: actions/download-artifact@v4
with:
name: doc
path: .
- name: Configure GitHub Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "."
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4