Skip to content
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
7 changes: 5 additions & 2 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ jobs:
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest
# Pre-releases (e.g. 0.90.0-rc.1) must not move the floating tag.
type=raw,value=latest,enable=${{ !github.event.release.prerelease }}
type=sha,prefix=sha-

- name: Create and push manifest
Expand All @@ -134,7 +135,9 @@ jobs:
promote-staging:
name: Promote to staging
needs: merge
if: github.event_name == 'release'
# Pre-releases build and push the image but are deployed deliberately,
# not auto-promoted to the staging environment.
if: github.event_name == 'release' && !github.event.release.prerelease
concurrency:
group: promote-staging
cancel-in-progress: false
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ env:
jobs:
publish-crates:
name: Publish Crates
# Pre-releases build a Docker image only; registry publishing happens on
# full releases (or manual dispatch).
if: github.event_name == 'workflow_dispatch' || !github.event.release.prerelease
runs-on: ubuntu-latest
timeout-minutes: 30
env:
Expand Down Expand Up @@ -47,6 +50,9 @@ jobs:

publish-npm:
name: Publish TypeScript packages to npm
# Pre-releases build a Docker image only; registry publishing happens on
# full releases (or manual dispatch).
if: github.event_name == 'workflow_dispatch' || !github.event.release.prerelease
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
Expand Down
60 changes: 59 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ RUN mkdir -p src fynd-core/src fynd-rpc/src fynd-rpc-types/src \
echo "fn main() {}" > tools/record-market/src/main.rs && \
echo "fn main() {}" > tools/hindsight/src/main.rs && \
echo "" > test-fixtures/src/lib.rs && \
cargo build --release --package fynd --package fynd-swap-cli --package hindsight && \
cargo build --release --package fynd --package fynd-swap-cli --package hindsight --package fynd-benchmark && \
rm -rf src fynd-core/src fynd-rpc/src fynd-rpc-types/src \
clients/rust/src tools/benchmark/src tools/common/src tools/fynd-swap-cli/src \
tools/erc20-overrides/src tools/fynd-gas-audit/src \
Expand All @@ -60,17 +60,18 @@ COPY tools/fynd-swap-cli/src/ tools/fynd-swap-cli/src/
COPY tools/erc20-overrides/src/ tools/erc20-overrides/src/
COPY tools/common/src/ tools/common/src/
COPY tools/hindsight/src/ tools/hindsight/src/
RUN mkdir -p tools/benchmark/src tools/fynd-gas-audit/src \
COPY tools/benchmark/src/ tools/benchmark/src/
RUN mkdir -p tools/fynd-gas-audit/src \
tools/record-market/src test-fixtures/src && \
echo "fn main() {}" > tools/benchmark/src/main.rs && \
echo "fn main() {}" > tools/fynd-gas-audit/src/main.rs && \
echo "fn main() {}" > tools/record-market/src/main.rs && \
echo "" > test-fixtures/src/lib.rs && \
touch src/main.rs src/lib.rs fynd-core/src/lib.rs fynd-rpc/src/lib.rs \
fynd-rpc-types/src/lib.rs clients/rust/src/lib.rs \
tools/fynd-swap-cli/src/main.rs tools/erc20-overrides/src/lib.rs \
tools/common/src/lib.rs tools/hindsight/src/main.rs && \
cargo build --release --package fynd --package fynd-swap-cli --package hindsight
tools/common/src/lib.rs tools/hindsight/src/main.rs \
tools/benchmark/src/main.rs && \
cargo build --release --package fynd --package fynd-swap-cli --package hindsight --package fynd-benchmark

# Stage 2: Runtime
FROM debian:bookworm-slim
Expand All @@ -83,6 +84,7 @@ RUN apt-get update && apt-get install -y \
COPY --from=builder /app/target/release/fynd /usr/local/bin/fynd
COPY --from=builder /app/target/release/fynd-swap-cli /usr/local/bin/fynd-swap-cli
COPY --from=builder /app/target/release/hindsight /usr/local/bin/hindsight
COPY --from=builder /app/target/release/fynd-benchmark /usr/local/bin/fynd-benchmark

EXPOSE 3000 9898

Expand Down
Loading
Loading