Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #38 Windows in Travis #111

Open
wants to merge 56 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
b37a293
[travis] refs #38 Added in matrix Windows
May 24, 2019
60ca669
[travis] refs #38 Discomment all matrix
May 24, 2019
5380d97
[ci-script] refs #38 Declare install make
May 24, 2019
512465b
[Makefile] refs #38 Declare new target to windows
May 24, 2019
9119bbe
[ci-travis] refs #38 Added `msys_nt-10.0` in `matrix uname_os_check` …
May 24, 2019
920b3cd
[ci-script] refs #38 Added `msys_nt-10.0/amd64` in `matrix is_support…
May 24, 2019
5a055d2
[ci-script] refs #38 Renaming the OS variable in install-golang-lint
May 24, 2019
8e99d55
[ci-script] refs #38 Change OS in `uname_os_check` to Windows
May 24, 2019
992eb8a
[ci-script] refs #38 Rename in `uname_os` `msys_nt-10.0 `=> `windows`
May 24, 2019
e9e2473
[vendor] refs #38 Eliminated the symbolic links and putting the physi…
May 24, 2019
bbafb2d
[ci-travis] refs #38 Update vendor and correcting uname
May 24, 2019
e56fb75
[travis] refs #38 Added govendor in checking missing vendor
May 24, 2019
c2ddf54
Merge branch 'develop' of https://github.com/skycoin/libskycoin into …
Jun 12, 2019
d4b79a0
[travis] refs #38 Remove install govendor
Jun 12, 2019
0678670
[Makefile] refs #38 Added `install-deps-libc-MSYS_NT-10.0`
Jun 12, 2019
b7fcf93
[Makefile] refs #38 Changes in `install-deps-libc-MSYS_NT-10.0` , tr…
Jun 13, 2019
8eed219
[Makefile] refs #38 Testing the installation of pkg-config for Windows
Jun 13, 2019
522eaef
[Makefile] refs #38 Commit all options in `install-deps-libc-MSYS_NT-…
Jun 13, 2019
bd4fb86
[Makefile] refs #38 Added tags `install-deps-skyapi-MSYS_NT-10.0`
Jun 13, 2019
a291509
[Makefile] refs #38 Added prefix in ./config `install-deps-libc-MSYS_…
Jun 13, 2019
5407df0
[Makefile] refs #38 Tryme cmake with nmake
Jun 17, 2019
c2267dc
[Makefile] refs #38 Trying to install libcheck with cmake
Jun 17, 2019
4d996c0
[makefile] refs #38 Define `CMAKE_INSTALL_PREFIX` in windows
Jun 17, 2019
44b3785
[makefile] refs #38 Remove parameter in conflict to `install-deps-lib…
Jun 17, 2019
295f5bb
[Makefile] refs #38 Added parameter in `install-deps-libc-MSYS_NT-10.…
Jun 17, 2019
11e2708
[makefile] refs #38 Commenting on the steps of cmake to detect the pr…
Jun 17, 2019
f9c8c36
[ci-script] refs #38 Added install curl in Windows
Jun 17, 2019
1e9a293
Merge branch 'develop' of https://github.com/skycoin/libskycoin into …
Jul 9, 2019
fead5f5
[ci-script] refs #38 Installing specifically `curl 7.58.0` in `windows`
Jul 9, 2019
6f463b7
[circle] refs #38 Comment all jobs in cicle
Jul 9, 2019
8ddfb5d
[ci-script] refs #38 Force downgrade curl
Jul 9, 2019
715a040
Merge branch 'master' of https://github.com/skycoin/libskycoin into s…
Jul 16, 2019
0a1abee
[circle] refs #38 Update configuration to working workflow
Jul 16, 2019
16b59c7
refs #38 Merge branch 'develop' of https://github.com/skycoin/libskyc…
Jul 27, 2019
b1a18b0
[Makefile] refs #38 Changes in make clean to remove qemu
Jul 27, 2019
5445a73
[Makefile] refs #38 Tryning install curl 7.58 in Windows
Jul 27, 2019
dc57e80
[Makrfile] refs #38 Comment check install
Jul 27, 2019
1dbcce9
[Makefile] refs #38 Commit install curl way make install
Jul 27, 2019
1bf5b31
[skyapi] refs #38 Commet version required curl
Jul 27, 2019
461e6e2
[Makefile] refs #38 Tryning get vendor to compatible WIN
Jul 27, 2019
fccc627
[travis] refs #38 Remove last changes
Jul 27, 2019
90f819f
[skyapi][travis] refs #38 Using curl the travis
Jul 27, 2019
d8cc67a
[skyapi] refs #38 Ignore version the curl
Jul 27, 2019
dfe7391
Merge remote-tracking branch 'origin/develop' into stdevHan_t38_windo…
stdevMac Aug 5, 2019
08a419e
[Makefile][travis] refs #38 Added mingw32-zlib in windows
Aug 28, 2019
cf820ca
[Makefile] refs #38 Tryning install curl==7.58
Aug 28, 2019
c4a744f
[Makefile] refs #38 Separe sentence by step
Aug 28, 2019
2223a6a
[Makefile] refs #38 Create missing folder
Aug 28, 2019
8effbfe
[Makefile] refs #38 Added installer curl in root by Windows
Aug 28, 2019
53a3848
refs #38 Merge branch 'develop' of https://github.com/fibercrypto/lib…
Dec 6, 2019
47f72ee
[Makefile] refs #38 Rename all tags to used OS
Dec 6, 2019
00e61f9
[Makefile] refs #38 Try install skyapi in MSYS
Dec 6, 2019
e7c5757
[Makefile] refs #38 Try install curl version 7.58.0 the choco
Dec 6, 2019
815de5a
[Makefile] refs #38 Refactor tags `make lint`
Dec 6, 2019
d43589c
[Travis] refs #38 Restore default step to script
Dec 6, 2019
58dfdd6
Merge branch 'develop' into stdevHan_t38_windows_travis
m4yk3ldev Jan 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
sudo: required
language: go
go:
- "1.11.x"
matrix:
include:
- os: linux
dist: xenial
- os: osx
# - os: linux
# dist: xenial
# - os: osx
# osx_image: xcode8.3
- os: windows
before_install:
- ./ci-scripts/install-travis-gcc.sh
- eval "CC=gcc-6 && CXX=g++-6"
Expand Down
61 changes: 47 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

COIN ?= skycoin

CC = gcc

# Resource paths
# --- Absolute path to repository root
LIBSRC_ABS_PATH = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
Expand Down Expand Up @@ -68,9 +70,9 @@ ifeq ($(UNAME_S),Linux)
LDPATH=$(shell printenv LD_LIBRARY_PATH)
LDPATHVAR=LD_LIBRARY_PATH
LDFLAGS=$(LIBC_FLAGS) $(STDC_FLAG)
OSNAME ?= linux
OSNAME = linux
else ifeq ($(UNAME_S),Darwin)
OSNAME ?= osx
OSNAME = osx
LDLIBS = $(LIBC_LIBS)
LDPATH=$(shell printenv DYLD_LIBRARY_PATH)
LDPATHVAR=DYLD_LIBRARY_PATH
Expand All @@ -80,6 +82,7 @@ else
LDPATH=$(shell printenv LD_LIBRARY_PATH)
LDPATHVAR=LD_LIBRARY_PATH
LDFLAGS=$(LIBC_FLAGS)
OSNAME = win
endif

configure-build:
Expand Down Expand Up @@ -153,42 +156,58 @@ docs-libc: ## Generate libskycoin documentation

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

lint: ## Run linters. Use make install-linters first.
lint-linux: ## Run linters. Use make install-linters first.
vendorcheck ./...
# lib/cgo needs separate linting rules
golangci-lint run -c .golangci.libcgo.yml ./lib/cgo/...
# The govet version in golangci-lint is out of date and has spurious warnings, run it separately
go vet -all ./...

lint-osx: ## Run linters. Use make install-linters first.
vendorcheck ./...
# lib/cgo needs separate linting rules
golangci-lint run -c .golangci.libcgo.yml ./lib/cgo/...
# The govet version in golangci-lint is out of date and has spurious warnings, run it separately
go vet -all ./...

lint-win:

lint: lint-$(OSNAME)

lint-libc: format-libc
# Linter LIBC
clang-tidy lib/cgo/tests/*.c -- $(LIBC_FLAGS) -Wincompatible-pointer-types


check: lint test-libc lint-libc test-skyapi ## Run tests and linters

install-linters-Linux: ## Install linters on GNU/Linux
install-linters-linux: ## Install linters on GNU/Linux
sudo apt-get update
sudo apt-get install $(PKG_CLANG_FORMAT) -y
sudo apt-get install $(PKG_CLANG_LINTER) -y

install-linters-Darwin: ## Install linters on Mac OSX
install-linters-win: ## Install linters on Windows


install-linters-osx: ## Install linters on Mac OSX
# brew install $(PKG_CLANG_FORMAT)
brew install llvm
ln -s "/usr/local/opt/llvm/bin/clang-format" "/usr/local/bin/clang-format"
ln -s "/usr/local/opt/llvm/bin/clang-tidy" "/usr/local/bin/clang-tidy"

install-deps-Linux: ## Install deps on GNU/Linux
install-deps-linux: ## Install deps on GNU/Linux
sudo apt-get install $(PKG_LIB_TEST)

install-deps-Darwin: ## Install deps on Mac OSX
install-deps-osx: ## Install deps on Mac OSX
brew install $(PKG_LIB_TEST)

install-linters: install-linters-$(UNAME_S) ## Install linters


install-linters: install-linters-$(OSNAME) ## Install linters
go get -u github.com/FiloSottile/vendorcheck
cat ./ci-scripts/install-golangci-lint.sh | sh -s -- -b $(GOPATH)/bin v1.10.2

install-deps-skyapi-Linux:
install-deps-skyapi-linux:
mkdir -p deps
sudo add-apt-repository ppa:george-edison55/cmake-3.x -y
sudo apt-get update
Expand All @@ -198,28 +217,41 @@ install-deps-skyapi-Linux:
(cd deps && wget http://curl.haxx.se/download/curl-7.58.0.tar.gz && tar -xvf curl-7.58.0.tar.gz && cd curl-7.58.0/ && ./configure && make && sudo make install)
(cd deps && git clone https://github.com/uncrustify/uncrustify.git && cd uncrustify && mkdir build && cd build && cmake .. && make && sudo make install)

install-deps-skyapi-Darwin:
install-deps-skyapi-osx:
export LDFLAGS="-L/usr/local/opt/curl/lib"
export CPPFLAGS="-I/usr/local/opt/curl/include"
mkdir -p deps
brew update
brew install openssl curl uncrustify || true
(cd deps && wget http://curl.haxx.se/download/curl-7.58.0.tar.gz && tar -xf curl-7.58.0.tar.gz && cd curl-7.58.0/ && mkdir build && cd build && cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl .. && make && sudo make install)

install-deps-libc: install-deps-libc-$(UNAME_S) ## Install deps for libc
install-deps-skyapi-win:
mkdir -p C:/program
choco uninstall curl
choco install curl --version=7.58.0

install-deps-libc: install-deps-libc-$(OSNAME) ## Install deps for libc

install-deps-skyapi: install-deps-skyapi-$(UNAME_S) ## Install skyapi(libcurl based) library.
install-deps-skyapi: install-deps-skyapi-$(OSNAME) ## Install skyapi(libcurl based) library.

install-deps-libc-Linux: configure-build check-0.12.0/src/.libs/libcheck.so ## Install locally dependencies for testing libskycoin
install-deps-libc-linux: configure-build check-0.12.0/src/.libs/libcheck.so ## Install locally dependencies for testing libskycoin

check-0.12.0/src/.libs/libcheck.so: ## Install libcheck
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-Darwin: configure-build ## Install locally dependencies for testing libskycoin
install-deps-libc-osx: configure-build ## Install locally dependencies for testing libskycoin
brew install check

install-deps-libc-win: ## Install deps on Windows
# mkdir C:/program
# wget -c https://github.com/libcheck/check/releases/download/0.12.0/check-0.12.0.tar.gz
# tar -xvf check-0.12.0.tar.gz
# cd check-0.12.0 && ./configure --prefix=/usr --disable-static
# cd check-0.12.0 && make
# cd check-0.12.0 && make install

install-deps: install-deps-libc install-deps-skyapi ## Install deps for libc and skyapi

format: ## Formats the code. Must have goimports installed (use make install-linters).
Expand All @@ -231,6 +263,7 @@ clean-libc: ## Clean files generated by libc
rm -rfv qemu_test_libskycoin*
rm -rfv qemu_*
rm -rfv include/libskycoin.h
rm -fv core

clean-skyapi: ## Clean files generated by skyapi
rm -rfv $(BUILDLIBSKYAPI_DIR)
Expand Down
4 changes: 3 additions & 1 deletion ci-scripts/install-golangci-lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ is_supported_platform() {
windows/386) found=0 ;;
linux/amd64) found=0 ;;
linux/386) found=0 ;;
msys_nt-10.0/amd64) found=0 ;;
esac
return $found
}
Expand Down Expand Up @@ -174,7 +175,7 @@ log_crit() {
uname_os() {
os=$(uname -s | tr '[:upper:]' '[:lower:]')
case "$os" in
msys_nt) os="windows" ;;
msys_nt*) os="windows" ;;
esac
echo "$os"
}
Expand Down Expand Up @@ -355,6 +356,7 @@ PREFIX="$OWNER/$REPO"
log_prefix() {
echo "$PREFIX"
}

PLATFORM="${OS}/${ARCH}"
GITHUB_DOWNLOAD=https://github.com/${OWNER}/${REPO}/releases/download

Expand Down
8 changes: 8 additions & 0 deletions ci-scripts/install-travis-gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-get install -qq gcc-6 g++-6
sudo apt-get install cmake
fi

if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
Expand All @@ -17,5 +18,12 @@ if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install gcc\@6 || brew link --overwrite gcc\@6
fi

if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
choco install make
choco install pkgconfiglite
choco install sudo
# choco install curl --force --version 7.58.0
fi

cd $TRAVIS_BUILD_DIR

152 changes: 152 additions & 0 deletions vendor/github.com/skycoin/libskycoin/lib/cgo/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading