Skip to content

Commit dec667c

Browse files
author
Ian Campbell
committed
Try booting with Hyperkit on MacOS
Signed-off-by: Ian Campbell <[email protected]>
1 parent 457e7d6 commit dec667c

File tree

1 file changed

+28
-10
lines changed

1 file changed

+28
-10
lines changed

.circleci/config.yml

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,27 +90,34 @@ image_build: &image_build
9090
paths: images
9191

9292
image_boot: &image_boot
93-
machine:
94-
enabled: true
95-
image: circleci/classic:latest # default Ubuntu 14.04 image
93+
#machine:
94+
# enabled: true
95+
# image: circleci/classic:latest # default Ubuntu 14.04 image
96+
macos:
97+
xcode: "9.0"
9698
steps:
9799
- run:
98100
name: Configure $PATH
99-
command: echo 'export PATH=~/workspace/bin-Linux:$PATH' >> $BASH_ENV
101+
#command: echo 'export PATH=~/workspace/bin-Linux:$PATH' >> $BASH_ENV
102+
command: echo 'export PATH=~/workspace/bin-Darwin:$PATH' >> $BASH_ENV
100103
- run:
101104
name: Install packages
102105
# ca-certificates are needed for attach_workspace (and git over https)
103-
command: sudo apt-get update && sudo apt-get install -y ca-certificates curl expect git make openssh-client procps qemu xorriso
106+
#command: sudo apt-get update && sudo apt-get install -y ca-certificates curl expect git make openssh-client procps qemu xorriso
107+
command: brew install xorriso
104108
- attach_workspace:
105109
at: ~/workspace
106110
- checkout
111+
- run:
112+
name: Versions
113+
command: |
114+
set -x
115+
~/workspace/bin-Darwin/linuxkit version
116+
~/workspace/bin-Darwin/vpnkit version
107117
- run:
108118
name: Test boot
109119
command: |
110120
set -x
111-
free
112-
cat /proc/meminfo
113-
ls -lrt /dev/kvm* || true
114121
# Add ssh keys to the image.
115122
# TODO could this be integrated into linuxkit/mkimage-iso-*
116123
# such that all those options do not need to be repeated
@@ -152,29 +159,38 @@ jobs:
152159
steps:
153160
- run:
154161
name: Create workspace
155-
command: mkdir -p /workspace/bin-Linux
162+
command: mkdir -p /workspace/bin-Linux /workspace/bin-Darwin
156163
- run:
157164
name: Install packages
158165
command: apt-get update && apt-get install -y ca-certificates curl openssh-client
159166
- run:
160167
name: Fetch binaries
161168
command: |
169+
set -x
162170
curl -fsSL -o /tmp/docker.tgz https://download.docker.com/linux/static/stable/x86_64/docker-17.06.2-ce.tgz
163171
tar xfO /tmp/docker.tgz docker/docker > /workspace/bin-Linux/docker
164172
curl -fsSL -o /workspace/bin-Linux/linuxkit https://362-46932243-gh.circle-artifacts.com/0/linuxkit-linux-amd64
173+
curl -fsSL -o /workspace/bin-Darwin/linuxkit https://362-46932243-gh.circle-artifacts.com/0/linuxkit-darwin-amd64
165174
curl -fsSL -o /workspace/bin-Linux/manifest-tool https://github.com/estesp/manifest-tool/releases/download/v0.7.0/manifest-tool-linux-amd64
166175
curl -fsSL -o /workspace/bin-Linux/notary https://github.com/theupdateframework/notary/releases/download/v0.4.3/notary-Linux-amd64
167176
177+
curl -fsSL -o /workspace/bin-Darwin/hyperkit https://452-55985023-gh.circle-artifacts.com/0/Users/distiller/hyperkit/build/hyperkit
178+
curl -fsSL -o /tmp/vpnkit.tgz https://1066-58395340-gh.circle-artifacts.com/0/Users/distiller/vpnkit/vpnkit.tgz
179+
tar xfO /tmp/vpnkit.tgz Contents/Resources/bin/vpnkit > /workspace/bin-Darwin/vpnkit
180+
168181
echo "Downloaded:"
169-
sha256sum /workspace/bin-Linux/*
182+
sha256sum /workspace/bin-Linux/* /workspace/bin-Darwin/*
170183
echo
171184
172185
echo "Checking checksums"
173186
sha256sum -c <<EOF
174187
6af40e74b2dbb2927882acab52d50bfc72551779d541957fc70b6adc325ee5ef /workspace/bin-Linux/docker
175188
b61188823c2491e9a1c16d275e41c68d5736f3f10577d01cb358261ff71bbad6 /workspace/bin-Linux/linuxkit
189+
908fae1c48122a245ddef8821a530a4c504f267ff1718b0c3688ef6f7aa3b65f /workspace/bin-Darwin/linuxkit
176190
e4ca2ef0015a4be8597d31d9e3e70d88da33924ae72b0999e9f3b79304d4710d /workspace/bin-Linux/manifest-tool
177191
06cd02c4c2e7a3b1ad9899b03b3d4dde5392d964c675247d32f604a24661f839 /workspace/bin-Linux/notary
192+
298f650c9dd3ab8907b23f56cb21e33b794a5a8be163bbbcc7cf959112888b80 /workspace/bin-Darwin/hyperkit
193+
72e34d9c0bc0a73bfb71f2b572849db5829ca41c3995245145f2e57c8ab40bd2 /workspace/bin-Darwin/vpnkit
178194
EOF
179195
- run:
180196
name: Generate SSH Keys
@@ -186,8 +202,10 @@ jobs:
186202
command: |
187203
chmod +x /workspace/bin-Linux/docker # docker version deferred until daemon configured in relevant jobs
188204
chmod +x /workspace/bin-Linux/linuxkit && /workspace/bin-Linux/linuxkit version
205+
chmod +x /workspace/bin-Darwin/linuxkit # && /workspace/bin-Darwin/linuxkit version
189206
chmod +x /workspace/bin-Linux/manifest-tool && /workspace/bin-Linux/manifest-tool --version
190207
chmod +x /workspace/bin-Linux/notary && /workspace/bin-Linux/notary version
208+
chmod +x /workspace/bin-Darwin/vpnkit # && /workspace/bin-Darwin/vpnkit version
191209
- persist_to_workspace:
192210
root: /workspace
193211
paths: bin

0 commit comments

Comments
 (0)