Skip to content

Commit cce3998

Browse files
committed
refactor: re-organize hermes in monorepo
1 parent 2398afe commit cce3998

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+19
-19
lines changed

.dockerignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515

1616
.git
1717

18-
hermes/wormhole
19-
!hermes/src/state/cache.rs
18+
apps/hermes/wormhole
19+
!apps/hermes/src/state/cache.rs

.github/workflows/ci-hermes.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Check Hermes
22

33
on:
44
pull_request:
5-
paths: [hermes/**]
5+
paths: [apps/hermes/**]
66
push:
77
branches: [main]
8-
paths: [hermes/**]
8+
paths: [apps/hermes/**]
99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
@@ -20,4 +20,4 @@ jobs:
2020
- name: Install protoc
2121
uses: arduino/setup-protoc@v3
2222
- name: Run executor tests
23-
run: cargo test --manifest-path ./hermes/Cargo.toml
23+
run: cargo test --manifest-path ./apps/hermes/Cargo.toml

.github/workflows/push-hermes-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
env:
3838
AWS_REGION: us-east-1
3939
- run: |
40-
DOCKER_BUILDKIT=1 docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f hermes/Dockerfile .
40+
DOCKER_BUILDKIT=1 docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f apps/hermes/Dockerfile .
4141
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
4242
env:
4343
ECR_REGISTRY: public.ecr.aws

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ repos:
4747
- id: cargo-fmt-hermes
4848
name: Cargo format for Hermes
4949
language: "rust"
50-
entry: cargo +nightly-2024-03-26 fmt --manifest-path ./hermes/Cargo.toml --all -- --config-path rustfmt.toml
50+
entry: cargo +nightly-2024-03-26 fmt --manifest-path ./apps/hermes/Cargo.toml --all -- --config-path rustfmt.toml
5151
pass_filenames: false
52-
files: hermes
52+
files: apps/hermes
5353
- id: cargo-clippy-hermes
5454
name: Cargo clippy for Hermes
5555
language: "rust"
56-
entry: cargo +nightly-2024-03-26 clippy --manifest-path ./hermes/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
56+
entry: cargo +nightly-2024-03-26 clippy --manifest-path ./apps/hermes/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
5757
pass_filenames: false
58-
files: hermes
58+
files: apps/hermes
5959
# Hooks for Fortuna
6060
- id: cargo-fmt-fortuna
6161
name: Cargo format for Fortuna

README.md

Lines changed: 1 addition & 1 deletion
File renamed without changes.
File renamed without changes.
File renamed without changes.

hermes/Cargo.toml renamed to apps/hermes/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ prometheus-client = { version = "0.21.2" }
3131
prost = { version = "0.12.1" }
3232
pyth-sdk = { version = "0.8.0" }
3333
pyth-sdk-solana = { version = "0.9.0" }
34-
pythnet-sdk = { path = "../pythnet/pythnet_sdk/", version = "2.0.0", features = ["strum"] }
34+
pythnet-sdk = { path = "../../pythnet/pythnet_sdk/", version = "2.0.0", features = ["strum"] }
3535
rand = { version = "0.8.5" }
3636
reqwest = { version = "0.11.14", features = ["blocking", "json"] }
3737
secp256k1 = { version = "0.27.0", features = ["rand", "recovery", "serde"] }

hermes/Dockerfile renamed to apps/hermes/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ RUN rustup default nightly-2024-03-26
1212

1313
# Build
1414
WORKDIR /src
15-
COPY hermes hermes
15+
COPY apps/hermes apps/hermes
1616
COPY pythnet/pythnet_sdk pythnet/pythnet_sdk
1717

1818

19-
WORKDIR /src/hermes
19+
WORKDIR /src/apps/hermes
2020

2121
RUN --mount=type=cache,target=/root/.cargo/registry cargo build --release
2222

2323
FROM rust:1.77.0
2424

2525
# Copy artifacts from other images
26-
COPY --from=build /src/hermes/target/release/hermes /usr/local/bin/
26+
COPY --from=build /src/apps/hermes/target/release/hermes /usr/local/bin/

0 commit comments

Comments
 (0)