refactor(fortuna): re-organize in monorepo
This commit is contained in:
parent
73798b9bdd
commit
ba435bac76
|
@ -2,10 +2,10 @@ name: Check Fortuna
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths: [fortuna/**]
|
paths: [apps/fortuna/**]
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
paths: [fortuna/**]
|
paths: [apps/fortuna/**]
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -17,4 +17,4 @@ jobs:
|
||||||
toolchain: nightly-2023-07-23
|
toolchain: nightly-2023-07-23
|
||||||
override: true
|
override: true
|
||||||
- name: Run executor tests
|
- name: Run executor tests
|
||||||
run: cargo test --manifest-path ./fortuna/Cargo.toml
|
run: cargo test --manifest-path ./apps/fortuna/Cargo.toml
|
||||||
|
|
|
@ -46,7 +46,7 @@ jobs:
|
||||||
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
|
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: "./fortuna/Dockerfile"
|
file: "./apps/fortuna/Dockerfile"
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.metadata_fortuna.outputs.tags }}
|
tags: ${{ steps.metadata_fortuna.outputs.tags }}
|
||||||
labels: ${{ steps.metadata_fortuna.outputs.labels }}
|
labels: ${{ steps.metadata_fortuna.outputs.labels }}
|
||||||
|
|
|
@ -60,9 +60,9 @@ repos:
|
||||||
- id: cargo-fmt-fortuna
|
- id: cargo-fmt-fortuna
|
||||||
name: Cargo format for Fortuna
|
name: Cargo format for Fortuna
|
||||||
language: "rust"
|
language: "rust"
|
||||||
entry: cargo +nightly-2023-07-23 fmt --manifest-path ./fortuna/Cargo.toml --all -- --config-path rustfmt.toml
|
entry: cargo +nightly-2023-07-23 fmt --manifest-path ./apps/fortuna/Cargo.toml --all -- --config-path rustfmt.toml
|
||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
files: fortuna
|
files: apps/fortuna
|
||||||
# Hooks for message buffer contract
|
# Hooks for message buffer contract
|
||||||
- id: cargo-fmt-message-buffer
|
- id: cargo-fmt-message-buffer
|
||||||
name: Cargo format for message buffer contract
|
name: Cargo format for message buffer contract
|
||||||
|
|
|
@ -16,7 +16,7 @@ ethers = { version = "2.0.14", features = ["ws"] }
|
||||||
futures = { version = "0.3.28" }
|
futures = { version = "0.3.28" }
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
prometheus-client = { version = "0.21.2" }
|
prometheus-client = { version = "0.21.2" }
|
||||||
pythnet-sdk = { path = "../pythnet/pythnet_sdk", features = ["strum"] }
|
pythnet-sdk = { path = "../../pythnet/pythnet_sdk", features = ["strum"] }
|
||||||
rand = "0.8.5"
|
rand = "0.8.5"
|
||||||
reqwest = { version = "0.11.22", features = ["json", "blocking"] }
|
reqwest = { version = "0.11.22", features = ["json", "blocking"] }
|
||||||
serde = { version = "1.0.188", features = ["derive"] }
|
serde = { version = "1.0.188", features = ["derive"] }
|
|
@ -7,15 +7,15 @@ RUN rustup default nightly-2023-07-23
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY fortuna fortuna
|
COPY apps/fortuna apps/fortuna
|
||||||
COPY pythnet pythnet
|
COPY pythnet pythnet
|
||||||
COPY target_chains/ethereum/entropy_sdk/solidity/abis target_chains/ethereum/entropy_sdk/solidity/abis
|
COPY target_chains/ethereum/entropy_sdk/solidity/abis target_chains/ethereum/entropy_sdk/solidity/abis
|
||||||
|
|
||||||
WORKDIR /src/fortuna
|
WORKDIR /src/apps/fortuna
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cargo/registry cargo build --release
|
RUN --mount=type=cache,target=/root/.cargo/registry cargo build --release
|
||||||
|
|
||||||
|
|
||||||
FROM rust:${RUST_VERSION}
|
FROM rust:${RUST_VERSION}
|
||||||
# Copy artifacts from other images
|
# Copy artifacts from other images
|
||||||
COPY --from=build /src/fortuna/target/release/fortuna /usr/local/bin/
|
COPY --from=build /src/apps/fortuna/target/release/fortuna /usr/local/bin/
|
|
@ -0,0 +1 @@
|
||||||
|
nightly-2023-07-23-x86_64-unknown-linux-gnu
|
|
@ -59,7 +59,7 @@ use {
|
||||||
// contract in the same repo.
|
// contract in the same repo.
|
||||||
abigen!(
|
abigen!(
|
||||||
PythRandom,
|
PythRandom,
|
||||||
"../target_chains/ethereum/entropy_sdk/solidity/abis/IEntropy.json"
|
"../../target_chains/ethereum/entropy_sdk/solidity/abis/IEntropy.json"
|
||||||
);
|
);
|
||||||
|
|
||||||
pub type SignablePythContract = PythRandom<
|
pub type SignablePythContract = PythRandom<
|
Loading…
Reference in New Issue