use crossbuild as base image

parent 0eff33dc
# Global section
env:
- CGO_ENABLED=1
checksum:
name_template: 'checksums.txt'
......@@ -21,7 +19,9 @@ builds:
id: arduino_cli_osx
binary: arduino-cli
env:
- CC=o64-clang
- CGO_ENABLED=1
- CXXFLAGS="-mmacosx-version-min=10.10"
- CC=/usr/x86_64-apple-darwin14/bin/cc
goos:
- darwin
goarch:
......@@ -33,7 +33,8 @@ builds:
id: arduino_cli_arm
binary: arduino-cli
env:
- CC=arm-linux-gnueabihf-gcc
- CGO_ENABLED=1
- CC=/usr/arm-linux-gnueabihf/bin/cc
goos:
- linux
goarch:
......@@ -48,7 +49,8 @@ builds:
id: arduino_cli_arm64
binary: arduino-cli
env:
- CC=aarch64-linux-gnu-gcc
- CGO_ENABLED=1
- CC=/usr/aarch64-linux-gnu/bin/cc
goos:
- linux
goarch:
......@@ -60,6 +62,8 @@ builds:
# All the other platforms
id: arduino_cli
binary: arduino-cli
env:
- CGO_ENABLED=0
goos:
- linux
- windows
......
FROM dockercore/golang-cross
FROM multiarch/crossbuild
# Couldn't fine a more elegant way to fix this
RUN ln -s /usr/include/asm-generic /usr/include/asm
ENV PATH $PATH:/usr/local/go/bin
RUN set -ex \
&& apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
g++-multilib
# Run in a different step to ease dependencies resolution
RUN set -ex \
&& apt-get install -y -q --no-install-recommends \
gcc-aarch64-linux-gnu \
gcc-arm-linux-gnueabihf
# Install goreleaser
# Install tooling
ENV GORELEASER_VER 0.113.0
ENV GORELEASER_SHA 2379beebb6369b75ccead7f7a43269de700b51821feae3857701d106ed72bd63
ENV GOVER 1.12.7
RUN set -ex \
&& curl -o goreleaser.tar.gz -LO https://github.com/goreleaser/goreleaser/releases/download/v${GORELEASER_VER}/goreleaser_Linux_x86_64.tar.gz \
&& echo "$GORELEASER_SHA goreleaser.tar.gz" | sha256sum -c - || exit 1 \
&& tar -xzf goreleaser.tar.gz -C /usr/bin/ goreleaser \
&& rm goreleaser.tar.gz
&& rm goreleaser.tar.gz \
&& curl -LO https://dl.google.com/go/go${GOVER}.linux-amd64.tar.gz \
&& tar -C /usr/local -xzf go${GOVER}.linux-amd64.tar.gz \
&& rm go${GOVER}.linux-amd64.tar.gz
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment