From 8710940165aa66e39700eb56a9bb8fe25bda7d40 Mon Sep 17 00:00:00 2001 From: John Howard Date: Mon, 25 Mar 2019 10:23:22 -0700 Subject: [PATCH] Windows: Build shim binary from Microsoft/hcsshim Signed-off-by: John Howard This is part of a phased update to remove the existing Windows shim code from the containerd repo, and instead use the one from Microsoft/hcsshim. --- .appveyor.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 12145ee74..accceec06 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -12,7 +12,7 @@ environment: GOPATH: C:\gopath CGO_ENABLED: 1 matrix: - - GO_VERSION: 1.11 + - GO_VERSION: 1.12.1 before_build: - choco install -y mingw --version 5.3.0 @@ -22,10 +22,29 @@ before_build: - 7z x go%GO_VERSION%.windows-amd64.zip -oC:\ >nul - go version - choco install codecov + # Clone hcsshim at the vendored version + - bash.exe -elc "export PATH=/c/tools/mingw64/bin:$PATH; + rm -rf /c/gopath/src/github.com/Microsoft/hcsshim; + git clone -q https://github.com/Microsoft/hcsshim.git /c/gopath/src/github.com/Microsoft/hcsshim; + export HCSSHIM_VERSION=`grep Microsoft/hcsshim vendor.conf | awk '{print $2}'`; + echo Using Microsoft/hcsshim $HCSSHIM_VERSION; + pushd /c/gopath/src/github.com/Microsoft/hcsshim; + git checkout $HCSSHIM_VERSION; + popd" # Print host version. TODO: Remove this when containerd has a way to get host version - ps: $psversiontable build_script: + # Build containerd-shim-runhcs-v1.exe and runhcs.exe from Microsoft/hcsshim + - bash.exe -elc "export PATH=/c/tools/mingw64/bin:$PATH; + export GOBIN=/c/gopath/src/github.com/Microsoft/hcsshim/bin; + mkdir $GOBIN; + pushd /c/gopath/src/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1; + go install; + cd ../runhcs; + go install; + ls -al $GOBIN; + popd" - bash.exe -elc "export PATH=/c/tools/mingw64/bin:/c/gopath/bin:$PATH; script/setup/install-dev-tools; mingw32-make.exe check"