Skip to content

Commit 8256c81

Browse files
Simonwebmaster128
authored andcommitted
Create debian build and use for build_gnu_aarch64.sh
1 parent f72d5de commit 8256c81

File tree

3 files changed

+41
-2
lines changed

3 files changed

+41
-2
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ release-build-linux:
8282
# Builders should not write their target folder into the host file system (https://github.com/CosmWasm/wasmvm/issues/437)
8383
rm -rf libwasmvm/target/x86_64-unknown-linux-gnu/release
8484
rm -rf libwasmvm/target/aarch64-unknown-linux-gnu/release
85-
docker run --rm -u $(USER_ID):$(USER_GROUP) -v $(shell pwd)/libwasmvm:/code $(BUILDERS_PREFIX)-centos7 build_linux.sh
85+
docker run --rm -u $(USER_ID):$(USER_GROUP) -v $(shell pwd)/libwasmvm:/code $(BUILDERS_PREFIX)-centos7 build_gnu_x86_64.sh
86+
docker run --rm -u $(USER_ID):$(USER_GROUP) -v $(shell pwd)/libwasmvm:/code $(BUILDERS_PREFIX)-debian build_gnu_aarch64.sh
8687
cp libwasmvm/artifacts/libwasmvm.x86_64.so internal/api
8788
cp libwasmvm/artifacts/libwasmvm.aarch64.so internal/api
8889
make update-bindings

builders/Dockerfile.debian

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
FROM --platform=linux/amd64 debian:12-slim
2+
3+
RUN apt update -y \
4+
&& apt install -y gcc make gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu wget
5+
6+
# GET FROM https://github.com/rust-lang/docker-rust-nightly
7+
ENV RUSTUP_HOME=/usr/local/rustup \
8+
CARGO_HOME=/usr/local/cargo \
9+
PATH=/usr/local/cargo/bin:$PATH
10+
11+
RUN wget --no-verbose "https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init" \
12+
&& chmod +x rustup-init \
13+
&& ./rustup-init -y --no-modify-path --profile minimal --default-toolchain 1.77.0 \
14+
&& rm rustup-init \
15+
&& chmod -R a+w $RUSTUP_HOME $CARGO_HOME \
16+
&& rustup --version \
17+
&& cargo --version \
18+
&& rustc --version \
19+
&& chmod -R 777 /usr/local/cargo \
20+
&& rustup target add aarch64-unknown-linux-gnu
21+
22+
## COPY BUILD SCRIPTS
23+
24+
WORKDIR /code
25+
26+
COPY guest/*.sh /usr/local/bin/
27+
RUN chmod +x /usr/local/bin/*.sh
28+
29+
RUN mkdir /.cargo
30+
RUN chmod +rx /.cargo
31+
COPY guest/cargo-config /.cargo/config
32+
33+
CMD ["bash", "-c", "echo 'Argument missing. Pass one build script (e.g. build_linux.sh) to docker run' && exit 1"]

builders/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ BUILDERS_PREFIX := cosmwasm/go-ext-builder:0019
66
docker-image-centos7:
77
docker build --pull . -t $(BUILDERS_PREFIX)-centos7 -f ./Dockerfile.centos7
88

9+
.PHONY: docker-image-debian
10+
docker-image-debian:
11+
docker build --pull . -t $(BUILDERS_PREFIX)-debian -f ./Dockerfile.debian
12+
913
.PHONY: docker-image-cross
1014
docker-image-cross:
1115
docker build --pull . -t $(BUILDERS_PREFIX)-cross -f ./Dockerfile.cross
@@ -15,10 +19,11 @@ docker-image-alpine:
1519
docker build --pull . -t $(BUILDERS_PREFIX)-alpine -f ./Dockerfile.alpine
1620

1721
.PHONY: docker-images
18-
docker-images: docker-image-centos7 docker-image-cross docker-image-alpine
22+
docker-images: docker-image-centos7 docker-image-debian docker-image-cross docker-image-alpine
1923

2024
.PHONY: docker-publish
2125
docker-publish: docker-images
2226
docker push $(BUILDERS_PREFIX)-cross
2327
docker push $(BUILDERS_PREFIX)-centos7
28+
docker push $(BUILDERS_PREFIX)-debian
2429
docker push $(BUILDERS_PREFIX)-alpine

0 commit comments

Comments
 (0)