-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a0cf302
commit f86548d
Showing
19 changed files
with
427 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Keys and default values are documented here: | ||
# https://github.com/rustsec/rustsec/blob/main/cargo-audit/audit.toml.example | ||
|
||
[advisories] | ||
# These should all have either: | ||
# - tracking issues with the "security" label | ||
# - reasons why they're ignored | ||
ignore = [] | ||
|
||
[output] | ||
deny = ["unmaintained"] | ||
format = "terminal" | ||
quiet = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[[disallowed-types]] | ||
path = "std::collections::HashMap" | ||
reason = """the standard library hasher is secure by default, but not very fast. | ||
use ahash::HashMap instead.""" | ||
|
||
[[disallowed-types]] | ||
path = "std::collections::HashSet" | ||
reason = """the standard library hasher is secure by default, but not very fast. | ||
use ahash::HashSet instead.""" | ||
|
||
# Banned in #2600, presumably so that poisoning won't need to be user-handled | ||
[[disallowed-types]] | ||
path = "std::sync::RwLock" | ||
reason = """the standard library synchronization primitives are poisoned when aquiring threads panic. | ||
use parking_lot::RwLock instead to silently ignore panics.""" | ||
|
||
[[disallowed-types]] | ||
path = "std::sync::Mutex" | ||
reason = """the standard library synchronization primitives are poisoned when aquiring threads panic. | ||
use parking_lot::Mutex instead to silently ignore panics.""" |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Two members of the Forest team are automatically (and randomly) assigned to review all PRs. | ||
* @ChainSafe/Forest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "cargo" | ||
directory: "/" # Location of package manifests | ||
open-pull-requests-limit: 1 | ||
schedule: | ||
interval: "weekly" | ||
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#groups | ||
groups: | ||
patch-versions: | ||
update-types: | ||
- "patch" | ||
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot#enabling-dependabot-version-updates-for-actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
open-pull-requests-limit: 1 | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: CI for rust-f3 | ||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.ref }}" | ||
cancel-in-progress: "${{ github.ref != 'refs/heads/main' }}" | ||
"on": | ||
workflow_dispatch: | ||
merge_group: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: 0 0 * * * | ||
env: | ||
SCCACHE_GHA_ENABLED: "true" | ||
RUSTC_WRAPPER: sccache | ||
CC: sccache clang | ||
CXX: sccache clang++ | ||
jobs: | ||
test: | ||
name: build-and-test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup sccache | ||
uses: mozilla-actions/sccache-action@v0.0.5 | ||
timeout-minutes: 5 | ||
continue-on-error: true | ||
- name: Build | ||
run: make check | ||
- name: Test | ||
run: make test | ||
|
||
lint: | ||
name: All lint checks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup sccache | ||
uses: mozilla-actions/sccache-action@v0.0.5 | ||
timeout-minutes: 5 | ||
continue-on-error: true | ||
- name: Install Lint tools | ||
run: make install-lint-tools-ci | ||
env: | ||
RUSTFLAGS: "-Cstrip=symbols" | ||
- name: Lint | ||
run: make lint-all | ||
|
||
dependencies-check: | ||
name: Check cargo dependencies | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "3.0" | ||
- name: Run dependencies checks | ||
run: | | ||
gem install toml-rb --no-document | ||
ruby scripts/linters/find_unused_deps.rb | ||
codedov: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: taiki-e/install-action@cargo-llvm-cov | ||
- run: cargo llvm-cov --all-features --lcov --output-path lcov.info | ||
env: | ||
RUSTC_WRAPPER: | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: lcov.info | ||
path: lcov.info | ||
if-no-files-found: error | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
if: false # Rate limit reached. Please upload with the Codecov repository upload token to resolve issue. | ||
with: | ||
# token: ${{ secrets.CODECOV_TOKEN }} | ||
files: lcov.info | ||
fail_ci_if_error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
[workspace] | ||
resolver = "2" | ||
members = ["blssig", "gpbft"] | ||
|
||
members = [ | ||
"blssig", | ||
"gpbft" | ||
] | ||
[workspace.package] | ||
authors = ["ChainSafe Systems <forest@chainsafe.io>"] | ||
repository = "https://github.com/ChainSafe/rust-f3" | ||
license = "MIT OR Apache-2.0" | ||
edition = "2021" | ||
|
||
[workspace.dependencies] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
check: | ||
cargo check | ||
|
||
test: | ||
cargo test | ||
|
||
doc: | ||
cargo doc | ||
cp ./build/vendored-docs-redirect.index.html target/doc/index.html | ||
|
||
bench: | ||
cargo bench | ||
|
||
# Lints with everything we have in our CI arsenal | ||
lint-all: audit lint-fmt clippy license spellcheck | ||
|
||
audit: | ||
cargo audit || (echo "See .config/audit.toml"; false) | ||
|
||
lint-fmt: | ||
cargo fmt --all --check | ||
taplo fmt --check | ||
taplo lint | ||
|
||
fmt: | ||
cargo fmt --all | ||
taplo fmt | ||
|
||
clippy: | ||
cargo clippy --all-targets --quiet --no-deps -- --deny=warnings | ||
cargo clippy --all-targets --no-default-features --quiet --no-deps -- --deny=warnings | ||
cargo clippy --all-targets --all-features --quiet --no-deps -- --deny=warnings | ||
|
||
# Checks if all headers are present and adds if not | ||
license: | ||
./scripts/add_license.sh | ||
|
||
spellcheck: | ||
cargo spellcheck --code 1 || (echo "See .config/spellcheck.md for tips"; false) | ||
|
||
install-lint-tools: | ||
cargo install --locked taplo-cli | ||
cargo install --locked cargo-audit | ||
cargo install --locked cargo-spellcheck | ||
|
||
install-lint-tools-ci: | ||
wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz | ||
tar xzf cargo-binstall-x86_64-unknown-linux-musl.tgz | ||
cp cargo-binstall ~/.cargo/bin/cargo-binstall | ||
|
||
cargo binstall --no-confirm taplo-cli cargo-spellcheck cargo-audit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
[package] | ||
name = "filecoin-f3-blssig" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
authors.workspace = true | ||
repository.workspace = true | ||
license.workspace = true | ||
edition.workspace = true | ||
|
||
[dependencies] | ||
|
||
[dev-dependencies] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!DOCTYPE html> | ||
|
||
<html> | ||
|
||
<head> | ||
<meta http-equiv="Refresh" content="0; url='./filecoin_f3_gpbft/index.html'" /> | ||
</head> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
codecov: | ||
require_ci_to_pass: yes | ||
|
||
coverage: | ||
precision: 2 | ||
round: down | ||
range: "70...100" | ||
|
||
parsers: | ||
gcov: | ||
branch_detection: | ||
conditional: yes | ||
loop: yes | ||
method: no | ||
macro: no | ||
|
||
comment: | ||
layout: "reach,diff,flags,files,footer" | ||
behavior: default | ||
require_changes: no | ||
|
||
ignore: | ||
- "tests" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
[package] | ||
name = "filecoin-f3-gpbft" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
authors.workspace = true | ||
repository.workspace = true | ||
license.workspace = true | ||
edition.workspace = true | ||
|
||
[dependencies] | ||
|
||
[dev-dependencies] |
Oops, something went wrong.