mirror of
https://github.com/creack/pty.git
synced 2026-04-01 11:07:11 +09:00
Revert riscv removal.
This commit is contained in:
23
Dockerfile.riscv
Normal file
23
Dockerfile.riscv
Normal file
@@ -0,0 +1,23 @@
|
||||
# NOTE: Using 1.13 as a base to build the RISCV compiler, the resulting version is based on go1.6.
|
||||
FROM golang:1.13
|
||||
|
||||
# Clone and complie a riscv compatible version of the go compiler.
|
||||
RUN git clone https://review.gerrithub.io/riscv/riscv-go /riscv-go
|
||||
# riscvdev branch HEAD as of 2019-06-29.
|
||||
RUN cd /riscv-go && git checkout 04885fddd096d09d4450726064d06dd107e374bf
|
||||
ENV PATH=/riscv-go/misc/riscv:/riscv-go/bin:$PATH
|
||||
RUN cd /riscv-go/src && GOROOT_BOOTSTRAP=$(go env GOROOT) ./make.bash
|
||||
ENV GOROOT=/riscv-go
|
||||
|
||||
# Set the base env.
|
||||
ENV GOOS=linux GOARCH=riscv CGO_ENABLED=0 GOFLAGS='-v -ldflags=-s -ldflags=-w'
|
||||
|
||||
# Pre compile the stdlib.
|
||||
RUN go build -a std
|
||||
|
||||
# Add the code to the image.
|
||||
WORKDIR pty
|
||||
ADD . .
|
||||
|
||||
# Build the lib.
|
||||
RUN go build
|
||||
@@ -45,6 +45,10 @@ if ! hash docker; then
|
||||
return
|
||||
fi
|
||||
|
||||
echo2 "Build for linux."
|
||||
echo2 " - linux/riscv"
|
||||
docker build -t creack-pty-test -f Dockerfile.riscv .
|
||||
|
||||
# Golang dropped support for darwin 32bits since go1.15. Make sure the lib still compile with go1.14 on those archs.
|
||||
echo2 "Build for darwin (32bits)."
|
||||
echo2 " - darwin/386"
|
||||
@@ -53,6 +57,7 @@ echo2 " - darwin/arm"
|
||||
docker build -t creack-pty-test -f Dockerfile.golang --build-arg=GOVERSION=1.14 --build-arg=GOOS=darwin --build-arg=GOARCH=arm .
|
||||
|
||||
# Run a single test for an old go version. Would be best with go1.0, but not available on Dockerhub.
|
||||
# Using 1.6 as it is the base version for the RISCV compiler.
|
||||
# Would also be better to run all the tests, not just one, need to refactor this file to allow for specifc archs per version.
|
||||
echo2 "Build for linux - go1.6."
|
||||
echo2 " - linux/amd64"
|
||||
|
||||
Reference in New Issue
Block a user