Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(general): Update CI #360

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 7 additions & 14 deletions .config/dictionaries/project.dic
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
aarch
abnf
ABNF
addrr
adminer
apskhem
Expand All @@ -18,12 +17,10 @@ BROTLI
cantopen
cardano
cbor
CBOR
cbork
cdylib
CEST
CHAINCODE
chaincode
chainsync
childs
chrono
Expand All @@ -38,8 +35,6 @@ crontagged
cstring
dalek
dashmap
dashmap
Datelike
Datelike
DBSTATUS
dbsync
Expand Down Expand Up @@ -83,24 +78,23 @@ highwater
hmod
ideascale
idents
ipfs
ipld
IFMT
Intellij
ioerr
iohk
ipfs
ipld
jetbrains
jsonschema
jorm
jormungandr
Jörmungandr
jsonschema
lcov
Leshiy
libsqlite
libtest
libipld
libp2p
libsqlite
libtest
linkat
lintfix
lipsum
Expand All @@ -110,6 +104,7 @@ maindbname
mapref
mdlint
mdns
metno
miniprotocol
miniprotocols
mithril
Expand All @@ -121,6 +116,7 @@ moderations
Multiaddr
multiera
nanos
nbaz
netkey
nextest
nolfs
Expand All @@ -140,8 +136,8 @@ plpgsql
pollable
Pozhylenkov
pread
preopened
preopen
preopened
preopens
preprod
psql
Expand All @@ -159,7 +155,6 @@ renameat
retriggering
rulelist
rulename
RULENAME
rustc
rustdoc
rustdocflags
Expand Down Expand Up @@ -203,13 +198,11 @@ voteplan
voteplans
wasi
wasip
WASI
wasmtime
webasm
webassembly
WORKDIR
xprivate
XPRV
xprv
xpub
yoroi
2 changes: 2 additions & 0 deletions .earthlyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.git
**/target
9 changes: 9 additions & 0 deletions .github/workflows/semantic_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,12 @@ jobs:
build:
name: Validate PR title
uses: input-output-hk/catalyst-ci/.github/workflows/semantic_pull_request.yml@master
with:
requireScope: true
scopes: |
dashboard
hermes
docs
wasm
utils
general
2 changes: 1 addition & 1 deletion .markdownlint.jsonc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
// markdownlint JSON(C) configuration for Catalyst Standards
// Do not individually set markdown lint rules in documents.
// It is permissable to disable a rule in a document if it is a false positive.
// It is permissible to disable a rule in a document if it is a false positive.
// Keep the scope of the lint disable to as small as possible.
// See: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
// Default state for all rules
Expand Down
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"tamasfe.even-better-toml",
"rust-lang.rust-analyzer",
"JScearcy.rust-doc-viewer",
"serayuzgur.crates",
"bierner.markdown-checkbox",
"bierner.markdown-emoji",
"bierner.markdown-footnotes",
Expand All @@ -24,5 +23,7 @@
"foxundermoon.shell-format",
"dtsvet.vscode-wasm",
"terrastruct.d2",
"tintinweb.graphviz-interactive-preview",
"fill-labs.dependi"
]
}
18 changes: 8 additions & 10 deletions .vscode/settings.recommended.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,12 @@
},
"window.title": "${dirty}${activeEditorShort}",
"conventionalCommits.scopes": [
"vscode",
"hermes",
"dashboard",
"hermes-lib",
"mdlint",
"languages",
"spelling",
"issues",
"gateway",
"docs"
"hermes",
"docs",
"wasm",
"utils",
"general"
],
"conventionalCommits.gitmoji": false,
"markdown.extension.toc.unorderedList.marker": "*",
Expand Down Expand Up @@ -80,5 +76,7 @@
"rust-analyzer.rustfmt.extraArgs": [
"+nightly"
],
"rust-analyzer.lens.enable": true
"rust-analyzer.lens.enable": true,
"dependi.rust.informPatchUpdates": true,
"dependi.decoration.compatible.style": null
}
23 changes: 8 additions & 15 deletions Earthfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.1.24 AS mdlint-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.1.24 AS cspell-ci

FROM debian:stable-slim
IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.2.15 AS mdlint-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.2.15 AS cspell-ci

# cspell: words livedocs sitedocs

# check-markdown : markdown check using catalyst-ci.
check-markdown:
DO mdlint-ci+CHECK
Expand All @@ -17,20 +15,15 @@

DO mdlint-ci+MDLINT_LOCALLY --src=$(echo ${PWD}) --fix=--fix

# clean-spelling-list : Make sure the project dictionary is properly sorted.
clean-spelling-list:
FROM debian:stable-slim

Check failure on line 20 in Earthfile

View workflow job for this annotation

GitHub Actions / ci / check / run (/home/runner/work/hermes/hermes)

Error

The command RUN cspell-cli --quiet lint . --dot did not complete successfully. Exit code 1
DO cspell-ci+CLEAN

# check-spelling : Check spelling in this repo inside a container.
check-spelling:
DO cspell-ci+CHECK

# spell-list-words : List words in a dictionary
spell-list-words:
FROM ghcr.io/streetsidesoftware/cspell:8.0.0
WORKDIR /work

COPY . .

RUN cspell-cli --words-only --unique "wasm/**" | sort -f


# repo-docs : target to store the documentation from the root of the repo.
repo-docs:
# Create artifacts of extra files we embed inside the documentation when its built.
Expand Down
2 changes: 2 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,14 @@
// "dotnet",
// "elixir",
"filetypes",
"flutter",
"fonts",
// "fsharp",
"fullstack",
// "gaming-terms",
"git",
// "golang",
// "google",
// "haskell",
"html",
"html-symbol-entities",
Expand Down
2 changes: 1 addition & 1 deletion docs/Earthfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/docs:v3.2.03 AS docs-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/docs:v3.2.15 AS docs-ci

IMPORT .. AS repo
IMPORT ../hermes AS hermes
Expand Down
61 changes: 0 additions & 61 deletions hermes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ resolver = "2"
members = [
"bin",
"crates/cardano-chain-follower",
"crates/hermes-ipfs",
]

[workspace.package]
Expand Down Expand Up @@ -52,63 +51,3 @@ unchecked_duration_subtraction = "deny"
unreachable = "deny"
missing_docs_in_private_items = "deny"

[workspace.dependencies]
# specific commit from the `catalyst` branch
pallas = { git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "709acb19c52c6b789279ecc4bc8793b5d8b5abe9", version = "0.25.0" }
# specific commit from the `catalyst` branch
pallas-hardano = { git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "709acb19c52c6b789279ecc4bc8793b5d8b5abe9", version = "0.25.0" }

cardano-chain-follower = { path = "crates/cardano-chain-follower", version = "0.0.1" }

hermes-ipfs = { path = "crates/hermes-ipfs", version = "0.0.1" }

wasmtime = "20.0.2"
rusty_ulid = "2.0.0"
anyhow = "1.0.71"
hex-literal = "0.4.1"
thiserror = "1.0.56"
hex = "0.4.3"
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
criterion = "0.5.1"
libtest-mimic = "0.7.0"
crossbeam-queue = "0.3.11"
bip39 = "2.0.0"
iana-time-zone = "0.1.60"
rand = "0.8.5"
bip32 = "0.5.1"
ed25519-bip32 = "0.4.1"
dashmap = "6.0.1"
once_cell = "1.19.0"
clap = "4.5.3"
build-info = "0.0.37"
build-info-build = "0.0.37"
derive_more = "0.99.17"
chrono = "0.4.35"
chrono-tz = "0.9.0"
saffron = "0.1.0"
tokio = "1.36.0"
libsqlite3-sys = "0.29.0"
stringzilla = "3.8.4"
serial_test = { version = "3.1.1", features = ["file_locks"] }
temp-dir = "0.1.13"
hdf5 = { git="https://github.com/aldanor/hdf5-rust.git", rev="694e900972fbf5ffbdd1a2294f57a2cc3a91c994", version="0.8.1", features = [ "static", "blosc" ]}
# needs to enable blosc compression functionality for hdf5 crate
blosc-src = { version = "0.3.0", features = ["lz4", "zlib", "zstd"] }
num_cpus = "1.16.0"
console = "0.15.8"
serde = "1.0"
serde_json = "1.0"
jsonschema = "0.18.0"
hmac = "0.12.1"
pbkdf2 = "0.12.2"
blake2b_simd = "1.0.2"
sha2 = "0.10"
ed25519-dalek = "2.1.1"
x509-cert = "0.2.5"
coset = "0.3.7"
libipld = "0.16.0"
rust-ipfs = "0.11.21"
rustyline-async = "0.4.2"
dirs = "5.0.1"
lipsum = "0.9.1"
8 changes: 7 additions & 1 deletion hermes/Earthfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.2.03 AS rust-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.2.15 AS rust-ci
# Use when debugging cat-ci locally.
# IMPORT ../../catalyst-ci/earthly/rust AS rust-ci

Expand All @@ -19,6 +19,12 @@
# Compiled WASM component for benchmarks
COPY stub-module+build/stub.wasm /wasm/stub-module/stub.wasm

# sync-cfg: Synchronize local config with CI version.
# Must be run by the developer manually.
sync-cfg:
FROM +builder
DO rust-ci+SYNC_STD_CFG

# bindings-expand : Expands `wasmtime::bindgen!` macro into the `bindings.rs` file
bindings-expand:
FROM +builder
Expand Down
45 changes: 45 additions & 0 deletions hermes/Justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# use with https://github.com/casey/just
#
# Hermes developer convenience functions

# cspell: words prereqs, commitlog, rustls, nocapture

default:
@just --list --unsorted

# Show the dependency tree and all enabled feature flags of every crate.
cargo-tree:
cargo tree -e features,normal,build -f "{p}[{f}]" --workspace --frozen

# Check Dependency licenses and CVE's
license-check:
cargo deny check --exclude-dev

# Format the rust code
code-format:
cargo +nightly fmtfix
cargo +nightly fmtchk

# Lint the rust code
code-lint:
cargo lintfix -r
cargo lint -r

# Synchronize Rust Configs
sync-cfg:
cd .. && earthly ./hermes+sync-cfg

# Pre Push Checks
pre-push: sync-cfg code-format code-lint license-check
# Make sure we can actually build inside Earthly which needs to happen in CI.
cd .. && earthly ./hermes+check
cd .. && earthly ./hermes+build

# Build Local release build of catalyst gateway
build-hermes: code-format code-lint
cargo update
cargo build -r

# Run hermes
run-hermes: build-hermes
./target/release/hermes run
Loading