diff --git a/build/Dockerfile b/build/Dockerfile index ad3fbcf..5fd445a 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,7 +1,8 @@ -FROM golang:1.18 AS build +# Use carlosedp/golang for riscv64 support +FROM carlosedp/golang:1.18 AS build # Install dependencies -RUN apt-get update && apt-get install -y libsecret-1-dev +RUN apt-get update && apt-get install -y git build-essential libsecret-1-dev # Build WORKDIR /build/ diff --git a/build/build.sh b/build/build.sh index 660ac4b..91f2772 100644 --- a/build/build.sh +++ b/build/build.sh @@ -9,14 +9,15 @@ git clone https://github.com/ProtonMail/proton-bridge.git cd proton-bridge git checkout v$VERSION -# Build -if ! make build-nogui ; then - # If build fails it's probably because it is a 32bit - # system and there was a overflow error on the parser +ARCH=$(uname -m) +if [[ $ARCH == "armv7l" ]] ; then + # This is expected to fail, and we use the following patch to fix + make build-nogui || true + # For 32bit architectures, there was a overflow error on the parser # This is a workaround for this problem found at: # https://github.com/antlr/antlr4/issues/2433#issuecomment-774514106 find $(go env GOPATH)/pkg/mod/github.com/\!proton\!mail/go-rfc5322*/ -type f -exec sed -i.bak 's/(1<