Skip to content

Commit ba435ba

Browse files
committed
refactor(fortuna): re-organize in monorepo
1 parent 73798b9 commit ba435ba

37 files changed

+12
-11
lines changed

.github/workflows/ci-fortuna.yml

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

33
on:
44
pull_request:
5-
paths: [fortuna/**]
5+
paths: [apps/fortuna/**]
66
push:
77
branches: [main]
8-
paths: [fortuna/**]
8+
paths: [apps/fortuna/**]
99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
@@ -17,4 +17,4 @@ jobs:
1717
toolchain: nightly-2023-07-23
1818
override: true
1919
- name: Run executor tests
20-
run: cargo test --manifest-path ./fortuna/Cargo.toml
20+
run: cargo test --manifest-path ./apps/fortuna/Cargo.toml

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
4747
with:
4848
context: .
49-
file: "./fortuna/Dockerfile"
49+
file: "./apps/fortuna/Dockerfile"
5050
push: true
5151
tags: ${{ steps.metadata_fortuna.outputs.tags }}
5252
labels: ${{ steps.metadata_fortuna.outputs.labels }}

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ repos:
6060
- id: cargo-fmt-fortuna
6161
name: Cargo format for Fortuna
6262
language: "rust"
63-
entry: cargo +nightly-2023-07-23 fmt --manifest-path ./fortuna/Cargo.toml --all -- --config-path rustfmt.toml
63+
entry: cargo +nightly-2023-07-23 fmt --manifest-path ./apps/fortuna/Cargo.toml --all -- --config-path rustfmt.toml
6464
pass_filenames: false
65-
files: fortuna
65+
files: apps/fortuna
6666
# Hooks for message buffer contract
6767
- id: cargo-fmt-message-buffer
6868
name: Cargo format for message buffer contract
File renamed without changes.
File renamed without changes.

fortuna/Cargo.toml renamed to apps/fortuna/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ethers = { version = "2.0.14", features = ["ws"] }
1616
futures = { version = "0.3.28" }
1717
hex = "0.4.3"
1818
prometheus-client = { version = "0.21.2" }
19-
pythnet-sdk = { path = "../pythnet/pythnet_sdk", features = ["strum"] }
19+
pythnet-sdk = { path = "../../pythnet/pythnet_sdk", features = ["strum"] }
2020
rand = "0.8.5"
2121
reqwest = { version = "0.11.22", features = ["json", "blocking"] }
2222
serde = { version = "1.0.188", features = ["derive"] }

fortuna/Dockerfile renamed to apps/fortuna/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ RUN rustup default nightly-2023-07-23
77

88
# Build
99
WORKDIR /src
10-
COPY fortuna fortuna
10+
COPY apps/fortuna apps/fortuna
1111
COPY pythnet pythnet
1212
COPY target_chains/ethereum/entropy_sdk/solidity/abis target_chains/ethereum/entropy_sdk/solidity/abis
1313

14-
WORKDIR /src/fortuna
14+
WORKDIR /src/apps/fortuna
1515

1616
RUN --mount=type=cache,target=/root/.cargo/registry cargo build --release
1717

1818

1919
FROM rust:${RUST_VERSION}
2020
# Copy artifacts from other images
21-
COPY --from=build /src/fortuna/target/release/fortuna /usr/local/bin/
21+
COPY --from=build /src/apps/fortuna/target/release/fortuna /usr/local/bin/
File renamed without changes.
File renamed without changes.

apps/fortuna/rust-toolchain

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nightly-2023-07-23-x86_64-unknown-linux-gnu

0 commit comments

Comments
 (0)