Skip to content

Commit

Permalink
chore: update ci and readme (#50)
Browse files Browse the repository at this point in the history
* ci: add an automatic publish workflow for core/render crates

* chore: add custom badges to readme

* chore: update header badges

* doc: update user guide index

* ci: remove bench workflow

* ci: add cache usage to publish workflow
  • Loading branch information
imrn99 authored Apr 22, 2024
1 parent 4181d7f commit ce3948d
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 58 deletions.
46 changes: 0 additions & 46 deletions .github/workflows/bench.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish Crates

on:
release:
types: [ published ]

env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTFLAGS: "-D warnings"
RUSTUP_MAX_RETRIES: 10
RUST_BACKTRACE: 1

jobs:
publish:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2

# Publish
- name: Publish core
run: cargo publish --package honeycomb-core --token ${CIO_TOKEN}
env:
CIO_TOKEN: ${{ secrets.CRATESIO_TOKEN }}
- name: Publish render
run: cargo publish --package honeycomb-render --token ${CIO_TOKEN}
env:
CIO_TOKEN: ${{ secrets.CRATESIO_TOKEN }}
27 changes: 19 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Honeycomb

[![Rust Tests](https://github.com/LIHPC-Computational-Geometry/honeycomb/actions/workflows/rust-test.yml/badge.svg)](https://github.com/LIHPC-Computational-Geometry/honeycomb/actions/workflows/rust-test.yml)
[![Documentation](https://github.com/LIHPC-Computational-Geometry/honeycomb/actions/workflows/doc.yml/badge.svg)][UG]
[![Current Version](https://img.shields.io/crates/v/honeycomb-render?label=latest%20release)][CIOHC]
[![GitHub commits since latest release](https://img.shields.io/github/commits-since/LIHPC-Computational-Geometry/honeycomb/latest)][GH]
[![Build Status](https://github.com/LIHPC-Computational-Geometry/honeycomb/actions/workflows/build.yml/badge.svg)](https://github.com/LIHPC-Computational-Geometry/honeycomb/actions/workflows/build.yml)
[![Rust Tests](https://github.com/LIHPC-Computational-Geometry/honeycomb/actions/workflows/rust-test.yml/badge.svg)](https://github.com/LIHPC-Computational-Geometry/honeycomb/actions/workflows/rust-test.yml)
[![codecov](https://codecov.io/github/LIHPC-Computational-Geometry/honeycomb/graph/badge.svg?token=QSN0TWFXO1)](https://codecov.io/github/LIHPC-Computational-Geometry/honeycomb)

Honeycomb aims to provide a safe, efficient and scalable implementation of
Expand Down Expand Up @@ -38,23 +39,33 @@ kill $(ps -e | awk '/mdbook/ {print $1}')

### Rust

The content of each member is described in their respective Rust Doc as well as in the [user guide][UGW].
The content of each member is described in their respective Rust Doc as well as in the [user guide][UGW]. The following
crates are published:

- [![Core Version](https://img.shields.io/crates/v/honeycomb-core?label=honeycomb-core)][CIOHC] [![docs.rs](https://docs.rs/honeycomb-core/badge.svg)][DOCHC]
basic structures
- [![Render Version](https://img.shields.io/crates/v/honeycomb-render?label=honeycomb-render)][CIOHR] [![docs.rs](https://docs.rs/honeycomb-render/badge.svg)][DOCHR]
visualizing tool

The repository also hosts these members:

- Basic structures are provided in the **honeycomb-core** crate ([Rust Doc][DOCHC]).
- Benchmarks are grouped in the **honeycomb-benches** crate ([Rust Doc][DOCHB])
- Examples are grouped in the **honeycomb-examples** crate ([Rust Doc][DOCHU])
- A visualizing tool is provided in the **honeycomb-render** crate ([Rust Doc][DOCHR]).

[UGW]: https://lihpc-computational-geometry.github.io/honeycomb/project-structure/workspace.html

[DOCHC]: https://lihpc-computational-geometry.github.io/honeycomb/honeycomb_core/
[DOCHC]: https://docs.rs/honeycomb-core/

[CIOHC]:https://crates.io/crates/honeycomb-core

[DOCHR]: https://docs.rs/honeycomb-render/

[CIOHR]:https://crates.io/crates/honeycomb-render

[DOCHB]: https://lihpc-computational-geometry.github.io/honeycomb/honeycomb_benches/

[DOCHU]: https://lihpc-computational-geometry.github.io/honeycomb/honeycomb_utils/

[DOCHR]: https://lihpc-computational-geometry.github.io/honeycomb/honeycomb_render/

## Contributing

Contributions are welcome and accepted as pull requests on [GitHub][GH]. Feel free to use issues to report bugs,
Expand Down
19 changes: 15 additions & 4 deletions honeycomb-guide/src/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# The Honeycomb User Guide

[![Current Version](https://img.shields.io/crates/v/honeycomb-render?label=latest%20release)][CIOHC]
[![GitHub commits since latest release](https://img.shields.io/github/commits-since/LIHPC-Computational-Geometry/honeycomb/latest)][GH]
[![Build Status](https://github.com/LIHPC-Computational-Geometry/honeycomb/actions/workflows/build.yml/badge.svg)](https://github.com/LIHPC-Computational-Geometry/honeycomb/actions/workflows/build.yml)
[![Rust Tests](https://github.com/LIHPC-Computational-Geometry/honeycomb/actions/workflows/rust-test.yml/badge.svg)](https://github.com/LIHPC-Computational-Geometry/honeycomb/actions/workflows/rust-test.yml)
[![codecov](https://codecov.io/github/LIHPC-Computational-Geometry/honeycomb/graph/badge.svg?token=QSN0TWFXO1)](https://codecov.io/github/LIHPC-Computational-Geometry/honeycomb)

---

## Honeycomb

Honeycomb aims to provide a safe, efficient and scalable implementation of combinatorial maps for meshing applications.
Expand All @@ -17,19 +25,22 @@ deal with data races and similar issues, thanks to the language's guarantees.

#### Rust

The crate is not currently being published on crates.io, meaning you will have to add the dependency manually to your
project. This can be done by adding the following line to the manifest of the project:
The core and render crates are being published on crates.io. You can add those to your project by adding the following
lines to the manifest of the project:

```toml
# Cargo.toml
# ...

[dependencies]
# Other dependencies...
honeycomb-core = { git = "https://github.com/LIHPC-Computational-Geometry/honeycomb.git" }
honeycomb-render = { git = "https://github.com/LIHPC-Computational-Geometry/honeycomb.git" }
honeycomb-core = "0.2.0"
honeycomb-render = "0.2.0"
```

Note that if you want to access the latest changes and documentation, you may have to specify a commit instead of a
version, and use the GitHub Pages documentation instead of the one hosted on docs.rs.

#### Documentation

You can generate this documentation locally using **mdbook** and **cargo doc**:
Expand Down

0 comments on commit ce3948d

Please sign in to comment.