forked from pglet/pglet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
181 lines (151 loc) · 6.63 KB
/
.appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
skip_branch_with_pr: true
environment:
GO_VERSION: 1.17.2
GO_TAGS: --tags release
GITHUB_TOKEN:
secure: uX7wMPjOz72c6zs4QS2/m3vsOE5Fh7e68YqMNSf0mRmb6hP9Ij8haCefQjxBDlEb
DOCKER_REGISTRY_USER:
secure: NJVK0u9M6ZhmQKUeR6Gnxg==
DOCKER_REGISTRY_PASS:
secure: V9nRzVDlIGS0a+dhkC2/vw==
GCR_SA_JSON:
secure: DrdW/oHH1ojGVsZLCSojYfdQqiHWHs6J6Tyy8uxovFTqg7f1s7hoZRLFYH5QM9KhtdTIXqOtpeLKS9pRhudUyKjvH7QPxVWq0oW0JXFtkcMcggdz3trLVeouO9U9Y1OXdBGEf87LXPrmhogdMI5g/0XC7xif5CMcRG3eJDhqPnWpERnS/zR5O4wDx7ewOJgG38Z/XMuDYFzkA55+e4ECwUqcreuWPqpKLecljZ8baCh78cwHltgbt7/iE82i+kE4ACoNEzZxob6BOZ5h68doZR3QKyOedEY/NxgsjxTsx4GDOvhdumAgGak88gLyv6BQhafPD9WBoipGAFrsLtm+nCc4+4M6CSdl2M6H64z0YHqN9ehGOvD5uIOcsf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LLc0Om+VYoCzJiiSiKE9syGvhKvMeDMOVrXBVqydeSRdeWolqG3gSQkaZcObDVfFkRcrWQWjw180wrp2y5GZR37hDrTjiADYYXNRLF1x8q3ErnenCsnMAJwB2lgKNiC7rPB/dTOa4B8/M3MTnao+Y3MQ21w9BivTnXRvDBrU19zdV8Wv5cIw/KNKb9QZUxcM9SGv98qNOhYZ+0w4/tkHtueF+DEw3gHoS8Z8VIBcJsv+dFdQB81t30KNy3F69TmwSNnJ52jFp0gKKOvSGWLr4KlBekqQ04bL4XhGqAwXh5aWs0KAsqMvrOhjdAgWq7J56yO7QYwJkpmTXmv69mgu24qQXqB4/hzUB9yOuhTJ//iJN4TyZCTacd59obWy6tQKOknycpSfPYXkpVVBC6+zPyPhOtDAw/gpWK1fMHu/sG9ata6x7rUFzngYm6Eyxir1GUzy7/hQReKflwOsIqFoEEUMQ6zKgbT8gEl6aJYj/D2Roo/AdyFF6B7gTJ6+A==
matrix:
# - job_name: Windows
# job_group: tests
# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# - job_name: Linux
# job_group: tests
# APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
# - job_name: macOS
# job_group: tests
# APPVEYOR_BUILD_WORKER_IMAGE: macOS
- job_name: Release
job_depends_on: tests
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
matrix:
fast_finish: true
for:
# ======================================
# Windows
# ======================================
-
matrix:
only:
- job_name: Windows
install:
- ps: .\install_go.ps1
- set GOPATH=%USERPROFILE%\go
- set PATH=%GOPATH%\bin;%PATH%
- echo %GOPATH%
- echo %GOROOT%
- go version
build_script:
- ps: Install-Product node 12 x64
- cd client
- yarn
- yarn build
- cd ..
- mkdir internal\server\content
- xcopy client\build internal\server\content\ /E /Y
- .\build.cmd
- dir %USERPROFILE%\Go\bin
test_script:
- run-tests.cmd
# ======================================
# Linux
# ======================================
-
matrix:
only:
- job_name: Linux
install:
- gvm install go${GO_VERSION} -B
- gvm use go${GO_VERSION}
- go version
build_script:
- nvm use 12
- cd client
- yarn
- yarn build
- cd ..
- mkdir internal/server/content
- cp -r client/build/* internal/server/content
- ./build.sh
- ls $GOPATH/bin
test_script:
- ./run-tests.sh
# ======================================
# macOS
# ======================================
-
matrix:
only:
- job_name: macOS
install:
- gvm install go${GO_VERSION} -B
- gvm use go${GO_VERSION}
- go version
- HOMEBREW_NO_AUTO_UPDATE=1 brew install yarn
build_script:
- nvm use 14
- cd client
- yarn
- yarn build
- cd ..
- mkdir internal/server/content
- cp -r client/build/* internal/server/content
- ./build.sh
- ls $GOPATH/bin
test_script:
- ./run-tests.sh
# ======================================
# Release
# ======================================
-
matrix:
only:
- job_name: Release
install:
- gvm install go${GO_VERSION} -B
- gvm use go${GO_VERSION}
- go version
- bash ./install_goreleaser.sh
- goreleaser --version
# - sh: |
# sudo snap install --classic goreleaser
# goreleaser --version
build_script:
- nvm use 12
- cd client
- yarn
- GENERATE_SOURCEMAP=false yarn build
- ls -alR build
- cd ..
- mkdir internal/server/content
- cp -r client/build/* internal/server/content
- sh: |
if [[ "$APPVEYOR_REPO_TAG" == "true" ]]; then
goreleaser
else
goreleaser --snapshot --skip-publish
fi
test_script:
- docker images
- docker run --name pglet-test -d pglet/server
- sleep 10
- docker logs pglet-test
# publish to docker.io on tagged builds only
- sh: |
if [[ "$APPVEYOR_REPO_TAG" == "true" ]]; then
echo "$DOCKER_REGISTRY_PASS" | docker login --username $DOCKER_REGISTRY_USER --password-stdin
docker image push --all-tags pglet/server
fi
# publish to gcr.io on every build, but not PR
deploy_script:
- sh: echo "$GCR_SA_JSON" > /tmp/gcp.json
- sh: gcloud auth activate-service-account --key-file=/tmp/gcp.json
- sh: gcloud auth configure-docker -q
- sh: docker image push --all-tags us.gcr.io/pglet-app/pglet-server
artifacts:
- path: dist/pglet-*