Skip to content

Commit d3e3e00

Browse files
committed
Add windows builder
1 parent cf64f61 commit d3e3e00

File tree

5 files changed

+33
-9
lines changed

5 files changed

+33
-9
lines changed

contrib/Dockerfile

Lines changed: 0 additions & 6 deletions
This file was deleted.

contrib/build

Lines changed: 0 additions & 3 deletions
This file was deleted.

contrib/build-windows

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
set -e -o pipefail
4+
5+
BUILDER_IMG="$(echo '
6+
7+
FROM debian:experimental
8+
9+
RUN apt-get update -y && apt-get -y install golang-1.15 mingw-w64
10+
RUN apt-get install -y ca-certificates
11+
12+
ENV GOPATH=/go
13+
ENV PATH=/usr/lib/go-1.15/bin:$PATH
14+
15+
' | docker build -q -)"
16+
17+
docker run -it --rm -v "$(pwd)/..:/src" -w /src "${BUILDER_IMG}" bash -ec -o pipefail '
18+
19+
go generate
20+
export GOOS=windows
21+
export GOARCH=amd64
22+
export CC=x86_64-w64-mingw32-gcc
23+
export CGO_ENABLED=1
24+
go build -tags prod -o runsheet-windows.exe
25+
chown $(stat --printf "%u:%g" .) runsheet-windows.exe
26+
27+
'

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@ require (
1111
github.com/lib/pq v1.2.0
1212
github.com/looplab/tarjan v0.0.0-20161115091335-9cc6d6cebfb5
1313
github.com/mattn/go-sqlite3 v1.11.0
14+
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect
15+
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 // indirect
1416
gopkg.in/goracle.v2 v2.19.0
1517
)

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8
8686
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
8787
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
8888
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
89+
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 h1:bUGsEnyNbVPw06Bs80sCeARAlK8lhwqGyi6UT8ymuGk=
90+
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=
91+
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 h1:pXY9qYc/MP5zdvqWEUH6SjNiu7VhSjuVFTFiTcphaLU=
92+
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
8993
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
9094
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
9195
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=

0 commit comments

Comments
 (0)