Skip to content

Commit

Permalink
Add windows builder
Browse files Browse the repository at this point in the history
  • Loading branch information
oxplot committed Dec 10, 2020
1 parent cf64f61 commit d3e3e00
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 9 deletions.
6 changes: 0 additions & 6 deletions contrib/Dockerfile

This file was deleted.

3 changes: 0 additions & 3 deletions contrib/build

This file was deleted.

27 changes: 27 additions & 0 deletions contrib/build-windows
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

set -e -o pipefail

BUILDER_IMG="$(echo '
FROM debian:experimental
RUN apt-get update -y && apt-get -y install golang-1.15 mingw-w64
RUN apt-get install -y ca-certificates
ENV GOPATH=/go
ENV PATH=/usr/lib/go-1.15/bin:$PATH
' | docker build -q -)"

docker run -it --rm -v "$(pwd)/..:/src" -w /src "${BUILDER_IMG}" bash -ec -o pipefail '
go generate
export GOOS=windows
export GOARCH=amd64
export CC=x86_64-w64-mingw32-gcc
export CGO_ENABLED=1
go build -tags prod -o runsheet-windows.exe
chown $(stat --printf "%u:%g" .) runsheet-windows.exe
'
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ require (
github.com/lib/pq v1.2.0
github.com/looplab/tarjan v0.0.0-20161115091335-9cc6d6cebfb5
github.com/mattn/go-sqlite3 v1.11.0
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 // indirect
gopkg.in/goracle.v2 v2.19.0
)
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 h1:bUGsEnyNbVPw06Bs80sCeARAlK8lhwqGyi6UT8ymuGk=
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 h1:pXY9qYc/MP5zdvqWEUH6SjNiu7VhSjuVFTFiTcphaLU=
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
Expand Down

0 comments on commit d3e3e00

Please sign in to comment.