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

Deploy docs #13

Merged
merged 2 commits into from
May 26, 2024
Merged
Show file tree
Hide file tree
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
56 changes: 41 additions & 15 deletions .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,37 @@
name: C++

# spell-checker:ignore awalsh,ctest,DCMAKE,pkgs
# spell-checker:ignore awalsh,ctest,DCMAKE,doxyindexer,pkgs

on:
push:
branches: ["main"]
branches: [main]
paths:
- 'bindings/cpp/**'
- 'CMakeLists.txt'
- 'crates/**'
- 'Cargo.*'
- .github/workflows/cpp.yml
- bindings/cpp/**
- CMakeLists.txt
- crates/**
- Cargo.*
pull_request:
branches: ["main"]
branches: [main]
paths:
- 'bindings/cpp/**'
- 'CMakeLists.txt'
- 'crates/**'
- 'Cargo.*'
- .github/workflows/cpp.yml
- bindings/cpp/**
- CMakeLists.txt
- crates/**
- Cargo.*

env:
CARGO_TERM_COLOR: always

jobs:
lint:
name: Lint
name: Lint & Doc

runs-on: ubuntu-24.04

env:
doxygen_version: 1.11.0

permissions:
pull-requests: write

Expand All @@ -36,11 +41,25 @@ jobs:
with:
packages: cbindgen
version: 1.0
- uses: actions/cache@v4
id: cache-doxygen
with:
path: |
~/.local/bin/doxygen
~/.local/bin/doxyindexer
key: doxygen-linux-${{ env.doxygen_version }}
- name: Download doxygen
if: steps.cache-doxygen.outputs.cache-hit != 'true'
run: |
mkdir -p ~/.local
curl https://www.doxygen.nl/files/doxygen-$doxygen_version.linux.bin.tar.gz | tar -xz -C ~/.local --strip-components=1 doxygen-$doxygen_version/bin/{doxygen,doxyindexer}
- name: Add ~/.local/bin to PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: CMake Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
- name: Generate oxidd/capi.h
- name: Build Docs
working-directory: build
run: make oxidd-capi-header
run: make oxidd-doc
- uses: cpp-linter/cpp-linter-action@v2
id: linter
env:
Expand All @@ -52,9 +71,16 @@ jobs:
style: "file" # Use .clang-format config file
tidy-checks: "" # Use .clang-tidy config file
thread-comments: ${{ github.event_name == 'pull_request' && 'update' }}
- name: Fail fast?!
- name: Fail Fast?!
if: steps.linter.outputs.checks-failed > 0
run: exit 1
- name: Deploy Docs
if: ${{ github.ref == 'refs/heads/main' }}
working-directory: build/doc/html
run: zip -r - . | curl -u "$DEPLOY_TOKEN" --basic "$DEPLOY_URL/api/cpp/dev" --upload-file -
env:
DEPLOY_TOKEN: ${{ secrets.WEBSITE_DEPLOY_TOKEN }}
DEPLOY_URL: ${{ secrets.WEBSITE_DEPLOY_URL }}


test-linux:
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ on:
push:
branches: [main]
paths:
- .github/workflows/python.yml
- bindings/python/**
- pyproject.toml
- crates/**
- Cargo.*
pull_request:
branches: [main]
paths:
- .github/workflows/python.yml
- bindings/python/**
- pyproject.toml
- crates/**
Expand Down Expand Up @@ -48,7 +50,14 @@ jobs:
- name: Test
run: pytest
- name: Sphinx
run: sphinx-build -W bindings/python/doc build/python-doc
run: sphinx-build -W bindings/python/doc target/python/doc
- name: Deploy Docs
if: ${{ github.ref == 'refs/heads/main' }}
working-directory: target/python/doc
run: zip -r - . | curl -u "$DEPLOY_TOKEN" --basic "$DEPLOY_URL/api/python/dev" --upload-file -
env:
DEPLOY_TOKEN: ${{ secrets.WEBSITE_DEPLOY_TOKEN }}
DEPLOY_URL: ${{ secrets.WEBSITE_DEPLOY_URL }}

buildwheel-linux:
name: Build wheels for Linux
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ name: Rust

on:
push:
branches: ["main"]
branches: [main]
paths:
- 'crates/**'
- 'Cargo.*'
- .github/workflows/rust.yml
- crates/**
- Cargo.*
pull_request:
branches: ["main"]
branches: [main]
paths:
- 'crates/**'
- 'Cargo.*'
- .github/workflows/rust.yml
- crates/**
- Cargo.*

env:
CARGO_TERM_COLOR: always
Expand Down
Loading