diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 3cf92b80eec..287faf619c7 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -64,6 +64,25 @@ builds: ldflags: - -s -w -X main.Version={{.Version}} -X main.Commit={{.ShortCommit}} -X main.BuildDate={{.Date}} + - id: linux_aarch64 + main: ./cli/main.go + binary: rill + goos: + - linux + goarch: + - arm64 + env: + - CC=aarch64-linux-gnu-gcc + - CXX=aarch64-linux-gnu-g++ + - CGO_CFLAGS=--sysroot=/sysroot/linux/arm64 + - CGO_LDFLAGS=--sysroot=/sysroot/linux/arm64 + - PKG_CONFIG_SYSROOT_DIR=/sysroot/linux/arm64 + - PKG_CONFIG_PATH=/sysroot/linux/arm64/usr/local/lib/pkgconfig + flags: + - "-mod=readonly" + ldflags: + - -s -w -X main.Version={{.Version}} -X main.Commit={{.ShortCommit}} -X main.BuildDate={{.Date}} + blobs: - provider: gs bucket: prod-cdn.rilldata.com diff --git a/runtime/drivers/duckdb/extensions/embed/linux_arm64/.gitkeep b/runtime/drivers/duckdb/extensions/embed/linux_arm64/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/runtime/drivers/duckdb/extensions/extensions_linux_arm64.go b/runtime/drivers/duckdb/extensions/extensions_linux_arm64.go new file mode 100644 index 00000000000..c29474a1738 --- /dev/null +++ b/runtime/drivers/duckdb/extensions/extensions_linux_arm64.go @@ -0,0 +1,8 @@ +//go:build linux && arm64 + +package extensions + +import "embed" + +//go:embed embed/linux_arm64/* +var embeddedFiles embed.FS diff --git a/scripts/embed_duckdb_ext/main.go b/scripts/embed_duckdb_ext/main.go index 2d9d4da12b4..4960481f6be 100644 --- a/scripts/embed_duckdb_ext/main.go +++ b/scripts/embed_duckdb_ext/main.go @@ -16,7 +16,7 @@ import ( var extensions = []string{"json", "icu", "parquet", "httpfs", "sqlite_scanner", "motherduck"} // DuckDB platforms to download extensions for -var platforms = []string{"linux_amd64", "osx_amd64", "osx_arm64"} +var platforms = []string{"linux_amd64", "linux_arm64", "osx_amd64", "osx_arm64"} // Embed directory to store the extensions var embedDirRoot = "runtime/drivers/duckdb/extensions/embed/" diff --git a/scripts/install.sh b/scripts/install.sh index d7cea2b6334..96b42c0fb62 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -10,6 +10,8 @@ initPlatform() { PLATFORM="darwin_amd64" elif [ "$OS" = "linux" ] && [ "$ARCH" = "x86_64" ]; then PLATFORM="linux_amd64" + elif [ "$OS" = "linux" ] && { [ "$ARCH" = "arm64" ] || [ "$ARCH" = "aarch64" ]; }; then + PLATFORM="linux_arm64" else printf "Platform not supported: os=%s arch=%s\n" "$OS" "$ARCH" exit 1