Skip to content

Commit

Permalink
wip: parallelize docs generation
Browse files Browse the repository at this point in the history
  • Loading branch information
coriolinus committed Dec 19, 2024
1 parent f513fa1 commit 0a411ae
Showing 1 changed file with 52 additions and 8 deletions.
60 changes: 52 additions & 8 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
name: Publish docs
name: Documentation

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"

on:
push:
branches:
- main

env:
CARGO_INCREMENTAL: 0
Expand All @@ -17,8 +15,24 @@ env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

jobs:
docgen:
if: github.repository == 'wireapp/core-crypto'
rustdoc:
name: Rust
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: actions-rust-lang/setup-rust-toolchain@v1 # this implicitly caches Rust tools and build artifacts
with:
rustflags: ''

- name: Build Rust documentation
run: cargo doc --all --no-deps


tsdoc:
name: Typescript
runs-on: ubuntu-latest

steps:
Expand All @@ -40,9 +54,6 @@ jobs:
with:
tool: wasm-pack

- name: Build Rust documentation
run: cargo doc --all --no-deps

- name: Setup bun
uses: oven-sh/setup-bun@v2
with:
Expand All @@ -52,8 +63,41 @@ jobs:
run: |
cd crypto-ffi
cargo make docs-ts
ktdoc:
name: Kotlin
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: actions-rust-lang/setup-rust-toolchain@v1 # this implicitly caches Rust tools and build artifacts
with:
rustflags: ''
target: |
x86_64-unknown-linux-gnu
- name: Setup cargo-make
uses: davidB/rust-cargo-make@v1

- name: Build TypeScript and Kotlin docs
run: |
cd crypto-ffi
cargo make docs-kotlin
deploy:
name: Deploy Documentation
runs-on: ubuntu-latest
if: github.repository == 'wireapp/core-crypto' && github.ref_name == 'main'
needs:
- rustdoc
- tsdoc
- ktdoc

steps:
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v4
with:
Expand Down

0 comments on commit 0a411ae

Please sign in to comment.