Skip to content

Commit

Permalink
add dependency graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Leshiy committed Dec 5, 2023
1 parent c372f09 commit fcdddac
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 17 deletions.
17 changes: 5 additions & 12 deletions catalyst-gateway/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ VERSION 0.7

# Set up our target toolchains, and copy our files.
builder:
FROM github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.3+rust-base
FROM github.com/input-output-hk/catalyst-ci/earthly/rust:feat/rust-docs+rust-base

DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.3+SETUP --toolchain=rust-toolchain.toml
DO github.com/input-output-hk/catalyst-ci/earthly/rust:feat/rust-docs+SETUP --toolchain=rust-toolchain.toml

DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.3+CP_SRC --src=".cargo .config Cargo.* clippy.toml deny.toml rustfmt.toml bin crates"
DO github.com/input-output-hk/catalyst-ci/earthly/rust:feat/rust-docs+CP_SRC --src=".cargo .config Cargo.* clippy.toml deny.toml rustfmt.toml bin crates"

# Test rust build container - Use best architecture host tools.
check-hosted:
Expand All @@ -27,9 +27,9 @@ build-hosted:
# Build the service
FROM +builder

DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.3+BUILD
DO github.com/input-output-hk/catalyst-ci/earthly/rust:feat/rust-docs+BUILD

DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.3+SMOKE_TEST --bin=cat-gateway
DO github.com/input-output-hk/catalyst-ci/earthly/rust:feat/rust-docs+SMOKE_TEST --bin=cat-gateway

SAVE ARTIFACT target/$TARGETARCH/doc doc
SAVE ARTIFACT target/$TARGETARCH/release/cat-gateway cat-gateway
Expand All @@ -39,13 +39,6 @@ build-hosted:
build-all-hosts:
BUILD --platform=linux/amd64 --platform=linux/arm64 +build-hosted

build-docs:
# Build the service
FROM +builder

RUN RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo +nightly docs

SAVE ARTIFACT target/$TARGETARCH/doc doc

## -----------------------------------------------------------------------------
##
Expand Down
8 changes: 4 additions & 4 deletions docs/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ VERSION 0.7
# Copy all the source we need to build the docs
src:
# Common src setup
DO github.com/input-output-hk/catalyst-ci/earthly/docs:v2.0.8+SRC
DO github.com/input-output-hk/catalyst-ci/earthly/docs:feat/rust-docs+SRC

# Now copy into that any artifacts we pull from the builds.
COPY --dir ../+repo-docs/repo /docs/includes
# copy Rust docs
COPY ./../catalyst-gateway+build-docs/doc /docs/src/api/catalyst-gateway/rust-docs
COPY ./../catalyst-gateway+build-hosted/doc /docs/src/api/catalyst-gateway/rust-docs

# Build the docs here.
docs:
FROM +src

DO github.com/input-output-hk/catalyst-ci/earthly/docs:v2.0.8+BUILD
DO github.com/input-output-hk/catalyst-ci/earthly/docs:feat/rust-docs+BUILD

# Make a locally runable container that can serve the docs.
local:
# Build a self contained service to show built docs locally.
DO github.com/input-output-hk/catalyst-ci/earthly/docs:v2.0.8+PACKAGE
DO github.com/input-output-hk/catalyst-ci/earthly/docs:feat/rust-docs+PACKAGE

# Copy the static pages into the container
COPY +docs/ /usr/share/nginx/html
Expand Down
20 changes: 19 additions & 1 deletion docs/src/api/catalyst-gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,22 @@ icon: material/gate
<!-- markdownlint-disable no-inline-html -->
<iframe src="rust-docs/index.html" title="RUSTDOC Documentation" style="height:800px;width:100%;"></iframe>

[OPEN FULL PAGE](./catalyst-gateway/rust-docs/index.html)
[OPEN FULL PAGE](./catalyst-gateway/rust-docs/index.html)

## Workspace Dependency Graph

```kroki-graphviz
@from_file:./api/catalyst-gateway/rust-docs/workspace.dot
```

## External Dependencies Graph

```kroki-graphviz
@from_file:./api/catalyst-gateway/rust-docs/full.dot
```

## Build and Development Dependencies Graph

```kroki-graphviz
@from_file:./api/catalyst-gateway/rust-docs/all.dot
```

0 comments on commit fcdddac

Please sign in to comment.