diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 71894be..85eddd9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,21 +18,27 @@ jobs: - target: x86_64-unknown-linux-gnu os: ubuntu-latest archive: tar.gz + cargo_features: "" - target: x86_64-unknown-linux-musl os: ubuntu-latest archive: tar.gz + cargo_features: "--features vendored-tls" - target: aarch64-unknown-linux-gnu os: ubuntu-latest archive: tar.gz + cargo_features: "--features vendored-tls" - target: x86_64-apple-darwin os: macos-latest archive: tar.gz + cargo_features: "" - target: aarch64-apple-darwin os: macos-latest archive: tar.gz + cargo_features: "" - target: x86_64-pc-windows-msvc os: windows-latest archive: zip + cargo_features: "" steps: - uses: actions/checkout@v6 @@ -56,9 +62,11 @@ jobs: run: sudo apt-get install -y musl-tools - name: Build - run: cargo build --release --locked --target ${{ matrix.target }} + run: cargo build --release --locked --target ${{ matrix.target }} ${{ matrix.cargo_features }} env: CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc + CC_aarch64_unknown_linux_gnu: aarch64-linux-gnu-gcc + CC_x86_64_unknown_linux_musl: musl-gcc - name: Package (unix) if: matrix.archive == 'tar.gz' diff --git a/Cargo.lock b/Cargo.lock index 9a1425e..9c696ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -607,7 +607,7 @@ dependencies = [ [[package]] name = "dbdiff" -version = "0.2.0" +version = "0.2.1" dependencies = [ "assert_cmd", "clap", @@ -616,6 +616,7 @@ dependencies = [ "indicatif", "mysql_async", "native-tls", + "openssl", "postgres-native-tls", "predicates", "regex", @@ -1577,6 +1578,15 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" +[[package]] +name = "openssl-src" +version = "300.6.0+3.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8e8cbfd3a4a8c8f089147fd7aaa33cf8c7450c4d09f8f80698a0cf093abeff4" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.112" @@ -1585,6 +1595,7 @@ checksum = "57d55af3b3e226502be1526dfdba67ab0e9c96fc293004e79576b2b9edb0dbdb" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] diff --git a/Cargo.toml b/Cargo.toml index 30dd8b2..a5db987 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dbdiff" -version = "0.2.0" +version = "0.2.1" edition = "2021" rust-version = "1.75" authors = ["rekurt"] @@ -30,6 +30,7 @@ default = ["postgres", "mysql", "sqlite"] postgres = ["dep:tokio-postgres", "dep:postgres-native-tls", "dep:native-tls"] mysql = ["dep:mysql_async"] sqlite = ["dep:rusqlite"] +vendored-tls = ["dep:openssl"] [dependencies] clap = { version = "4", features = ["derive"] } @@ -39,6 +40,7 @@ tokio-postgres = { version = "0.7", optional = true } postgres-native-tls = { version = "0.5", optional = true } native-tls = { version = "0.2", optional = true } mysql_async = { version = "0.34", optional = true } +openssl = { version = "0.10", features = ["vendored"], optional = true } rusqlite = { version = "0.39", features = ["bundled"], optional = true } colored = "3" indicatif = "0.18"