Skip to content

Commit

Permalink
Merge remote-tracking branch 'simelo/v0.25dev' into stdevMac_t3_v0.25…
Browse files Browse the repository at this point in the history
….1_C_Wrapper_Skycoin_Api
  • Loading branch information
stdevMac committed May 6, 2019
2 parents f95f928 + 47f8d0f commit 284f3a9
Show file tree
Hide file tree
Showing 53 changed files with 4,463 additions and 4,624 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,6 @@ addresses.txt
seeds.csv

histogram
# Ignore compilator by qemu
qemu_*
core
18 changes: 8 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
sudo: required
dist: trusty
language: go
go:
- "1.11.x"

matrix:
include:
- os: linux
dist: xenial
env: VERSION_UPGRADE_TEST_WAIT_TIMEOUT=45s
- os: osx
osx_image: xcode8
osx_image: xcode8.3
env: VERSION_UPGRADE_TEST_WAIT_TIMEOUT=60s

before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt-get update -qq; fi
- VERSION=1.10.2 ./ci-scripts/install-golangci-lint.sh
- ./ci-scripts/install-travis-gcc.sh
- eval "CC=gcc-6 && CXX=g++-6"

env:
global:
- BUILD_DIR: build
- BUILDLIB_DIR: $BUILD_DIR/libskycoin
- LIB_DIR: lib
- CGO_ENABLED: 1

install:
# Install gox
Expand All @@ -30,18 +33,13 @@ install:
- pwd
- go get -t ./...
- make install-linters
# Install pinned golangci-lint, overriding the latest version install by make install-linters
- VERSION=1.10.2 ./ci-scripts/install-golangci-lint.sh
- ./ci-scripts/install-travis-gcc.sh
# Install pinned golangci-lint, overriding the latest version install by make install-linters
- make install-deps-libc

script:
- make lint
# libskycoin tests
- CC=gcc-6 make test-libc
- make check

notifications:
email:
- false
# https://github.com/kvld/travisci-telegram TravisCI Telegram Bot integration
email: false
webhooks: https://fathomless-fjord-24024.herokuapp.com/notify
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -469,4 +469,4 @@ Make sure to upgrade to v0.25.0 so that your node will continue to connect once
[0.20.1]: https://github.com/skycoin/skycoin/compare/v0.20.0...v0.20.1
[0.20.0]: https://github.com/skycoin/skycoin/compare/v0.19.1...v0.20.0
[0.19.1]: https://github.com/skycoin/skycoin/compare/v0.19.0...v0.19.1
[0.19.0]: https://github.com/skycoin/skycoin/commit/dd924e1f2de8fab945e05b3245dbeabf267f2910
[0.19.0]: https://github.com/skycoin/skycoin/commit/dd924e1f2de8fab945e05b3245dbeabf267f2910
28 changes: 17 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.DEFAULT_GOAL := help
.PHONY: test-libc test-lint build-libc check
.PHONY: install-linters format
.PHONY: install-linters format clean-libc
.PHONY: install-swagger


Expand Down Expand Up @@ -43,10 +43,11 @@ SWAGGER_FILES += skycoin.v0.25.1.openapi.v2.yml
# Compilation flags for libskycoin
CC_VERSION = $(shell $(CC) -dumpversion)
STDC_FLAG = $(python -c "if tuple(map(int, '$(CC_VERSION)'.split('.'))) < (6,): print('-std=C99'")
LIBC_LIBS = -lcriterion
LIBC_LIBS = `pkg-config --cflags --libs check`
LIBC_FLAGS = -I$(LIBSRC_DIR) -I$(INCLUDE_DIR) -I$(BUILD_DIR)/usr/include -L $(BUILDLIB_DIR) -L$(BUILD_DIR)/usr/lib
# Platform specific checks
OSNAME = $(TRAVIS_OS_NAME)
CGO_ENABLED=1

ifeq ($(shell uname -s),Linux)
LDLIBS=$(LIBC_LIBS) -lpthread
Expand Down Expand Up @@ -127,7 +128,7 @@ test-libc: build-libc ## Run tests for libskycoin C client library
$(CC) -o $(BIN_DIR)/test_libskycoin_shared $(LIB_DIR)/cgo/tests/*.c $(LIB_DIR)/cgo/tests/testutils/*.c -lskycoin $(LDLIBS) $(LDFLAGS)
$(CC) -o $(BIN_DIR)/test_libskycoin_static $(LIB_DIR)/cgo/tests/*.c $(LIB_DIR)/cgo/tests/testutils/*.c $(BUILDLIB_DIR)/libskycoin.a $(LDLIBS) $(LDFLAGS)
$(LDPATHVAR)="$(LDPATH):$(BUILD_DIR)/usr/lib:$(BUILDLIB_DIR)" $(BIN_DIR)/test_libskycoin_shared
$(LDPATHVAR)="$(LDPATH):$(BUILD_DIR)/usr/lib" $(BIN_DIR)/test_libskycoin_static
$(LDPATHVAR)="$(LDPATH):$(BUILD_DIR)/usr/lib" $(BIN_DIR)/test_libskycoin_static

docs-libc:
doxygen ./.Doxyfile
Expand All @@ -150,18 +151,23 @@ install-linters: ## Install linters
# However, they suggest `curl ... | bash` which we should not do
go get -u github.com/golangci/golangci-lint/cmd/golangci-lint

install-deps-libc: configure-build ## Install locally dependencies for testing libskycoin
git clone --recursive https://github.com/skycoin/Criterion $(BUILD_DIR)/usr/tmp/Criterion
mkdir $(BUILD_DIR)/usr/tmp/Criterion/build
cd $(BUILD_DIR)/usr/tmp/Criterion/build && cmake .. && cmake --build .
mv $(BUILD_DIR)/usr/tmp/Criterion/build/libcriterion.* $(BUILD_DIR)/usr/lib/
cp -R $(BUILD_DIR)/usr/tmp/Criterion/include/* $(BUILD_DIR)/usr/include/
install-deps-libc: install-deps-libc-$(OSNAME)

install-deps-swagger: ## Install swagger
go get -u github.com/go-swagger/go-swagger/cmd/swagger
install-deps-libc-linux: configure-build ## Install locally dependencies for testing libskycoin
wget -c https://github.com/libcheck/check/releases/download/0.12.0/check-0.12.0.tar.gz
tar -xzf check-0.12.0.tar.gz
cd check-0.12.0 && ./configure --prefix=/usr --disable-static && make && sudo make install

install-deps-libc-osx: configure-build ## Install locally dependencies for testing libskycoin
brew install check

format: ## Formats the code. Must have goimports installed (use make install-linters).
goimports -w -local github.com/skycoin/skycoin ./lib

clean-libc: ## Clean files generate by library
rm -rfv $(BUILDLIB_DIR)/libskycoin.so
rm -rfv $(BUILDLIB_DIR)/libskycoin.a
rm -rfv qemu_test_libskycoin*

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

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

if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-get install -qq g++-6 && sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 90;
sudo apt-get install -qq gcc-6 g++-6
fi

if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
Expand Down
157 changes: 0 additions & 157 deletions ci-scripts/integration-test-auth.sh

This file was deleted.

Loading

0 comments on commit 284f3a9

Please sign in to comment.