Skip to content

Commit

Permalink
Merge branch 'main' into feature/poc-flutter-integration-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
minikin committed Nov 1, 2023
2 parents 14677a4 + 9674ce4 commit c7f482a
Show file tree
Hide file tree
Showing 100 changed files with 7,456 additions and 7,078 deletions.
3 changes: 0 additions & 3 deletions .cargo/README.md

This file was deleted.

2 changes: 2 additions & 0 deletions .config/dictionaries/project.dic
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
aarch
addrr
adminer
auditability
Expand All @@ -11,6 +12,7 @@ coti
cryptoxide
dbsync
delegators
dockerhub
dotenv
dotenvy
dotglob
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI

on:
push:

permissions:
id-token: write
contents: write
packages: write

jobs:
ci:
uses: input-output-hk/catalyst-ci/.github/workflows/ci.yml@master
with:
aws_ecr_registry: 332405224602.dkr.ecr.eu-central-1.amazonaws.com
aws_role_arn: arn:aws:iam::332405224602:role/ci
aws_region: eu-central-1
secrets:
deployment_token: ${{ secrets.CI_BOT_TOKEN }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
earthly_runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }}
earthly_runner_secret: ${{ secrets.EARTHLY_RUNNER_SECRET }}
2 changes: 1 addition & 1 deletion .github/workflows/stale-branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Stale Branches
uses: crs-k/stale-branches@v2.0.1
uses: crs-k/stale-branches@v3.0.1
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
days-before-stale: 30
Expand Down
6 changes: 5 additions & 1 deletion .vscode/settings.recommended.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,9 @@
"bash",
"-c",
"cargo lint-vscode"
]
],
"rust-analyzer.rustfmt.extraArgs": [
"+nightly"
],
"rust-analyzer.lens.enable": true
}
8 changes: 1 addition & 7 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,4 @@ spell-check:
LOCALLY

DO github.com/input-output-hk/catalyst-ci/earthly/cspell:v1.3.0+CSPELL_LOCALLY --src=$(echo ${PWD})

global-cargo-config:
# Needed to get the global cargo config when building rust.
# All because Earthly doesn't support copying files from parents.
FROM scratch
COPY --dir .cargo .cargo
SAVE ARTIFACT .cargo .cargo

84 changes: 81 additions & 3 deletions .cargo/config.toml → catalyst-gateway/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
# cspell: words rustflags idents rustdocflags rustdoc lintfix lintrestrict testfast nextest testci testdocs
# Use MOLD linker where possible, but ONLY in CI applicable targets.
# cspell: words rustflags armv gnueabihf msvc nextest idents rustdocflags
# cspell: words rustdoc lintfix lintrestrict testfast testdocs codegen testci
# cspell: words fmtchk fmtfix

# Configure how Docker container targets build.

# If you want to customize these targets for a local build, then customize them in you:
# $CARGO_HOME/config.toml
# NOT in the project itself.
# These targets are ONLY the targets used by CI and inside docker builds.

# DO NOT remove `"-C", "target-feature=+crt-static"` from the rustflags for these targets.

# Should be the default to have fully static rust programs in CI
[target.x86_64-unknown-linux-musl]
linker = "clang"
rustflags = [
"-C", "link-arg=-fuse-ld=/usr/bin/mold",
"-C", "target-feature=-crt-static"
]

# Should be the default to have fully static rust programs in CI
[target.aarch64-unknown-linux-musl]
linker = "clang"
rustflags = [
"-C", "link-arg=-fuse-ld=/usr/bin/mold",
"-C", "target-feature=-crt-static"
]


[build]
target = "x86_64-unknown-linux-musl"

rustflags = [
"-D",
Expand Down Expand Up @@ -38,6 +67,44 @@ rustdocflags = [
"rustdoc::unescaped_backticks",
]

[profile.dev]
opt-level = 1
debug = true
debug-assertions = true
overflow-checks = true
lto = false
panic = 'unwind'
incremental = true
codegen-units = 256

[profile.release]
opt-level = 3
debug = false
debug-assertions = false
overflow-checks = false
lto = "thin"
panic = 'unwind'
incremental = false
codegen-units = 16

[profile.test]
opt-level = 3
debug = true
lto = false
debug-assertions = true
incremental = true
codegen-units = 256

[profile.bench]
opt-level = 3
debug = false
debug-assertions = false
overflow-checks = false
lto = "thin"
incremental = false
codegen-units = 16


[alias]
lint = "clippy -- -D warnings -D clippy::pedantic -D clippy::unwrap_used -D clippy::expect_used -D clippy::exit -D clippy::get_unwrap -D clippy::index_refutable_slice -D clippy::indexing_slicing -D clippy::match_on_vec_items -D clippy::match_wild_err_arm -D clippy::missing_panics_doc -D clippy::panic -D clippy::string_slice -D clippy::unchecked_duration_subtraction -D clippy::unreachable -D clippy::missing_docs_in_private_items"
lintfix = "clippy -- -D warnings -D clippy::pedantic -D clippy::unwrap_used -D clippy::expect_used -D clippy::exit -D clippy::get_unwrap -D clippy::index_refutable_slice -D clippy::indexing_slicing -D clippy::match_on_vec_items -D clippy::match_wild_err_arm -D clippy::missing_panics_doc -D clippy::panic -D clippy::string_slice -D clippy::unchecked_duration_subtraction -D clippy::unreachable"
Expand All @@ -48,4 +115,15 @@ docs = "doc --workspace -r --all-features --no-deps --bins --document-private-it
# nightly docs build broken... when they are'nt we can enable these docs... --unit-graph --timings=html,json -Z unstable-options"
testfast = "nextest run --release --workspace --locked"
testci = "nextest run --release --workspace --locked -P ci"
testdocs = "test --doc --release --workspace --locked --doc"
testdocs = "test --doc --release --workspace --locked"

# Rust formatting, MUST be run with +nightly
fmtchk = "fmt -- --check -v --color=always"
fmtfix = "fmt -- -v"

[term]
quiet = false # whether cargo output is quiet
verbose = true # whether cargo provides verbose output
color = 'always' # whether cargo colorizes output use `CARGO_TERM_COLOR="off"` to disable.
progress.when = 'auto' # whether cargo shows progress bar
progress.width = 80 # width of progress bar
Loading

0 comments on commit c7f482a

Please sign in to comment.