refactor(fortuna): re-organize in monorepo
This commit is contained in:
parent
73798b9bdd
commit
ba435bac76
|
@ -2,10 +2,10 @@ name: Check Fortuna
|
|||
|
||||
on:
|
||||
pull_request:
|
||||
paths: [fortuna/**]
|
||||
paths: [apps/fortuna/**]
|
||||
push:
|
||||
branches: [main]
|
||||
paths: [fortuna/**]
|
||||
paths: [apps/fortuna/**]
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -17,4 +17,4 @@ jobs:
|
|||
toolchain: nightly-2023-07-23
|
||||
override: true
|
||||
- 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
|
||||
with:
|
||||
context: .
|
||||
file: "./fortuna/Dockerfile"
|
||||
file: "./apps/fortuna/Dockerfile"
|
||||
push: true
|
||||
tags: ${{ steps.metadata_fortuna.outputs.tags }}
|
||||
labels: ${{ steps.metadata_fortuna.outputs.labels }}
|
||||
|
|
|
@ -60,9 +60,9 @@ repos:
|
|||
- id: cargo-fmt-fortuna
|
||||
name: Cargo format for Fortuna
|
||||
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
|
||||
files: fortuna
|
||||
files: apps/fortuna
|
||||
# Hooks for message buffer contract
|
||||
- id: cargo-fmt-message-buffer
|
||||
name: Cargo format for message buffer contract
|
||||
|
|
|
@ -16,7 +16,7 @@ ethers = { version = "2.0.14", features = ["ws"] }
|
|||
futures = { version = "0.3.28" }
|
||||
hex = "0.4.3"
|
||||
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"
|
||||
reqwest = { version = "0.11.22", features = ["json", "blocking"] }
|
||||
serde = { version = "1.0.188", features = ["derive"] }
|
|
@ -7,15 +7,15 @@ RUN rustup default nightly-2023-07-23
|
|||
|
||||
# Build
|
||||
WORKDIR /src
|
||||
COPY fortuna fortuna
|
||||
COPY apps/fortuna apps/fortuna
|
||||
COPY pythnet pythnet
|
||||
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
|
||||
|
||||
|
||||
FROM rust:${RUST_VERSION}
|
||||
# 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.
|
||||
abigen!(
|
||||
PythRandom,
|
||||
"../target_chains/ethereum/entropy_sdk/solidity/abis/IEntropy.json"
|
||||
"../../target_chains/ethereum/entropy_sdk/solidity/abis/IEntropy.json"
|
||||
);
|
||||
|
||||
pub type SignablePythContract = PythRandom<
|
Loading…
Reference in New Issue