From 1cb4d173e4877e1032ef07fd3a502460dc85fa77 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Mon, 6 Nov 2017 15:28:27 +0000 Subject: [PATCH] Add Circle CI runes Advantage over Travis for this usecase is the automatic artifact handling without needing to mess with S3 or similar, making it simple to offer downloads. Signed-off-by: Ian Campbell --- .circleci/config.yml | 55 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..86bdc6cc6 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,55 @@ +version: 2 +jobs: + build: + working_directory: /go/src/github.com/linuxkit/linuxkit + docker: + - image: circleci/golang:1.9-stretch + steps: + - checkout + - run: mkdir -p ./bin + - run: + name: Versions + command: | + set -x + go version + cat /etc/os-release + - run: + name: Dependencies + command: | + go get -u github.com/golang/lint/golint + go get -u github.com/gordonklaus/ineffassign + - run: + name: Lint + command: make local-check + - run: + name: Build amd64/linux + environment: + GOOS: linux + GOARCH: amd64 + command: make LOCAL_TARGET=bin/linuxkit-$GOOS-$GOARCH local-build + - run: + name: Build arm64/linux + environment: + GOOS: linux + GOARCH: arm64 + command: make LOCAL_TARGET=bin/linuxkit-$GOOS-$GOARCH local-build + - run: + name: Build amd64/darwin + environment: + GOOS: darwin + GOARCH: amd64 + command: make LOCAL_TARGET=bin/linuxkit-$GOOS-$GOARCH local-build + - run: + name: Build amd64/windows + environment: + GOOS: windows + GOARCH: amd64 + command: make LOCAL_TARGET=bin/linuxkit-$GOOS-$GOARCH local-build + - run: + name: Test + command: make local-test + - run: + name: Checksum + command: cd bin && sha256sum linuxkit-*-* > SHA256SUM + - store_artifacts: + path: ./bin