Skip to content

Commit

Permalink
use darwin snapshotter for darwin test
Browse files Browse the repository at this point in the history
Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
  • Loading branch information
thehajime committed Feb 1, 2022
1 parent 18e745a commit 3c3b6f8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
mkdir -p ~/.local/bin
# use pre-installed golang instead of brew
ln -s `which go` /usr/local/Homebrew/Library/Homebrew/shims/mac/super/go
brew install ukontainer/lkl/containerd ukontainer/lkl/nerdctl --ignore-dependencies
brew install ukontainer/lkl/darwin-snapshotter ukontainer/lkl/containerd ukontainer/lkl/nerdctl --ignore-dependencies
brew install coreutils
ln -sf /usr/local/bin/gsha256sum ~/.local/bin/sha256sum
Expand Down Expand Up @@ -328,6 +328,7 @@ jobs:
run: |
cat /tmp/dockerd.log || true
cat /tmp/containerd.log || true
cat /tmp/darwin-snapshotter.log || true
- run: kind export logs logs
if: runner.os == 'linux' && matrix.arch == 'amd64' && always()
Expand Down
5 changes: 4 additions & 1 deletion test/containerd-ctr-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if [ $TRAVIS_OS_NAME != "osx" ] ; then
exit 0
fi

CTR_ARGS="--rm --runtime=io.containerd.runu.v1 --fifo-dir /tmp/ctrd --env RUMP_VERBOSE=1"
CTR_ARGS="--rm --snapshotter=sparsebundle --runtime=io.containerd.runu.v1 --fifo-dir /tmp/ctrd --env RUMP_VERBOSE=1"
CTR_GLOBAL_OPT="--debug -a /tmp/ctrd/run/containerd/containerd.sock"

sudo rm -rf /tmp/ctrd/
Expand All @@ -29,6 +29,9 @@ fold_start test.containerd.0 "boot containerd"
sleep 3
chmod 755 /tmp/ctrd

containerd-darwin-snapshotter-grpc /tmp/ctrd/run/containerd-darwin-snapshotter.sock /tmp/ctrd/var/lib/containerd/darwin > /tmp/darwin-snapshotter.log 2>&1 &


ctr $CTR_GLOBAL_OPT version
nerdctl $CTR_GLOBAL_OPT version
nerdctl $CTR_GLOBAL_OPT info
Expand Down
5 changes: 3 additions & 2 deletions test/containerd-nerdctl-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ if [ $TRAVIS_OS_NAME != "osx" ] ; then
exit 0
fi

CTR_GLOBAL_OPT="--debug -a /tmp/ctrd/run/containerd/containerd.sock --snapshotter=darwin"
NERDCTL_ARGS="--rm --env RUMP_VERBOSE=1"
CTR_GLOBAL_OPT="--debug -a /tmp/ctrd/run/containerd/containerd.sock --snapshotter=sparsebundle"
NERDCTL_ARGS="--rm --env RUMP_VERBOSE=1 --net=none"


###
Expand Down Expand Up @@ -58,5 +58,6 @@ create_runu_aux_dir
fold_start test.nerdctl.5 "test alpine Linux on darwin (nerdctl)"
sudo nerdctl $CTR_GLOBAL_OPT run $NERDCTL_ARGS \
--env RUNU_AUX_DIR=$RUNU_AUX_DIR --env LKL_USE_9PFS=1 \
--platform=linux/amd64 \
library/alpine:latest /bin/busybox ls -l
fold_end test.nerdctl.5

0 comments on commit 3c3b6f8

Please sign in to comment.