Skip to content

Commit

Permalink
Merge pull request #34 from imeoer/nydus-tar-build
Browse files Browse the repository at this point in the history
Add converter package for tar build
  • Loading branch information
bergwolf authored Apr 7, 2022
2 parents bcb6c67 + fa476aa commit f97c7fa
Show file tree
Hide file tree
Showing 11 changed files with 1,610 additions and 18 deletions.
42 changes: 40 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ on:
pull_request:
branches: [main]

env:
NYDUS_VERSION: v2.0.0-rc.2

jobs:
build:
name: Build
timeout-minutes: 10
strategy:
matrix:
go-version:
- 1.16
- 1.17
platform:
- ubuntu-latest
runs-on: ${{ matrix.platform }}
Expand All @@ -39,13 +42,48 @@ jobs:
make test
make check
smoke:
name: Smoke
timeout-minutes: 10
strategy:
matrix:
go-version:
- 1.17
platform:
- ubuntu-latest
runs-on: ${{ matrix.platform }}
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- name: Check out code
uses: actions/checkout@v1
- name: cache go mod
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: |
${{ runner.os }}-go
- name: Build
run: |
# Download nydus components
wget https://github.com/dragonflyoss/image-service/releases/download/${{ env.NYDUS_VERSION }}/nydus-static-${{ env.NYDUS_VERSION }}-x86_64.tgz
tar xzvf nydus-static-${{ env.NYDUS_VERSION }}-x86_64.tgz
mkdir -p /usr/bin
sudo mv nydus-static/nydus-image nydus-static/nydusd-fusedev nydus-static/nydusify /usr/bin/
export PATH=$PATH:$(go env GOPATH)/bin
make smoke
coverage:
name: Code coverage
timeout-minutes: 10
strategy:
matrix:
go-version:
- 1.16
- 1.17
platform:
- ubuntu-latest
runs-on: ${{ matrix.platform }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
go-version:
- 1.16
- 1.17
runs-on: ubuntu-latest
steps:
- name: Set up Go
Expand Down
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ all: clear build

VERSION=$(shell git rev-parse --verify HEAD --short=7)
BRANCH=$(shell git rev-parse --abbrev-ref HEAD)
PACKAGES ?= $(shell go list ./... | grep -v /vendor/)
PACKAGES ?= $(shell go list ./... | grep -v /tests)
SUDO = $(shell which sudo)
GO_EXECUTABLE_PATH ?= $(shell which go)
NYDUS_BUILDER ?= /usr/bin/nydus-image
NYDUS_NYDUSD ?= /usr/bin/nydusd-fusedev
#GOPROXY ?= https://goproxy.io

ifdef GOPROXY
Expand Down Expand Up @@ -31,7 +35,7 @@ install: static-release

.PHONY: vet
vet:
go vet $(PACKAGES)
go vet $(PACKAGES) ./tests

.PHONY: check
check: vet
Expand All @@ -43,5 +47,8 @@ test:

.PHONY: cover
cover:
go test -v -covermode=atomic -coverprofile=coverage.txt ./...
go test -v -covermode=atomic -coverprofile=coverage.txt $(PACKAGES)
go tool cover -func=coverage.txt

smoke:
$(SUDO) NYDUS_BUILDER=${NYDUS_BUILDER} NYDUS_NYDUSD=${NYDUS_NYDUSD} ${GO_EXECUTABLE_PATH} test -race -v ./tests
45 changes: 36 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
module github.com/containerd/nydus-snapshotter

go 1.16
go 1.17

require (
github.com/containerd/containerd v1.6.1
github.com/containerd/continuity v0.2.2
github.com/docker/cli v20.10.0-beta1.0.20201029214301-1d20b15adc38+incompatible
github.com/docker/distribution v2.8.1+incompatible // indirect
github.com/docker/docker v1.6.1 // indirect
github.com/docker/libcontainer v2.2.1+incompatible // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
github.com/google/go-containerregistry v0.5.1
github.com/google/uuid v1.2.0
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opencontainers/go-digest v1.0.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.11.0
github.com/prometheus/client_model v0.2.0
Expand All @@ -21,12 +18,42 @@ require (
github.com/stretchr/testify v1.7.0
github.com/urfave/cli/v2 v2.3.0
go.etcd.io/bbolt v1.3.6
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e
google.golang.org/grpc v1.43.0
)

replace (
cloud.google.com/go => cloud.google.com/go v0.81.0
github.com/containerd/containerd => github.com/containerd/containerd v1.6.1
github.com/opencontainers/runc => github.com/opencontainers/runc v1.0.3
require (
github.com/Microsoft/go-winio v0.5.1 // indirect
github.com/Microsoft/hcsshim v0.9.2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/containerd/cgroups v1.0.3 // indirect
github.com/containerd/ttrpc v1.1.0 // indirect
github.com/containerd/typeurl v1.0.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/distribution v2.8.1+incompatible // indirect
github.com/docker/docker v1.6.1 // indirect
github.com/docker/docker-credential-helpers v0.6.3 // indirect
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect
github.com/docker/libcontainer v2.2.1+incompatible // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/klauspost/compress v1.11.13 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/moby/sys/mountinfo v0.5.0 // indirect
github.com/opencontainers/image-spec v1.0.2-0.20211117181255-693428a734f5 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)

replace cloud.google.com/go => cloud.google.com/go v0.81.0
Loading

0 comments on commit f97c7fa

Please sign in to comment.