Skip to content

Commit

Permalink
Merge pull request skycoin#48 from simelo/stdevHan_t47_support_cicleci
Browse files Browse the repository at this point in the history
Fixes skycoin#47 Support Circle CI
  • Loading branch information
olemis authored May 18, 2019
2 parents cd1d00b + 78e338f commit ada5e67
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 126 deletions.
70 changes: 70 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
version: 2
jobs:
orangepi-plus2:
docker:
- image: docker:18.06.0-ce-git
working_directory: $GOPATH/src/github.com/skycoin/libskycoin
environment:
QEMU_PLATFORM: orangepi-plus2

steps:
- run: mkdir -p $GOPATH/src/github.com/ $GOPATH/src/github.com/skycoin
- checkout
- setup_remote_docker:
version: 18.06.0-ce
- run: docker build --build-arg QEMU_PLATFORM --build-arg QEMU_OS=debian --file $GOPATH/src/github.com/skycoin/libskycoin/docker/images/test-arm/Dockerfile $GOPATH/src/github.com/skycoin/libskycoin -t skydev-test
- run: docker build --build-arg QEMU_PLATFORM --build-arg QEMU_OS=fedora --file $GOPATH/src/github.com/skycoin/libskycoin/docker/images/test-arm/Dockerfile $GOPATH/src/github.com/skycoin/libskycoin -t skydev-test

raspberrypi3:
docker:
- image: docker:18.06.0-ce-git
working_directory: $GOPATH/src/github.com/skycoin/libskycoin
environment:
QEMU_PLATFORM: raspberrypi3

steps:
- run: mkdir -p $GOPATH/src/github.com/ $GOPATH/src/github.com/skycoin
- checkout
- setup_remote_docker:
version: 18.06.0-ce
- run: docker build --build-arg QEMU_PLATFORM --build-arg QEMU_OS=debian --file $GOPATH/src/github.com/skycoin/libskycoin/docker/images/test-arm/Dockerfile $GOPATH/src/github.com/skycoin/libskycoin -t skydev-test
- run: docker build --build-arg QEMU_PLATFORM --build-arg QEMU_OS=fedora --file $GOPATH/src/github.com/skycoin/libskycoin/docker/images/test-arm/Dockerfile $GOPATH/src/github.com/skycoin/libskycoin -t skydev-test

raspberrypi2:
docker:
- image: docker:18.06.0-ce-git
working_directory: $GOPATH/src/github.com/skycoin/libskycoin
environment:
QEMU_PLATFORM: raspberry-pi2

steps:
- run: mkdir -p $GOPATH/src/github.com/ $GOPATH/src/github.com/skycoin
- checkout
- setup_remote_docker:
version: 18.06.0-ce
- run: docker build --build-arg QEMU_PLATFORM --build-arg QEMU_OS=debian --file $GOPATH/src/github.com/skycoin/libskycoin/docker/images/test-arm/Dockerfile $GOPATH/src/github.com/skycoin/libskycoin -t skydev-test
- run: docker build --build-arg QEMU_PLATFORM --build-arg QEMU_OS=fedora --file $GOPATH/src/github.com/skycoin/libskycoin/docker/images/test-arm/Dockerfile $GOPATH/src/github.com/skycoin/libskycoin -t skydev-test

bananapi_m1_plus:
docker:
- image: docker:18.06.0-ce-git
working_directory: $GOPATH/src/github.com/skycoin/libskycoin
environment:
QEMU_PLATFORM: bananapi-m1-plus

steps:
- run: mkdir -p $GOPATH/src/github.com/ $GOPATH/src/github.com/skycoin
- checkout
- setup_remote_docker:
version: 18.06.0-ce
- run: docker build --build-arg QEMU_PLATFORM --build-arg QEMU_OS=debian --file $GOPATH/src/github.com/skycoin/libskycoin/docker/images/test-arm/Dockerfile $GOPATH/src/github.com/skycoin/libskycoin -t skydev-test
- run: docker build --build-arg QEMU_PLATFORM --build-arg QEMU_OS=fedora --file $GOPATH/src/github.com/skycoin/libskycoin/docker/images/test-arm/Dockerfile $GOPATH/src/github.com/skycoin/libskycoin -t skydev-test

workflows:
version: 2
arm_test:
jobs:
- raspberrypi3
- orangepi-plus2
- raspberrypi2
- bananapi_m1_plus
2 changes: 1 addition & 1 deletion .golangci.libcgo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ run:
# from this option's value:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs:
-
- /usr/local/go/src

# which files to skip: they will be analyzed, but issues from them
# won't be reported. Default value is empty list, but there is
Expand Down
126 changes: 8 additions & 118 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,114 +9,6 @@ matrix:
include:
- os: linux
dist: xenial
# - os: linux
# env:
# - QEMU_PLATFORM=orangepi-plus2
# - QEMU_OS=ubuntu
- os: linux
env:
- QEMU_PLATFORM=orangepi-plus2
- QEMU_OS=debian
# - os: linux
# env:
# - QEMU_PLATFORM=orangepi-plus2
# - QEMU_OS=fedora
# - os: linux
# env:
# - QEMU_PLATFORM=raspberry-pi2
# - QEMU_OS=ubuntu
# - os: linux
# env:
# - QEMU_PLATFORM=raspberry-pi2
# - QEMU_OS=debian
# - os: linux
# env:
# - QEMU_PLATFORM=raspberry-pi2
# - QEMU_OS=fedora
# - os: linux
# env:
# - QEMU_PLATFORM=raspberrypi3
# - QEMU_OS=ubuntu
# - os: linux
# env:
# - QEMU_PLATFORM=raspberrypi3
# - QEMU_OS=debian
# - os: linux
# env:
# - QEMU_PLATFORM=raspberrypi3
# - QEMU_OS=fedora
# - os: linux
# env:
# - QEMU_PLATFORM=beaglebone-black
# - QEMU_OS=ubuntu
# - os: linux
# env:
# - QEMU_PLATFORM=beaglebone-black
# - QEMU_OS=debian
# - os: linux
# env:
# - QEMU_PLATFORM=beaglebone-black
# - QEMU_OS=fedora
# - os: linux
# env:
# - QEMU_PLATFORM=asus-tinker-board
# - QEMU_OS=ubuntu
# - os: linux
# env:
# - QEMU_PLATFORM=asus-tinker-board
# - QEMU_OS=debian
# - os: linux
# env:
# - QEMU_PLATFORM=asus-tinker-board
# - QEMU_OS=fedora
# - os: linux
# env:
# - QEMU_PLATFORM=bananapi-m1-plus
# - QEMU_OS=ubuntu
# - os: linux
# env:
# - QEMU_PLATFORM=bananapi-m1-plus
# - QEMU_OS=debian
# - os: linux
# env:
# - QEMU_PLATFORM=bananapi-m1-plus
# - QEMU_OS=fedora
# - os: linux
# env:
# - QEMU_PLATFORM=odroid-xu4
# - QEMU_OS=ubuntu
# - os: linux
# env:
# - QEMU_PLATFORM=odroid-xu4
# - QEMU_OS=debian
# - os: linux
# env:
# - QEMU_PLATFORM=odroid-xu4
# - QEMU_OS=fedora
# - os: linux
# env:
# - QEMU_PLATFORM=odroid-c1
# - QEMU_OS=ubuntu
# - os: linux
# env:
# - QEMU_PLATFORM=odroid-c1
# - QEMU_OS=debian
# - os: linux
# env:
# - QEMU_PLATFORM=odroid-c1
# - QEMU_OS=fedora
# - os: linux
# env:
# - QEMU_PLATFORM=odroid-xu4
# - QEMU_OS=ubuntu
# - os: linux
# env:
# - QEMU_PLATFORM=odroid-xu4
# - QEMU_OS=debian
# - os: linux
# env:
# - QEMU_PLATFORM=odroid-xu4
# - QEMU_OS=fedora
- os: osx
osx_image: xcode8.3

Expand All @@ -136,19 +28,17 @@ env:


install:
- if [[ -z "$QEMU_PLATFORM" ]]; then go get github.com/gz-c/gox; fi
- if [[ -z "$QEMU_PLATFORM" ]]; then go get -t ./... ; fi
- if [[ -z "$QEMU_PLATFORM" ]]; then make install-linters ; fi
- if [[ -z "$QEMU_PLATFORM" ]]; then VERSION=1.10.2 ./ci-scripts/install-golangci-lint.sh ; fi
- go get github.com/gz-c/gox
- go get -t ./...
- make install-linters
- VERSION=1.10.2 ./ci-scripts/install-golangci-lint.sh
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then DEPS_DIR="${TRAVIS_BUILD_DIR}/deps" && mkdir ${DEPS_DIR} && cd ${DEPS_DIR} && travis_retry wget --no-check-certificate https://cmake.org/files/v3.3/cmake-3.3.2-Linux-x86_64.tar.gz && echo "f3546812c11ce7f5d64dc132a566b749 *cmake-3.3.2-Linux-x86_64.tar.gz" > cmake_md5.txt && md5sum -c cmake_md5.txt && tar -xvf cmake-3.3.2-Linux-x86_64.tar.gz > /dev/null && mv cmake-3.3.2-Linux-x86_64 cmake-install && PATH=${DEPS_DIR}/cmake-install:${DEPS_DIR}/cmake-install/bin:$PATH && cd ${TRAVIS_BUILD_DIR}; fi
- if [[ -z "$QEMU_PLATFORM" ]]; then make install-deps-libc ; fi
- if [[ -z "$QEMU_PLATFORM" ]]; then make install-lib-curl ; fi
- make install-deps-libc
- make install-lib-curl

script:
- echo $PWD
- if [[ -z "$QEMU_PLATFORM" ]]; then make check ; fi
- if [[ "$QEMU_PLATFORM" ]]; then docker build --build-arg QEMU_PLATFORM --build-arg QEMU_OS --file docker/images/test-arm/Dockerfile . -t skydev-test ; fi
- make check

notifications:
email: false
webhooks: https://fathomless-fjord-24024.herokuapp.com/notify
webhooks: https://fathomless-fjord-24024.herokuapp.com/notify
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ configure-build:

## Update links to dependency packages
dep:
git submodule init || true
git submodule update
git submodule update --init --recursive
ln -nsf ../$(LIBSRC_VENDORREL_PATH)/$(SKYVENDOR_REL_PATH)/golang.org $(LIBVENDOR_REL_PATH)/golang.org
ln -nsf ../$(LIBSRC_VENDORREL_PATH)/$(SKYVENDOR_REL_PATH)/gopkg.in $(LIBVENDOR_REL_PATH)/gopkg.in
ls -1 $(SKYVENDOR_REL_PATH)/github.com | grep -v '^skycoin$$' | xargs -I NAME ln -nsf ../$(LIBSRC_VENDORREL_PATH)/$(SKYVENDOR_REL_PATH)/github.com/NAME $(LIBVENDOR_REL_PATH)/github.com/NAME
Expand Down Expand Up @@ -190,8 +189,8 @@ clean-libc: ## Clean files generate by library
rm -rfv include/libskycoin.h

format-libc:
$(PKG_CLANG_FORMAT) -sort-includes -verbose -i -assume-filename=.clang-format lib/cgo/tests/*.c
$(PKG_CLANG_FORMAT) -sort-includes -verbose -i -assume-filename=.clang-format include/*.h
$(PKG_CLANG_FORMAT) -sort-includes -i -assume-filename=.clang-format lib/cgo/tests/*.c
$(PKG_CLANG_FORMAT) -sort-includes -i -assume-filename=.clang-format include/*.h

help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
1 change: 0 additions & 1 deletion ci-scripts/install-travis-gcc.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env bash

# Install gcc6 (6.4.0-2 on Mac OS) for Travis builds

if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
Expand Down
1 change: 1 addition & 0 deletions docker/images/test-arm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ RUN [ "cross-build-start" ]

RUN ls -oa $GOPATH/src/github.com/skycoin/libskycoin/
RUN sh $GOPATH/src/github.com/skycoin/libskycoin/ci-scripts/docker_install_${QEMU_OS}.sh
RUN make -C $GOPATH/src/github.com/skycoin/libskycoin dep
RUN go get github.com/gz-c/gox
RUN go get -t ./...
ENV CGO_ENABLED=1
Expand Down
2 changes: 0 additions & 2 deletions lib/cgo/tests/testutils/libsky_assert.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ GoInt_ isU8Eq(unsigned char p1[], unsigned char p2[], size_t len) {

return 1;
}
printf("p1 %s\n", p1);
printf("p2 %s\n", p2);
return 0;
}

Expand Down

0 comments on commit ada5e67

Please sign in to comment.