I am having a issue where my forked repo is not building:
go install github.com/ory-am/hydra
can't load package: package github.com/ory-am/hydra: cannot find package "github.com/ory-am/hydra" in any of:
/home/travis/.gimme/versions/go1.5.linux.amd64/src/github.com/ory-am/hydra (from $GOROOT)
/home/travis/gopath/src/github.com/ory-am/hydra (from $GOPATH)
https://travis-ci.org/emilva/hydra/jobs/166870439#L454
The reason for this error is that any forked repo slug /github-username/hydra will never match /ory-am/hydra.
Suggested fix is to re-run line 247-250 https://travis-ci.org/emilva/hydra/jobs/166870439#L247
with ory-am/hydra instead of the forked repo slug
This can probably easily be solved by replacing go install github.com/ory-am/hydra with go install .
No, that will not work, as there are other packages inside ory-am/hydra that the install depends on. When doing that we get this warning:
`[WARN] The name listed in the config file (github.com/ory-am/hydra) does not match the current location (github.com/emilva/hydra)``
and subsequently a failure:
main.go:7:2: cannot find package "github.com/ory-am/hydra/cmd" in any of:
/home/travis/gopath/src/github.com/emilva/hydra/vendor/github.com/ory-am/hydra/cmd (vendor tree)
/home/travis/.gimme/versions/go1.5.linux.amd64/src/github.com/ory-am/hydra/cmd (from $GOROOT)
/home/travis/gopath/src/github.com/ory-am/hydra/cmd (from $GOPATH)
The command "go install ." failed and exited with 1 during .
https://travis-ci.org/emilva/hydra/jobs/166904313#L450
Ah yes, I forgot about that part. I'm not sure if this is what you suggested, but maybe there is a way to tell travis to put the source code in src/github.com/ory-am/hydra instead?
Yupp. Tried something like that in 馃憠 https://github.com/emilva/hydra/commit/26a59b0c9c988d5ee7646ff31f2dbdf2bbd7aa74
however, now it fails further down in some test I think https://travis-ci.org/emilva/hydra/jobs/166904073#L883
Found a related fix for it here, but have not yet made it work in this repo.
Looks like it's working almost! The culprit is now coveralls, which is trying to push the changes to coveralls.io but since the fork isn't registered there, this fails: https://travis-ci.org/emilva/hydra/jobs/166904073#L631
One idea might be to move this to after_success:
By the way, the way cfssl is doing it (https://github.com/cloudflare/cfssl/blob/master/.travis.yml#L20-L27) looks really cool, because it's just 2 lines of code without rsync dependency :)
Yupp, I will revisit it and take a look at it later!
Moved it and now the build is green! However, I still see this strange error message at the end tho:
https://travis-ci.org/emilva/hydra/jobs/167926554#L884
is it intended?
Still having some issues with just a simple create dir and move commands.
It works for go1.7 but not for the two other versions. Any idea why?
Failed build:
https://travis-ci.org/emilva/hydra/jobs/167935209#L270
Successful:
https://travis-ci.org/emilva/hydra/jobs/167935211
Yes, Hydra builds only on Go 1.7 from now on
at least in the 0.6.0 branch
It may be simpler to set the go_import_path explicitly in .travis.yml. See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
馃憤
Most helpful comment
It may be simpler to set the
go_import_pathexplicitly in.travis.yml. See https://docs.travis-ci.com/user/languages/go#Go-Import-Path