Skip to content

test(ffi): ensure that errors raised in core-crypto produce logs [WPB… #345

test(ffi): ensure that errors raised in core-crypto produce logs [WPB…

test(ffi): ensure that errors raised in core-crypto produce logs [WPB… #345

Workflow file for this run

name: documentation
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
on:
push:
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
CARGO_TERM_COLOR: always
CARGO_NET_GIT_FETCH_WITH_CLI: true
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
jobs:
rustdoc:
name: rust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1 # this implicitly caches Rust tools and build artifacts
with:
rustflags: '-D warnings -W unreachable-pub'
- run: cargo doc --all --no-deps
- uses: actions/[email protected]
with:
name: rustdoc
path: target/doc
retention-days: 1
overwrite: true
include-hidden-files: true
tsdoc:
name: typescript
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: |
wasm32-unknown-unknown
x86_64-unknown-linux-gnu
- name: setup cargo-make
uses: davidB/rust-cargo-make@v1
- name: install wasm-pack
uses: taiki-e/install-action@v2
with:
tool: wasm-pack
- name: setup bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: make ts docs
run: |
cd crypto-ffi
cargo make docs-ts
- uses: actions/[email protected]
with:
name: tsdoc
path: target/doc
retention-days: 1
overwrite: true
include-hidden-files: true
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: '' # note that this is _not_ the default
- name: setup cargo-make
uses: davidB/rust-cargo-make@v1
- name: make kotlin docs
run: |
mkdir -p target/doc/core_crypto_ffi/bindings/kotlin
cd crypto-ffi
cargo make docs-kotlin
- uses: actions/[email protected]
with:
name: ktdoc
path: target/doc
retention-days: 1
overwrite: true
include-hidden-files: true
deploy:
name: deploy
runs-on: ubuntu-latest
if: github.repository == 'wireapp/core-crypto' && github.ref_name == 'main'
needs:
- rustdoc
- tsdoc
- ktdoc
steps:
- uses: actions/[email protected]
with:
pattern: "*doc"
path: target/doc
merge-multiple: true
- name: deploy docs
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./target/doc
force_orphan: true