Commit Graph

39 Commits

Author SHA1 Message Date
Jakub Sztandera
a6053d631a mk: fix maketarball to work with gomod
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-13 23:05:48 +01:00
Jakub Sztandera
c8c0c48e2d mk: change git-hash command to include information about modifications
With this command we will get hash information as well as information if
build was made using uncommited files.

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-07 00:42:19 +01:00
Steven Allen
cc315dc77f
Merge pull request #6059 from ipfs/fix/make-build
mk: fix make install by not setting GOBIN
2019-03-06 13:31:23 -08:00
Jakub Sztandera
061128d1d3 mk: fix make install by not setting GOBIN
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-06 22:21:14 +01:00
Jakub Sztandera
3589eb989e go: require Golang 1.11.4
mod.sum generation had a fix in this version which probably is the
reason for #6056

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-06 13:27:52 +01:00
Jakub Sztandera
76f7a7694d gomod/mk: set GO111MODULE in Makefile
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-05 18:37:44 +01:00
Jakub Sztandera
21f3dae696 gomod: remove gopath check
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-05 18:33:58 +01:00
Jakub Sztandera
27f73fa7e4 gomod: use test binaries from go modules
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-05 18:33:58 +01:00
Jakub Sztandera
3e199ab3f7 mk: s/go-build/go-build-relative/
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-05 18:33:58 +01:00
Jakub Sztandera
7f80485d93 mk: remove gx from Makefiles
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-05 18:33:58 +01:00
Jakub Sztandera
16cfe4a5ea gomod: add coverage tools to go.mod
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-05 18:33:58 +01:00
Łukasz Magiera
d8a92224a7 ci: test on 32bit os
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-03-04 19:20:51 -08:00
Steven Allen
2aab5b9fba unexport GOFLAGS
We want to explicitly pass these where we need them.

fixes #5733

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-11-06 14:26:38 -08:00
Steven Allen
8b573dc771 switch to go 1.11
Go 1.11 changes the output of `go fmt` slightly so we either need to
all *downgrade* or *upgrade*. Let's upgrade.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-10-08 17:03:20 -07:00
rob-deutsch
aada0cc1e2 added freebsd cross-compile to 'make check' tests
License: MIT
Signed-off-by: Rob Deutsch <rdeutschob@gmail.com>
2018-09-24 20:35:06 +10:00
Steven Allen
0252710020 remove Godeps
fixes #2722

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-09-11 12:11:24 -07:00
Steven Allen
439b0e35dc fix check_go_path when it has spaces in it
fixes #5260

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-07-18 17:12:12 -07:00
Łukasz Magiera
22a25ef15c switch minimum go version to go 1.10
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
Signed-off-by: Victor Bjelkholm <git@victor.earth>
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-05-16 12:43:20 +01:00
Dominic Della Valle
317bc20f47 mk: fix commit string in version
License: MIT
Signed-off-by: Dominic Della Valle <ddvpublic@gmail.com>
2018-04-26 11:48:44 -04:00
Jakub Sztandera
2535220864 mk: add tarball support
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2018-04-05 19:18:22 +02:00
Jakub Sztandera
8c9725d88e Simplify GOPATH check
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2018-03-23 07:09:32 +01:00
Lars Gierth
ad18295955 build: match Go's GOPATH defaults behaviour
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2018-03-23 07:09:32 +01:00
Steven Allen
513b373a85 only run the build test on test_go_expensive
fixes #4642

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-02-03 13:31:04 +01:00
Steven Allen
f3ad2c95bd run os builds as a part of the test_go_* targets
We were doing this as part of the `test` target but we don't run that on CI (or
at least not on Travis).

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-12-15 16:17:43 -08:00
Steven Allen
bf30549370 enable build test for windows i386
closes #4438

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-12-15 16:17:43 -08:00
Whyrusleeping
bbdbd0ac6f
Merge pull request #4398 from ipfs/fix/hamt-bug
fix hamt delete issue
2017-12-05 20:53:51 +01:00
Jeromy
1a75c40f5b require go1.9
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-12-04 09:33:20 -08:00
Steven Allen
6917d2f08f build for all supported platforms when testing
fixes #4427

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-11-30 22:05:06 -08:00
Łukasz Magiera
9c40c31990 mk: fix plugin test fail
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-08-25 21:40:38 +02:00
Łukasz Magiera
00590fd293 mk: option to pass custom go executable
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-08-22 20:04:08 +02:00
Jakub Sztandera
d2cc708650
make(sharness): add plugins as part of sharness build
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-07-12 21:53:59 +02:00
Łukasz Magiera
c2603538fe docs: Require go 1.8
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-07-07 20:02:42 +02:00
zramsay
ae4cad3ff3 make: use correct location for [test_go_megacheck]
License: MIT
Signed-off-by: Zach Ramsay <zach.ramsay@gmail.com>
2017-06-01 14:04:30 -04:00
Jakub Sztandera
5ae31f4a2a
make: readd the path check functionality
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-03-15 13:12:28 +01:00
Lars Gierth
b54df01dbe make: fix build when symlinked into GOPATH
In workspace setups that have the source tree symlinked into GOPATH,
the `go list `command wouldn't recognize that we're technically within GOPATH,
because `pwd` doesn't look like it.

For example

	/home/user/go/src/github.com/ipfs/go-ipfs
	=> /home/user/go/ipfs/go-ipfs

produces the import path

	_/home/user/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-random/random

which is not within GOPATH.

We get around this by using fully-qualified import paths instead:
starting in github.com/ipfs/go-ipfs/ instead of ./

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2017-03-11 04:15:09 +01:00
Jakub Sztandera
1a5c21cd0b
mk/golang: fix multiple tags
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-02-12 01:53:54 +01:00
Jakub Sztandera
dc128cb470
Make gx less verbose
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-02-12 01:18:41 +01:00
Jakub Sztandera
545f03e9c3
Jenkins CI
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-02-12 01:18:41 +01:00
Jakub Sztandera
f630222580
make: rework makefiles for non-recursive make and add sharness coverage
This commit introduces non-recursive Makefile infrastructure that replaces current Makefile infrastructure.
It also generally cleanups the Makefiles, separates them into nicer sub-modules and centralizes common operations into single definitions.

It allows to depend on any target that is defined in the makefile, this means that for example `gx install` is called once when `make build test_expensive_sharness` is called instead of 4 or 5 times.

It also makes the dependencies much cleaner and allows for reuse of modules. For example sharness coverage collection (WIP) uses sharness target with amended PATH, previously it might have been possible but not without wiring in the coverage collection into sharness make runner code.

Yes, it is more complex but not much more. There are few rules that have to be followed and few complexities added but IMHO it is worth it.

How to NR-make:
1. If make is to generate some file via a target, it MUST be defined in Rules.mk file in the directory of the target.
2. `Rules.mk` file MUST have `include mk/header.mk` statement as the first line and `include mk/footer.mk` statement as the last line (apart from project root `Rules.mk`).
3. It then MUST be included by the closest `Rules.mk` file up the directory tree.
4. Inside a `Rules.mk` special variable accessed as `$(d)` is defined. Its value is current directory, use it so if the `Rules.mk` file is moved in the tree it still works without a problem. Caution: this variable is not available in the recipe part and MUST NOT be used. Use name of the target or prerequisite to extract it if you need it.
5. Make has only one global scope, this means that name conflicts are a thing. Names SHOULD  follow `VAR_NAME_$(d)` convention. There are exceptions from this rule in form of well defined global variables. Examples: General lists `TGT_BIN`, `CLEAN`; General targets: `TEST`, `COVERAGE`; General variables: `GOFLAGS`, `DEPS_GO`.
3. Any rules, definitions or variables that fit some family SHOULD be defined in `mk/$family.mk` file and included from project root `Rules.mk`

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-02-12 01:18:40 +01:00