diff --git a/.github/workflows/rust-tests.yml b/.github/workflows/rust-tests.yml index 47a9958..4e8deba 100644 --- a/.github/workflows/rust-tests.yml +++ b/.github/workflows/rust-tests.yml @@ -13,16 +13,13 @@ on: env: CARGO_TERM_COLOR: always RUST_BACKTRACE: 1 - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }}/ci-rust - IMAGE_NAME_VERSION: "0.1.0" jobs: check: runs-on: ubuntu-latest if: github.ref_type != 'tag' container: - image: ghcr.io/${{ github.repository }}/ci-rust:1.0.0 + image: ghcr.io/bitshock-src/switchgear/ci-rust:1.0.0 options: -v /var/run/docker.sock:/var/run/docker.sock volumes: - /var/run/docker.sock:/var/run/docker.sock diff --git a/Cargo.lock b/Cargo.lock index f5ba866..3d62a99 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3883,7 +3883,7 @@ dependencies = [ [[package]] name = "sqlx" version = "0.8.6" -source = "git+https://github.com/bitshock-src/sqlx.git?branch=issues-960-v0.8.6#56ec38aefda52ff14435984318046968aa322c85" +source = "git+https://github.com/bitshock-src/sqlx.git?tag=rustls-native-certs-aws-lc-rs#b37c0878e3b24e118af1c5304e251d77d00f0bf2" dependencies = [ "sqlx-core", "sqlx-macros", @@ -3895,7 +3895,7 @@ dependencies = [ [[package]] name = "sqlx-core" version = "0.8.6" -source = "git+https://github.com/bitshock-src/sqlx.git?branch=issues-960-v0.8.6#56ec38aefda52ff14435984318046968aa322c85" +source = "git+https://github.com/bitshock-src/sqlx.git?tag=rustls-native-certs-aws-lc-rs#b37c0878e3b24e118af1c5304e251d77d00f0bf2" dependencies = [ "base64", "bytes", @@ -3932,7 +3932,7 @@ dependencies = [ [[package]] name = "sqlx-macros" version = "0.8.6" -source = "git+https://github.com/bitshock-src/sqlx.git?branch=issues-960-v0.8.6#56ec38aefda52ff14435984318046968aa322c85" +source = "git+https://github.com/bitshock-src/sqlx.git?tag=rustls-native-certs-aws-lc-rs#b37c0878e3b24e118af1c5304e251d77d00f0bf2" dependencies = [ "proc-macro2", "quote", @@ -3944,7 +3944,7 @@ dependencies = [ [[package]] name = "sqlx-macros-core" version = "0.8.6" -source = "git+https://github.com/bitshock-src/sqlx.git?branch=issues-960-v0.8.6#56ec38aefda52ff14435984318046968aa322c85" +source = "git+https://github.com/bitshock-src/sqlx.git?tag=rustls-native-certs-aws-lc-rs#b37c0878e3b24e118af1c5304e251d77d00f0bf2" dependencies = [ "dotenvy", "either", @@ -3968,7 +3968,7 @@ dependencies = [ [[package]] name = "sqlx-mysql" version = "0.8.6" -source = "git+https://github.com/bitshock-src/sqlx.git?branch=issues-960-v0.8.6#56ec38aefda52ff14435984318046968aa322c85" +source = "git+https://github.com/bitshock-src/sqlx.git?tag=rustls-native-certs-aws-lc-rs#b37c0878e3b24e118af1c5304e251d77d00f0bf2" dependencies = [ "atoi", "base64", @@ -4011,7 +4011,7 @@ dependencies = [ [[package]] name = "sqlx-postgres" version = "0.8.6" -source = "git+https://github.com/bitshock-src/sqlx.git?branch=issues-960-v0.8.6#56ec38aefda52ff14435984318046968aa322c85" +source = "git+https://github.com/bitshock-src/sqlx.git?tag=rustls-native-certs-aws-lc-rs#b37c0878e3b24e118af1c5304e251d77d00f0bf2" dependencies = [ "atoi", "base64", @@ -4049,7 +4049,7 @@ dependencies = [ [[package]] name = "sqlx-sqlite" version = "0.8.6" -source = "git+https://github.com/bitshock-src/sqlx.git?branch=issues-960-v0.8.6#56ec38aefda52ff14435984318046968aa322c85" +source = "git+https://github.com/bitshock-src/sqlx.git?tag=rustls-native-certs-aws-lc-rs#b37c0878e3b24e118af1c5304e251d77d00f0bf2" dependencies = [ "atoi", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 3fbf592..65eba1b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,15 @@ members = [ resolver = "2" +[workspace.package] +version = "0.1.15" + +[workspace.dependencies] +switchgear-pingora = { version = "0.1.15", path = "pingora" } +switchgear-service = { version = "0.1.15", path = "service" } +switchgear-migration = { version = "0.1.15", path = "migration" } +switchgear-testing = { version = "0.1.15", path = "testing" } + [profile.release] lto = true @@ -19,10 +28,10 @@ strip = true [patch.crates-io] -sqlx = { git = "https://github.com/bitshock-src/sqlx.git", branch = "issues-960-v0.8.6" } -sqlx-core ={ git = "https://github.com/bitshock-src/sqlx.git", branch = "issues-960-v0.8.6" } -sqlx-macros = { git = "https://github.com/bitshock-src/sqlx.git", branch = "issues-960-v0.8.6" } -sqlx-macros-core = { git = "https://github.com/bitshock-src/sqlx.git", branch = "issues-960-v0.8.6" } -sqlx-mysql = { git = "https://github.com/bitshock-src/sqlx.git", branch = "issues-960-v0.8.6" } -sqlx-postgres = { git = "https://github.com/bitshock-src/sqlx.git", branch = "issues-960-v0.8.6" } -sqlx-sqlite = { git = "https://github.com/bitshock-src/sqlx.git", branch = "issues-960-v0.8.6" } +sqlx = { git = "https://github.com/bitshock-src/sqlx.git", tag = "rustls-native-certs-aws-lc-rs" } +sqlx-core ={ git = "https://github.com/bitshock-src/sqlx.git", tag = "rustls-native-certs-aws-lc-rs" } +sqlx-macros = { git = "https://github.com/bitshock-src/sqlx.git", tag = "rustls-native-certs-aws-lc-rs" } +sqlx-macros-core = { git = "https://github.com/bitshock-src/sqlx.git", tag = "rustls-native-certs-aws-lc-rs" } +sqlx-mysql = { git = "https://github.com/bitshock-src/sqlx.git", tag = "rustls-native-certs-aws-lc-rs" } +sqlx-postgres = { git = "https://github.com/bitshock-src/sqlx.git", tag = "rustls-native-certs-aws-lc-rs" } +sqlx-sqlite = { git = "https://github.com/bitshock-src/sqlx.git", tag = "rustls-native-certs-aws-lc-rs" } diff --git a/migration/Cargo.toml b/migration/Cargo.toml index abc27ef..06c5960 100644 --- a/migration/Cargo.toml +++ b/migration/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "switchgear-migration" -version = "0.1.15" +version.workspace = true edition = "2021" authors = ["Bitshock "] description = "Database migrations for Switchgear LNURL load balancer" diff --git a/pingora/Cargo.toml b/pingora/Cargo.toml index 28bd388..63572c0 100644 --- a/pingora/Cargo.toml +++ b/pingora/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "switchgear-pingora" -version = "0.1.15" +version.workspace = true edition = "2021" authors = ["Bitshock "] description = "Pingora-based load balancer implementation for Switchgear LNURL payment infrastructure" @@ -18,7 +18,7 @@ async-trait = "0.1" axum = { version = "0.8", features = ["macros"] } backoff = { version = "0.4", features = ["tokio"] } chrono = { version = "0.4", features = ["serde"] } -switchgear-service = { version = "0.1.7", path = "../service" } +switchgear-service.workspace = true log = "0.4" pingora-core = { version = "0.6", default-features = false } pingora-error = { version = "0.6", default-features = false } diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..911f2b3 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,4 @@ +[toolchain] +channel = "1.91.1" +profile = "minimal" +components = ["rustfmt", "clippy"] diff --git a/server/Cargo.toml b/server/Cargo.toml index 43967f9..885dd6e 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "switchgear-server" -version = "0.1.15" +version.workspace = true edition = "2021" authors = ["Bitshock "] description = "High availability LNURL load balancer server for enterprise Bitcoin Lightning payment providers" @@ -37,8 +37,8 @@ shellexpand = "3.1" signal-hook = "0.3" signal-hook-tokio = { version = "0.3", features = ["futures-v0_3"] } simplelog = {version = "0.12", features = ["paris"] } -switchgear-pingora = { version = "0.1.7",path = "../pingora" } -switchgear-service = { version = "0.1.7",path = "../service" } +switchgear-pingora.workspace = true +switchgear-service.workspace = true tokio = { version = "1", features = ["full"] } url = { version = "2.5", features = ["serde"] } uuid = { version = "1.18", features = ["v4", "serde"] } @@ -46,7 +46,7 @@ uuid = { version = "1.18", features = ["v4", "serde"] } [dev-dependencies] chrono = { version = "0.4", features = ["serde"] } lightning-invoice = { version = "0.33", features = ["serde", "std"] } -switchgear-testing = { version = "0.1.7", path = "../testing" } +switchgear-testing.workspace = true rcgen = { version = "0.14", default-features = false, features = ["crypto", "aws_lc_rs", "pem"] } reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls-native-roots-no-provider"] } serde-saphyr = "0.0.10" diff --git a/service/Cargo.toml b/service/Cargo.toml index 7bbcf6d..7abe2c0 100644 --- a/service/Cargo.toml +++ b/service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "switchgear-service" -version = "0.1.15" +version.workspace = true edition = "2021" authors = ["Bitshock "] description = "Service layer and API implementations for Switchgear LNURL load balancer" @@ -40,8 +40,8 @@ secp256k1 = { version = "0.31", features = ["recovery", "serde"] } serde = "1.0" serde_json = "1.0" sha2 = "0.10" -sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio", "tls-rustls-no-provider-native-roots", "sqlite", "postgres", "mysql"] } -switchgear-migration = { version = "0.1.7", path = "../migration" } +sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio", "tls-rustls-aws-lc-rs", "sqlite", "postgres", "mysql"] } +switchgear-migration.workspace = true tempfile = "3.23" thiserror = "2.0" tokio = { version = "1", features = ["full"] } @@ -67,4 +67,4 @@ rand = "0.8" rqrr = "0.10" rustls = { version = "0.23", features = ["aws-lc-rs"] } secp256k1_0_29 = { package = "secp256k1", version = "0.29", features = ["recovery", "serde"] } -switchgear-testing = { version = "0.1.7", path = "../testing" } +switchgear-testing.workspace = true diff --git a/switchgear/Cargo.toml b/switchgear/Cargo.toml index 2c9be26..98287e7 100644 --- a/switchgear/Cargo.toml +++ b/switchgear/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "switchgear" -version = "0.1.15" +version.workspace = true edition = "2021" authors = ["Bitshock "] description = "High availability LNURL load balancer server for enterprise Bitcoin Lightning payment providers" diff --git a/testing/Cargo.toml b/testing/Cargo.toml index 97f8537..21db066 100644 --- a/testing/Cargo.toml +++ b/testing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "switchgear-testing" -version = "0.1.15" +version.workspace = true edition = "2021" authors = ["Bitshock "] description = "CI Integration Testing Framework for Switchgear" @@ -22,4 +22,4 @@ tar = "0.4" tempfile = "3.23" ureq = { version = "3.1", default-features = false } tokio = { version = "1", features = ["full"] } -sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio", "tls-rustls-no-provider-native-roots", "sqlite", "postgres", "mysql"] } +sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio", "tls-rustls-aws-lc-rs", "sqlite", "postgres", "mysql"] }