8000 Add initial AppVeyor test script · daniel4git/golang@d5d4282 · GitHub
[go: up one dir, main page]

Skip to content

Commit d5d4282

Browse files
committed
Add initial AppVeyor test script
1 parent ce77666 commit d5d4282

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.appveyor.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: build-{build}.{branch}
2+
image: Visual Studio 2017
3+
4+
environment:
5+
matrix:
6+
- version: 1.8
7+
variant: nanoserver
8+
- version: 1.8
9+
variant: windowsservercore
10+
- version: 1.7
11+
variant: nanoserver
12+
- version: 1.7
13+
variant: windowsservercore
14+
15+
install:
16+
- ps: |
17+
[Environment]::SetEnvironmentVariable('dockerImage', ('golang:{0}' -f $env:version), [EnvironmentVariableTarget]::Process);
18+
[Environment]::SetEnvironmentVariable('buildDirectory', ('{0}/windows/{1}' -f $env:version, $env:variant), [EnvironmentVariableTarget]::Process);
19+
20+
build_script:
21+
- cmd: appveyor-retry docker build --pull -t %dockerImage% %buildDirectory%
22+
23+
after_build:
24+
- ps: docker images
25+
26+
test_script:
27+
- ps: docker run --rm $env:dockerImage go version

update.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ versions=( "${versions[@]%/}" )
1111

1212

1313
travisEnv=
14+
appveyorEnv=
1415
googleSource="$(curl -fsSL 'https://golang.org/dl/')"
1516
for version in "${versions[@]}"; do
1617
rcVersion="${version%-rc}"
@@ -78,10 +79,14 @@ for version in "${versions[@]}"; do
7879
-e 's/^(ENV GOLANG_DOWNLOAD_SHA256) .*/\1 '"$windowsSha256"'/' \
7980
"$version/$variant/Dockerfile"
8081
)
82+
appveyorEnv='\n - version: '"$version"'\n variant: '"$(basename "$variant")$appveyorEnv"
8183
fi
8284
done
8385
travisEnv='\n - VERSION='"$version VARIANT=$travisEnv"
8486
done
8587

8688
travis="$(awk -v 'RS=\n\n' '$1 == "env:" { $0 = "env:'"$travisEnv"'" } { printf "%s%s", $0, RS }' .travis.yml)"
8789
echo "$travis" > .travis.yml
90+
91+
appveyor="$(awk -v 'RS=\n\n' '$1 == "environment:" { $0 = "environment:\n matrix:'"$appveyorEnv"'" } { printf "%s%s", $0, RS }' .appveyor.yml)"
92+
echo "$appveyor" > .appveyor.yml

0 commit comments

Comments
 (0)
0