Skip to content
This repository was archived by the owner on Mar 24, 2023. It is now read-only.

Commit 137d152

Browse files
authored
Merge pull request #892 from laverya/fix-windows-builds
Fix windows builds
2 parents c8d7bef + faffe1c commit 137d152

29 files changed

+2781
-223
lines changed

.circleci/config.yml

+31-6
Original file line numberDiff line numberDiff line change
@@ -154,17 +154,32 @@ jobs:
154154
- restore_cache:
155155
keys:
156156
- ship-unit-test-build-cache
157-
- run: |
158-
mkdir -p $GOCACHE
159-
make build-deps citest
160-
if [ -n "$CC_TEST_REPORTER_ID" ]; then
161-
make ci-upload-coverage
162-
fi
157+
- run:
158+
name: make test
159+
command: |
160+
mkdir -p $GOCACHE
161+
make build-deps citest
162+
if [ -n "$CC_TEST_REPORTER_ID" ]; then
163+
make ci-upload-coverage
164+
fi
163165
- save_cache:
164166
paths:
165167
- /tmp/go/cache
166168
key: ship-unit-test-build-cache-{{ epoch }}
167169

170+
windows_build_test:
171+
docker:
172+
- image: golang:1.12
173+
environment:
174+
GOCACHE: "/tmp/go/cache"
175+
working_directory: /go/src/github.com/replicatedhq/ship
176+
steps:
177+
- checkout
178+
- run:
179+
name: Windows Build
180+
command: |
181+
make bin/ship.exe
182+
168183
docs:
169184
docker:
170185
- image: replicated/gitops-builder:node8-go11
@@ -531,6 +546,7 @@ workflows:
531546
- e2e_setup
532547

533548
- test
549+
- windows_build_test
534550
- docs
535551
- integration_base
536552
- integration_init
@@ -564,6 +580,7 @@ workflows:
564580
- e2e_setup
565581
- e2e_init
566582
- test
583+
- windows_build_test
567584
- integration_base
568585
- integration_init
569586
- integration_unfork
@@ -641,6 +658,13 @@ workflows:
641658
branches:
642659
ignore: /.*/
643660

661+
- windows_build_test:
662+
filters:
663+
tags:
664+
only: /^v[0-9]+(\.[0-9]+)*(-.*)*/
665+
branches:
666+
ignore: /.*/
667+
644668
- docs:
645669
filters:
646670
tags:
@@ -698,6 +722,7 @@ workflows:
698722
- e2e_setup
699723
- e2e_init
700724
- test
725+
- windows_build_test
701726
- integration_base
702727
- integration_init
703728
- integration_unfork

Gopkg.lock

+4-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

+4
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,7 @@ ignored = [
138138
[[override]]
139139
name = "gopkg.in/fsnotify.v1"
140140
source = "https://github.com/fsnotify/fsnotify.git"
141+
142+
[[override]]
143+
name = "github.com/google/certificate-transparency-go"
144+
version = "v1.0.21"

Makefile

+8
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,14 @@ bin/ship: $(FULLSRC)
282282
./cmd/ship
283283
@echo built bin/ship
284284

285+
bin/ship.exe: $(SRC)
286+
GOOS=windows go build \
287+
${LDFLAGS} \
288+
-i \
289+
-o bin/ship.exe \
290+
./cmd/ship
291+
@echo built bin/ship
292+
285293
# tests base "ship" cli
286294
integration-test:
287295
ginkgo -p -stream -r integration

0 commit comments

Comments
 (0)