Skip to content

Commit

Permalink
Merge branch 'main' into refactor/registration_dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
damian-molinski authored Oct 4, 2024
2 parents aa70977 + ed8dc74 commit a4aa601
Show file tree
Hide file tree
Showing 40 changed files with 823 additions and 476 deletions.
1 change: 1 addition & 0 deletions .config/dictionaries/project.dic
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ Subkey
submiting
subosito
svgs
syncable
SYSROOT
tablestats
tacho
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: CI
on:
push:
branches: [main]
tags: ['*']
pull_request:

permissions:
Expand All @@ -15,4 +16,4 @@ jobs:
ci:
uses: input-output-hk/catalyst-forge/.github/workflows/ci.yml@ci/v1.1.0
with:
forge_version: 0.2.0
forge_version: 0.2.1
6 changes: 3 additions & 3 deletions Earthfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.2.10 AS mdlint-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.2.10 AS cspell-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/postgresql:v3.2.10 AS postgresql-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.2.14 AS mdlint-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.2.14 AS cspell-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/postgresql:v3.2.14 AS postgresql-ci

FROM debian:stable-slim

Expand Down
13 changes: 13 additions & 0 deletions blueprint.cue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ global: {
path: "global/ci/docker"
}

git: credentials: {
provider: "aws"
path: "global/ci/deploy"
}

earthly: {
credentials: {
provider: "aws"
Expand All @@ -48,4 +53,12 @@ global: {
strategy: "commit"
}
}
deployment: {
registry: ci.providers.aws.registry
repo: {
url: "https://github.com/input-output-hk/catalyst-world"
ref: "master"
}
root: "k8s"
}
}
63 changes: 54 additions & 9 deletions catalyst-gateway/Earthfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,42 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.2.10 AS rust-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.2.14 AS rust-ci

#cspell: words rustfmt toolsets USERARCH stdcfgs

# COPY_SRC:
# Copies the source code into the builder.
COPY_SRC:
FUNCTION

COPY --keep-ts --dir \
.cargo .config Cargo.toml clippy.toml deny.toml rustfmt.toml \
bin \
.

# builder : Set up our target toolchains, and copy our files.
builder:
DO rust-ci+SETUP

# sync-cfg: Synchronize local config with CI version.
# Must be run by the developer manually.
sync-cfg:
FROM +builder
DO rust-ci+SYNC_STD_CFG

# builder : Set up our target toolchains, and copy our files.
builder:
DO rust-ci+SETUP
builder-src:
FROM +builder

# Don't build the src in the home directory itself, because it contains stuff.
WORKDIR $HOME/build
RUN rm -rf *

COPY --dir .cargo .config Cargo.* clippy.toml deny.toml rustfmt.toml bin .
# Cached copy of the source we build.
DO +COPY_SRC

# Generate Checksums of the source
DO rust-ci+FINGERPRINT_SRC
SAVE ARTIFACT ../src_fingerprint.txt

## -----------------------------------------------------------------------------
##
Expand All @@ -24,7 +47,7 @@ builder:
# check : Run check using the most efficient host tooling
# CI Automated Entry point.
check:
FROM +builder
FROM +builder-src

DO rust-ci+EXECUTE --cmd="/scripts/std_checks.py"

Expand All @@ -36,12 +59,12 @@ all-hosts-check:
# build : Build the catalyst-gateway service
build:
# Build the service
FROM +builder
FROM +builder-src

DO rust-ci+EXECUTE \
--cmd="/scripts/std_build.py" \
--args1="--bins=cat-gateway/cat-gateway" \
--args2="--cov_report=$HOME/coverage-report.info" \
--args2="--cov_report=$HOME/build/coverage-report.info" \
--output="release/cat-gateway" \
--junit="cat-gateway.junit-report.xml" \
--coverage="cat-gateway.coverage.info" \
Expand Down Expand Up @@ -81,4 +104,26 @@ package-cat-gateway:
get-api-locally:
FROM scratch
COPY +build/doc/cat-gateway-api.json cat-gateway-api.json
SAVE ARTIFACT cat-gateway-api.json AS LOCAL cat-gateway-api.json
SAVE ARTIFACT cat-gateway-api.json AS LOCAL cat-gateway-api.json

# build-src-check: Check for any caching issues with the source we are building against.
check-builder-src-cache:
FROM +builder

# Don't build the src in the home directory itself, because it contains stuff.
WORKDIR $HOME/build
RUN rm -rf *

COPY +builder-src/src_fingerprint.txt ..

RUN --no-cache echo "Cache Disabled"

# Uncached copy of the source we build.
DO +COPY_SRC

# Generate Checksums of the source
DO rust-ci+FINGERPRINT_SRC --FINGERPRINT=src_fingerprint_uncached.txt

RUN diff ../src_fingerprint.txt ../src_fingerprint_uncached.txt \
|| (echo "ERROR: Source fingerprints do not match. Caching Error Detected!!" && exit 1) \
&& echo "Source fingerprints match. Caching OK."
4 changes: 3 additions & 1 deletion catalyst-gateway/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ run-cat-gateway: build-cat-gateway

# Run cat-gateway natively on mainnet
run-cat-gateway-mainnet: build-cat-gateway
CHAIN_FOLLOWER_SYNC_TASKS="1" \
CHAIN_FOLLOWER_SYNC_TASKS="32" \
CHAIN_FOLLOWER_DL_CONNECTIONS="64" \
CHAIN_FOLLOWER_DL_CHUNK_SIZE="4" \
RUST_LOG="error,cat_gateway=debug,cardano_chain_follower=debug,mithril-client=debug" \
./target/release/cat-gateway run --log-level debug
Loading

0 comments on commit a4aa601

Please sign in to comment.