-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
81 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
.env | ||
/benchmark/tpch-kit | ||
/benchmark/data/*.tbl | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Changelog | ||
|
||
### v0.1.0 - 2024-10-06 | ||
|
||
- Create initial version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ARG PLATFORM | ||
ARG GOOS | ||
ARG GOARCH | ||
|
||
FROM --platform=$PLATFORM golang:1.23 | ||
|
||
WORKDIR /app | ||
|
||
COPY src/go.mod src/go.sum ./ | ||
RUN go mod download | ||
|
||
COPY src/ . | ||
RUN CGO_ENABLED=1 GOOS=$GOOS GOARCH=$GOARCH go build -o /app/bemidb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
platforms=("linux/amd64" "linux/arm64") | ||
|
||
for platform in "${platforms[@]}" | ||
do | ||
os="${platform%/*}" | ||
arch="${platform#*/}" | ||
echo "Building bemidb for $os/$arch" | ||
|
||
docker buildx build \ | ||
--build-arg PLATFORM=$platform \ | ||
--build-arg GOOS=$os \ | ||
--build-arg GOARCH="$arch" \ | ||
-t bemidb-build:$os-$arch . | ||
|
||
docker create --name temp-container bemidb-build:$os-$arch | ||
docker cp temp-container:/app/bemidb ./build/bemidb-$os-$arch | ||
docker rm temp-container | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
VERSION="0.1.0" | ||
|
||
# Detect OS and architecture | ||
OS=$(uname -s | tr '[:upper:]' '[:lower:]') | ||
ARCH=$(uname -m) | ||
|
||
# Map architecture to Go naming convention | ||
case $ARCH in | ||
x86_64|amd64) | ||
ARCH="amd64" | ||
;; | ||
aarch64|arm64) | ||
ARCH="arm64" | ||
;; | ||
*) | ||
echo "Unsupported architecture: $ARCH" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
# Set the download URL and binary name | ||
BINARY_NAME="bemidb-${OS}-${ARCH}" | ||
DOWNLOAD_URL="https://github.com/BemiHQ/BemiDB/releases/download/v$VERSION/$BINARY_NAME" | ||
|
||
# Download the binary | ||
echo "Downloading $DOWNLOAD_URL..." | ||
curl -L "$DOWNLOAD_URL" -o ./bemidb | ||
|
||
# Make the binary executable | ||
chmod +x ./bemidb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters