Skip to content

Commit

Permalink
Merge pull request #103 from simelo/stdevHan_t28_rest_api_hwd
Browse files Browse the repository at this point in the history
Fixes #28 Client implemented for hardware wallet daemon REST API
  • Loading branch information
olemis authored Aug 4, 2019
2 parents b2f930c + 300dd18 commit c5e7c0b
Show file tree
Hide file tree
Showing 81 changed files with 25,100 additions and 15,272 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ install:
- make install-deps-libc
- make install-deps-skyapi
script:
- make build-skyapi
- make build
- make lint
- make test-libc
- make test
- make lint-libc
- make test-skyapi

before_deploy:
- export VERSION="$(git describe --tags --exact-match HEAD 2> /dev/null)"
Expand Down
28 changes: 24 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DEFAULT_GOAL := help
.PHONY: test-libc test-lint build-libc check build build-skyapi test-skyapi
.PHONY: install-linters format clean-libc format-libc lint-libc docs
.PHONY: build-skyhwd test-skyhwd

COIN ?= skycoin

Expand All @@ -24,16 +25,21 @@ SKYVENDOR_REL_PATH = $(SKYSRC_REL_PATH)/vendor
BUILD_DIR = build
BUILDLIB_DIR = $(BUILD_DIR)/libskycoin
BUILDLIBSKYAPI_DIR = $(BUILD_DIR)/libskyapi
BUILDLIBSKYHWD_DIR = $(BUILD_DIR)/libskyhwd
LIBNAME_Linux = libskyapi.so
LIBHWDNAME_Linux = libskyhwd.so
LIBNAME_Darwin = libskyapi.dylib
LIBHWDNAME_Darwin = libskyhwd.dylib
LIBNAME_Static = libskyapiStatic.a
LIBHWDNAME_Static = libskyhwdStatic.a
LIB_DIR = lib
BIN_DIR = bin
DOC_DIR = docs
INCLUDE_DIR = include
LIBSRC_DIR = lib/cgo
LIBSKYDOC_DIR = $(DOC_DIR)/libc
LIBCURLDOC_DIR = $(DOC_DIR)/curl
LIBSKYHWDDOC_DIR = $(DOC_DIR)/skyhwd
SWAGGER_SPEC_DIR = lib/swagger
SWAGGER_CLIENT_DIR = lib/curl

Expand Down Expand Up @@ -106,7 +112,13 @@ build-skyapi: ## Build skyapi(libcurl based) library
cp lib/curl/build/$(LIBNAME_$(UNAME_S)) ./build/libskyapi
cp lib/curl/build/$(LIBNAME_Static) ./build/libskyapi

build: build-libc build-skyapi ## Build libraries
build-skyhwd: ## Build skyhwd(libcurl based) library
(cd lib/skyhwd && bash ./install_lib_curl.sh)
mkdir -p ./build/libskyhwd
cp lib/skyhwd/build/$(LIBHWDNAME_$(UNAME_S)) ./build/libskyhwd
cp lib/skyhwd/build/$(LIBHWDNAME_Static) ./build/libskyhwd

build: build-libc build-skyapi build-skyhwd ## Build libraries

## Build libskycoin C client library and executable C test suites
## with debug symbols. Use this target to debug the source code
Expand All @@ -124,16 +136,21 @@ test-libc: build-libc ## Run tests for libskycoin C client library

test-skyapi: build-skyapi ## Run test for skyapi(libcurl based) library

test: test-libc test-skyapi ## Run all test for libskycoin
test-skyhwd: build-skyhwd ## Run test for Hardware Wallet Daemon(libcurl based) library

test: test-libc test-skyapi test-skyhwd ## Run all test for libskycoin

docs-skyapi: ## Generate SkyApi (libcurl) documentation
openapi-generator generate -g html2 -i lib/swagger/skycoin.v0.25.1.openapi.v2.yml -o $(LIBCURLDOC_DIR)

docs-skyhwd: ## Generate SkyHWD (libcurl) documentation
openapi-generator generate -g html2 -i lib/swagger/hardware-wallet-daemon.v0.1.0.yaml -o $(LIBSKYHWDDOC_DIR)

docs-libc: ## Generate libskycoin documentation
doxygen ./.Doxyfile
moxygen -o $(LIBSKYDOC_DIR)/API.md $(LIBSKYDOC_DIR)/xml/

docs: docs-libc docs-skyapi ## Generate documentation for all libraries
docs: docs-libc docs-skyapi docs-skyhwd ## Generate documentation for all libraries

lint: ## Run linters. Use make install-linters first.
vendorcheck ./...
Expand Down Expand Up @@ -214,7 +231,10 @@ clean-libc: ## Clean files generated by libc
clean-skyapi: ## Clean files generated by skyapi
rm -rfv $(BUILDLIBSKYAPI_DIR)

clean: clean-libc clean-skyapi ## Clean all files generated by libraries
clean-skyhwd: ## Clean files generated by skyhwd
rm -rfv $(BUILDLIBSKYHWD_DIR)

clean: clean-libc clean-skyapi clean-skyhwd ## Clean all files generated by libraries

format-libc:
$(PKG_CLANG_FORMAT) -sort-includes -i -assume-filename=.clang-format lib/cgo/tests/*.c
Expand Down
2 changes: 1 addition & 1 deletion ci-scripts/docker_install_debian.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

apt-get update
apt-get install gcc-6 g++-6 wget cmake libcurl3-gnutls -y
apt-get install gcc g++ wget cmake libcurl3-gnutls -y

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
Expand Down
2 changes: 1 addition & 1 deletion docs/curl/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.4
4.0.3
Loading

0 comments on commit c5e7c0b

Please sign in to comment.