Skip to content

Commit

Permalink
renamed gendoc to gencode; make it unpublishable (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
conradoplg authored Mar 2, 2023
1 parent dc3544e commit e5ecb2d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ jobs:
run: cargo install cargo-llvm-cov

- name: Run tests
run: cargo llvm-cov --lcov --no-report --ignore-filename-regex 'tests.rs|benches.rs|gendoc'
run: cargo llvm-cov --lcov --no-report --ignore-filename-regex 'tests.rs|benches.rs|gencode'

- name: Generate coverage report
run: cargo llvm-cov report --lcov --ignore-filename-regex 'tests.rs|benches.rs|gendoc' --output-path lcov.info
run: cargo llvm-cov report --lcov --ignore-filename-regex 'tests.rs|benches.rs|gencode' --output-path lcov.info

- name: Upload coverage report to Codecov
uses: codecov/[email protected]
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
- uses: actions-rs/[email protected]
with:
command: run
args: --bin gendoc -- --check
args: --bin gencode -- --check

docs:
name: Check Rust doc
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ members = [
"frost-ristretto255",
"frost-secp256k1",
"frost-rerandomized",
"gendoc"
"gencode"
]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ dependency.
Test coverage checks are performed in the pipeline. This is cofigured here: `.github/workflows/coverage.yaml`
To run these locally:
1. Install coverage tool by running `cargo install cargo-llvm-cov`
2. Run `cargo llvm-cov --ignore-filename-regex 'tests.rs|benches.rs|gendoc'` (you may be asked if you want to install `llvm-tools-preview`, if so type `Y`)
2. Run `cargo llvm-cov --ignore-filename-regex 'tests.rs|benches.rs|gencode'` (you may be asked if you want to install `llvm-tools-preview`, if so type `Y`)
5 changes: 3 additions & 2 deletions gendoc/Cargo.toml → gencode/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
[package]
name = "gendoc"
name = "gencode"
version = "0.1.0"
edition = "2021"
publish = false

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
regex = "1.6.0"

[[bin]]
name = "gendoc"
name = "gencode"
path = "src/main.rs"
# Disables non-criterion benchmark which is not used; prevents errors
# when using criterion-specific flags
Expand Down
4 changes: 3 additions & 1 deletion gendoc/src/main.rs → gencode/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//! Generate documentation for a ciphersuite based on another ciphersuite implementation.
//!
//! This is an internal tool used for development.
//!
//! The documentation for each ciphersuite is very similar, with the only difference being
//! the ciphersuite name.
//!
Expand All @@ -8,7 +10,7 @@
//! uses frost-ristretto255 as the "canonical" one, so:
//!
//! - Change any documentation of a public function or struct in `frost-ristretto255/src/lib.rs`
//! - Run `cargo run --manifest-path gendoc/Cargo.toml` to update the documentation
//! - Run `cargo run --manifest-path gencode/Cargo.toml` to update the documentation
//! of the other ciphersuites.
use std::{env, fs, iter::zip, process::ExitCode};
Expand Down

0 comments on commit e5ecb2d

Please sign in to comment.