diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 77c3aee..50db17d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -64,9 +64,9 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.30.4/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.32.0/cargo-dist-installer.sh | sh" - name: Cache dist - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: cargo-dist-cache path: ~/.cargo/bin/dist @@ -82,7 +82,7 @@ jobs: cat plan-dist-manifest.json echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT" - name: "Upload dist-manifest.json" - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: artifacts-plan-dist-manifest path: plan-dist-manifest.json @@ -104,7 +104,7 @@ jobs: npm install npm run build - name: Upload UI build - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: ui-dist path: ui/dist/ @@ -154,7 +154,7 @@ jobs: run: ${{ matrix.install_dist.run }} # Get the dist-manifest - name: Fetch local artifacts - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: pattern: artifacts-* path: target/distrib/ @@ -163,7 +163,7 @@ jobs: run: | ${{ matrix.packages_install }} - name: Download pre-built UI - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: name: ui-dist path: ui/dist/ @@ -186,7 +186,7 @@ jobs: cp dist-manifest.json "$BUILD_MANIFEST_NAME" - name: "Upload artifacts" - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: artifacts-build-local-${{ join(matrix.targets, '_') }} path: | @@ -208,14 +208,14 @@ jobs: persist-credentials: false submodules: recursive - name: Install cached dist - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: name: cargo-dist-cache path: ~/.cargo/bin/ - run: chmod +x ~/.cargo/bin/dist # Get all the local artifacts for the global tasks to use (for e.g. checksums) - name: Fetch local artifacts - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: pattern: artifacts-* path: target/distrib/ @@ -233,7 +233,7 @@ jobs: cp dist-manifest.json "$BUILD_MANIFEST_NAME" - name: "Upload artifacts" - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: artifacts-build-global path: | @@ -258,14 +258,14 @@ jobs: persist-credentials: false submodules: recursive - name: Install cached dist - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: name: cargo-dist-cache path: ~/.cargo/bin/ - run: chmod +x ~/.cargo/bin/dist # Fetch artifacts from scratch-storage - name: Fetch artifacts - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: pattern: artifacts-* path: target/distrib/ @@ -278,14 +278,14 @@ jobs: cat dist-manifest.json echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT" - name: "Upload dist-manifest.json" - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: # Overwrite the previous copy name: artifacts-dist-manifest path: dist-manifest.json # Create a GitHub Release while uploading all files to it - name: "Download GitHub Artifacts" - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: pattern: artifacts-* path: artifacts diff --git a/Cargo.toml b/Cargo.toml index 535b471..2cac262 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,9 +30,7 @@ tracing = "0.1.44" tracing-subscriber = { version = "0.3.23", features = ["env-filter"] } warp = { version = "0.4.3", features = ["server"] } webpki-roots = "1.0.9" - -[target.'cfg(not(target_env = "musl"))'.dependencies] -duckdb = { version = "1.10505.0", features = ["bundled"] } +duckdb = { version = "1.10505.0", features = ["bundled", "parquet"] } [profile.release] strip = true diff --git a/dist-workspace.toml b/dist-workspace.toml index e9c986f..52cf94a 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -4,7 +4,7 @@ members = ["cargo:."] # Config for 'dist' [dist] # The preferred dist version to use in CI (Cargo.toml SemVer syntax) -cargo-dist-version = "0.30.4" +cargo-dist-version = "0.32.0" # CI backends to support ci = "github" # The installers to generate for each app @@ -15,5 +15,10 @@ targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "x86_64-apple-da install-updater = true # Path that installers should place binaries in install-path = "CARGO_HOME" +# Build (but don't publish) on pull requests +pr-run-mode = "upload" # Skip checking whether the specified configuration files are up to date allow-dirty = ["ci"] + +[dist.github-custom-runners] +x86_64-unknown-linux-musl = "ubuntu-24.04-arm" diff --git a/docs/app/docs/databases/csv/page.mdx b/docs/app/docs/databases/csv/page.mdx index f9081d7..501a3c3 100644 --- a/docs/app/docs/databases/csv/page.mdx +++ b/docs/app/docs/databases/csv/page.mdx @@ -17,8 +17,6 @@ twitter: Open a local CSV file. SQL Studio uses DuckDB under the hood to query CSV files, giving you full SQL access to tabular data. -> **Note:** CSV support is not available in the musl (static Linux) build because it depends on DuckDB. Use the glibc Linux build, macOS, or Windows instead. - ## Usage ```bash diff --git a/docs/app/docs/databases/duckdb/page.mdx b/docs/app/docs/databases/duckdb/page.mdx index 5cc67ee..6e17811 100644 --- a/docs/app/docs/databases/duckdb/page.mdx +++ b/docs/app/docs/databases/duckdb/page.mdx @@ -17,8 +17,6 @@ twitter: Open a local DuckDB database file. DuckDB is an in-process analytical database, ideal for working with large datasets. -> **Note:** DuckDB support is not available in the musl (static Linux) build due to compatibility limitations. Use the glibc Linux build, macOS, or Windows instead. - ## Usage ```bash diff --git a/docs/app/docs/databases/parquet/page.mdx b/docs/app/docs/databases/parquet/page.mdx index c31df90..bd17a18 100644 --- a/docs/app/docs/databases/parquet/page.mdx +++ b/docs/app/docs/databases/parquet/page.mdx @@ -17,8 +17,6 @@ twitter: Open a local Apache Parquet file. SQL Studio uses DuckDB under the hood to query Parquet files, giving you full SQL access to columnar data. -> **Note:** Parquet support is not available in the musl (static Linux) build because it depends on DuckDB. Use the glibc Linux build, macOS, or Windows instead. - ## Usage ```bash diff --git a/src/main.rs b/src/main.rs index 6c883c1..50e21ec 100644 --- a/src/main.rs +++ b/src/main.rs @@ -74,7 +74,6 @@ enum Command { }, /// A local DuckDB database. - #[cfg(not(target_env = "musl"))] Duckdb { /// Path to the the duckdb file. #[arg(env)] @@ -82,7 +81,6 @@ enum Command { }, /// A local Parquet file. - #[cfg(not(target_env = "musl"))] Parquet { /// Path to the parquet file. #[arg(env)] @@ -90,7 +88,6 @@ enum Command { }, /// A local CSV file. - #[cfg(not(target_env = "musl"))] Csv { /// Path to the CSV file. #[arg(env)] @@ -148,15 +145,12 @@ async fn main() -> color_eyre::Result<()> { AllDbs::Postgres(postgres::Db::open(url, schema, args.timeout.into()).await?) } Command::Mysql { url } => AllDbs::Mysql(mysql::Db::open(url, args.timeout.into()).await?), - #[cfg(not(target_env = "musl"))] Command::Duckdb { database } => { AllDbs::Duckdb(duckdb::Db::open(database, args.timeout.into()).await?) } - #[cfg(not(target_env = "musl"))] Command::Parquet { file } => { AllDbs::Parquet(parquet::Db::open(file, args.timeout.into()).await?) } - #[cfg(not(target_env = "musl"))] Command::Csv { file } => AllDbs::Csv(csv::Db::open(file, args.timeout.into()).await?), Command::Clickhouse { url, @@ -356,11 +350,8 @@ enum AllDbs { Libsql(libsql::Db), Postgres(postgres::Db), Mysql(mysql::Db), - #[cfg(not(target_env = "musl"))] Duckdb(duckdb::Db), - #[cfg(not(target_env = "musl"))] Parquet(parquet::Db), - #[cfg(not(target_env = "musl"))] Csv(csv::Db), Clickhouse(Box), MsSql(mssql::Db), @@ -373,11 +364,8 @@ impl Database for AllDbs { AllDbs::Libsql(x) => x.overview().await, AllDbs::Postgres(x) => x.overview().await, AllDbs::Mysql(x) => x.overview().await, - #[cfg(not(target_env = "musl"))] AllDbs::Duckdb(x) => x.overview().await, - #[cfg(not(target_env = "musl"))] AllDbs::Parquet(x) => x.overview().await, - #[cfg(not(target_env = "musl"))] AllDbs::Csv(x) => x.overview().await, AllDbs::Clickhouse(x) => x.overview().await, AllDbs::MsSql(x) => x.overview().await, @@ -390,11 +378,8 @@ impl Database for AllDbs { AllDbs::Libsql(x) => x.tables().await, AllDbs::Postgres(x) => x.tables().await, AllDbs::Mysql(x) => x.tables().await, - #[cfg(not(target_env = "musl"))] AllDbs::Duckdb(x) => x.tables().await, - #[cfg(not(target_env = "musl"))] AllDbs::Parquet(x) => x.tables().await, - #[cfg(not(target_env = "musl"))] AllDbs::Csv(x) => x.tables().await, AllDbs::Clickhouse(x) => x.tables().await, AllDbs::MsSql(x) => x.tables().await, @@ -407,11 +392,8 @@ impl Database for AllDbs { AllDbs::Libsql(x) => x.table(name).await, AllDbs::Postgres(x) => x.table(name).await, AllDbs::Mysql(x) => x.table(name).await, - #[cfg(not(target_env = "musl"))] AllDbs::Duckdb(x) => x.table(name).await, - #[cfg(not(target_env = "musl"))] AllDbs::Parquet(x) => x.table(name).await, - #[cfg(not(target_env = "musl"))] AllDbs::Csv(x) => x.table(name).await, AllDbs::Clickhouse(x) => x.table(name).await, AllDbs::MsSql(x) => x.table(name).await, @@ -428,11 +410,8 @@ impl Database for AllDbs { AllDbs::Libsql(x) => x.table_data(name, page).await, AllDbs::Postgres(x) => x.table_data(name, page).await, AllDbs::Mysql(x) => x.table_data(name, page).await, - #[cfg(not(target_env = "musl"))] AllDbs::Duckdb(x) => x.table_data(name, page).await, - #[cfg(not(target_env = "musl"))] AllDbs::Parquet(x) => x.table_data(name, page).await, - #[cfg(not(target_env = "musl"))] AllDbs::Csv(x) => x.table_data(name, page).await, AllDbs::Clickhouse(x) => x.table_data(name, page).await, AllDbs::MsSql(x) => x.table_data(name, page).await, @@ -445,11 +424,8 @@ impl Database for AllDbs { AllDbs::Libsql(x) => x.tables_with_columns().await, AllDbs::Postgres(x) => x.tables_with_columns().await, AllDbs::Mysql(x) => x.tables_with_columns().await, - #[cfg(not(target_env = "musl"))] AllDbs::Duckdb(x) => x.tables_with_columns().await, - #[cfg(not(target_env = "musl"))] AllDbs::Parquet(x) => x.tables_with_columns().await, - #[cfg(not(target_env = "musl"))] AllDbs::Csv(x) => x.tables_with_columns().await, AllDbs::Clickhouse(x) => x.tables_with_columns().await, AllDbs::MsSql(x) => x.tables_with_columns().await, @@ -462,11 +438,8 @@ impl Database for AllDbs { AllDbs::Libsql(x) => x.query(query).await, AllDbs::Postgres(x) => x.query(query).await, AllDbs::Mysql(x) => x.query(query).await, - #[cfg(not(target_env = "musl"))] AllDbs::Duckdb(x) => x.query(query).await, - #[cfg(not(target_env = "musl"))] AllDbs::Parquet(x) => x.query(query).await, - #[cfg(not(target_env = "musl"))] AllDbs::Csv(x) => x.query(query).await, AllDbs::Clickhouse(x) => x.query(query).await, AllDbs::MsSql(x) => x.query(query).await, @@ -479,11 +452,8 @@ impl Database for AllDbs { AllDbs::Libsql(x) => x.erd().await, AllDbs::Postgres(x) => x.erd().await, AllDbs::Mysql(x) => x.erd().await, - #[cfg(not(target_env = "musl"))] AllDbs::Duckdb(x) => x.erd().await, - #[cfg(not(target_env = "musl"))] AllDbs::Parquet(x) => x.erd().await, - #[cfg(not(target_env = "musl"))] AllDbs::Csv(x) => x.erd().await, AllDbs::Clickhouse(x) => x.erd().await, AllDbs::MsSql(x) => x.erd().await, @@ -2770,7 +2740,6 @@ mod mysql { } } -#[cfg(not(target_env = "musl"))] mod duckdb { use color_eyre::eyre; use color_eyre::eyre::OptionExt; @@ -3255,7 +3224,6 @@ mod duckdb { } } -#[cfg(not(target_env = "musl"))] mod parquet { use color_eyre::eyre; use color_eyre::eyre::OptionExt; @@ -3583,7 +3551,6 @@ mod parquet { } } -#[cfg(not(target_env = "musl"))] mod csv { use color_eyre::eyre; use color_eyre::eyre::OptionExt; @@ -5066,7 +5033,6 @@ mod mssql { } mod helpers { - #[cfg(not(target_env = "musl"))] use duckdb::types::ValueRef as DuckdbValue; use libsql::Value as LibsqlValue; use tiberius::ColumnData; @@ -5106,7 +5072,6 @@ mod helpers { } } - #[cfg(not(target_env = "musl"))] pub fn duckdb_value_to_json(v: DuckdbValue) -> serde_json::Value { use DuckdbValue::*; match v {