Skip to content

Commit

Permalink
Updated to add linux/arm64 support
Browse files Browse the repository at this point in the history
  • Loading branch information
maoueh committed Aug 30, 2023
1 parent 6eab715 commit b9f3208
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .sfreleaser
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ global:
language: golang
variant: application
release:
goreleaser-docker-image: ghcr.io/streamingfast/substreams-sink-kv-builder:v1.20.3
goreleaser-docker-image: ghcr.io/streamingfast/substreams-sink-kv-builder:v1.20.5
upload-substreams-spkg: substreams.yaml
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ You can inspect badger files written by this tool with:
go install github.com/streamingfast/kvdb/cmd/kvdb@develop
```


## License

[Apache 2.0](https://github.com/streamingfast/substreams/blob/develop/LICENSE/README.md).
Expand Down
12 changes: 11 additions & 1 deletion devel/docker/Dockerfile.builder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM --platform=linux/amd64 ubuntu:20.04 AS x86_64-linux-gnu

FROM goreleaser/goreleaser-cross:v1.20.3
FROM goreleaser/goreleaser-cross:v1.20.5

RUN cd /root &&\
mkdir wasmedge-ubuntu-20.04-x86-64 &&\
Expand All @@ -12,6 +12,16 @@ RUN cd /root &&\
cp -R WasmEdge-0.11.2-Linux/lib/* /usr/x86_64-linux-gnu/lib &&\
rm -rf wasmedge-ubuntu-20.04-x86-64

RUN cd /root &&\
mkdir wasmedge-ubuntu-20.04-aarch64 &&\
cd wasmedge-ubuntu-20.04-aarch64 &&\
wget -O wasmedge.tar.gz https://github.com/WasmEdge/WasmEdge/releases/download/0.11.2/WasmEdge-0.11.2-manylinux2014_aarch64.tar.gz &&\
tar -xzvf wasmedge.tar.gz &&\
mkdir -p /usr/lib &&\
cp -R WasmEdge-0.11.2-Linux/include/* /usr/include &&\
cp -R WasmEdge-0.11.2-Linux/lib64/* /usr/lib &&\
rm -rf wasmedge-ubuntu-20.04-aarch64

RUN cd /root &&\
mkdir wasmedge-darwin-arm64 &&\
cd wasmedge-darwin-arm64 &&\
Expand Down
8 changes: 7 additions & 1 deletion devel/docker/push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ main() {
if [[ "$name" == "runtime" ]]; then
build_args="--build-arg=VERSION=$version --platform=linux/amd64 -t ${tag_host}substreams-sink-kv:$version"
elif [[ "$name" == "builder" ]]; then
build_args="--build-arg=VERSION=$version --platform=linux/amd64,linux/arm64 -t ${tag_host}substreams-sink-kv-builder:v1.20.3"
builder_version="`cat "$docker_file" | grep "FROM goreleaser/goreleaser-cross" | cut -d ':' -f 2`"
if [[ "$builder_version" == "" ]]; then
echo "ERROR: Unable to extract 'goreleaser/goreleaser-cross' image version in Dockerfile '$docker_file'"
exit 1
fi

build_args="--platform=linux/amd64,linux/arm64 -t ${tag_host}substreams-sink-kv-builder:$builder_version"
else
usage_error "Unknown Dockerfile '$docker_file'"
fi
Expand Down

0 comments on commit b9f3208

Please sign in to comment.