Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/actions/setup-java-4
Browse files Browse the repository at this point in the history
  • Loading branch information
minikin authored Dec 18, 2023
2 parents be4c063 + fac79e7 commit 46aae61
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
11 changes: 6 additions & 5 deletions catalyst-gateway/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# 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 rustflags armv gnueabihf msvc nextest idents rustdocflags
# cspell: words rustdoc lintfix lintrestrict testfast testdocs codegen testci testunit
# 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
# $CARGO_HOME/config.toml
# NOT in the project itself.
# These targets are ONLY the targets used by CI and inside docker builds.

Expand Down Expand Up @@ -108,14 +108,15 @@ 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"
lint = "clippy --all-targets -- -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 --all-targets --fix --allow-dirty -- -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"
lintrestrict = "clippy -- -D warnings -D clippy::pedantic -D clippy::restriction -D clippy::missing_docs_in_private_items"
lint-vscode = "clippy --workspace --message-format=json-diagnostic-rendered-ansi --all-targets -- -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"

docs = "doc --workspace -r --all-features --no-deps --bins --document-private-items --examples --locked"
# 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"
testunit = "nextest run --release --bins --lib --workspace --locked -P ci"
testci = "nextest run --release --workspace --locked -P ci"
testdocs = "test --doc --release --workspace --locked"

Expand Down
12 changes: 6 additions & 6 deletions catalyst-gateway/Earthfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
VERSION 0.7

#cspell: words rustup readelf nextest testci testdocs rustfmt toolsets USERARCH
#cspell: words rustfmt toolsets USERARCH

# Set up our target toolchains, and copy our files.
builder:
FROM github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.11+rust-base
FROM github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.12+rust-base

DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.11+SETUP --toolchain=rust-toolchain.toml
DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.12+SETUP --toolchain=rust-toolchain.toml

COPY --dir .cargo .config Cargo.* clippy.toml deny.toml rustfmt.toml bin crates .

# Test rust build container - Use best architecture host tools.
check-hosted:
FROM +builder

DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.11+CHECK
DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.12+CHECK

# Test which runs check with all supported host tooling. Needs qemu or rosetta to run.
# Only used to validate tooling is working across host toolsets.
Expand All @@ -27,9 +27,9 @@ build-hosted:
# Build the service
FROM +builder

DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.11+BUILD --bins="cat-gateway/cat-gateway"
DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.12+BUILD --bins="cat-gateway/cat-gateway"

DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.11+SMOKE_TEST --bin="cat-gateway"
DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.12+SMOKE_TEST --bin="cat-gateway"

SAVE ARTIFACT target/$TARGETARCH/doc doc
SAVE ARTIFACT target/$TARGETARCH/release/cat-gateway cat-gateway
Expand Down
2 changes: 1 addition & 1 deletion catalyst-gateway/bin/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ mod tests {
fn generate_github_issue_url_test() {
let title = "Hello, World! How are you?";
assert_eq!(
generate_github_issue_url(title).unwrap().as_str(),
generate_github_issue_url(title).expect("Failed to generate url").as_str(),
"https://github.com/input-output-hk/catalyst-core/issues/new?template=bug_report.md&title=Hello%2C+World%21+How+are+you%3F"
);
}
Expand Down
3 changes: 2 additions & 1 deletion catalyst-gateway/deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ allow = [
"MIT",
"Apache-2.0",
"Unicode-DFS-2016",
"BSD-3-Clause"
"BSD-3-Clause",
"BlueOak-1.0.0"
]
# List of explicitly disallowed licenses
# See https://spdx.org/licenses/ for list of possible licenses
Expand Down

0 comments on commit 46aae61

Please sign in to comment.