Commit Graph

13 Commits

Author SHA1 Message Date
Felix Lange
effaf18523
build: improve cross compilation setup (#22804)
This PR cleans up the CI build system and fixes a couple of issues.

- The go tool launcher code has been moved to internal/build. With the new
  toolchain functions, the environment of the host Go (i.e. the one that built
  ci.go) and the target Go (i.e. the toolchain downloaded by -dlgo) are isolated
  more strictly. This is important to make cross compilation and -dlgo work
  correctly in more cases.
- The -dlgo option now skips the download and uses the host Go if the running Go
  version matches dlgoVersion exactly.
- The 'test' command now supports -dlgo, -cc and -arch. Running unit tests with
  foreign GOARCH is occasionally useful. For example, it can be used to run
  32-bit tests on Windows. It can also be used to run darwin/amd64 tests on
  darwin/arm64 using Rosetta 2.
- The 'aar', 'xcode' and 'xgo' commands now use a slightly different method to
  install external tools. They previously used `go get`, but this comes with the
  annoying side effect of modifying go.mod. They now use `go install` instead,
  which is the recommended way of installing tools without modifying the local
  module.
- The old build warning about outdated Go version has been removed because we're
  much better at keeping backwards compatibility now.
2021-05-04 13:01:20 +02:00
Aleksey @soar Smyrnov
f3478f2899 internal/build: fix commit extraction for detached head repo (#18315)
* Fix commit extraction

* Comments for commit extraction

Requested in https://github.com/ethereum/go-ethereum/pull/18315
2019-08-08 12:05:35 +03:00
Péter Szilágyi
f0bced30bb
internal/build: fix Travis and AppVeyor commit string injection 2019-05-27 18:41:47 +03:00
C. Brown
be4d74f8d2 cmd, internal/build, docker: advertise commit date in unstable build versions (#19522)
* add-date-to unstable

* fields-insteadof-split

* internal/build: support building with missing git

* docker: add git history back to support commit date in version

* internal/build: use PR commits hashes for PR builds
2019-05-08 16:44:28 +03:00
ferhat elmas
52ad848b2e internal/build: fix usage of strings.TrimLeft (#16066) 2018-02-12 11:18:35 +02:00
Péter Szilágyi
e401536c97
dockerignore, internal/build: forward correct git folder 2017-11-12 22:52:41 +02:00
Arba Sasmoyo
f47adc9ea8 .dockerignore, internal/build: Read git information directly from file (#15458)
* .dockerignore, internal/build: Read git information directly from file

This commit changes the way of retrieving git commit and branch for build
environment from running git command to reading git files directly.

This commit also adds required git files into Docker build context.

fixes: #15346

* .dockerignore: workaround for including some files in .git
2017-11-12 22:00:18 +02:00
Péter Szilágyi
c76ad94492 .travis, build: autodelete old unstable archives (#13867)
This commit adds a build step to travis to auto-delete unstable archives older than
14 days (our regular release schedule) from Azure via ci.go purge.

The commit also pulls in the latest Azure storage code, also switching over from
the old import path (github.com/Azure/azure-sdk-for-go) to the new split one
(github.com/Azure/azure-storage-go).
2017-04-06 12:53:33 +02:00
Felix Lange
20899c05a4 internal/build: use 'git tag --points-at' to get the current tag
This should restore support for building with git 1.x.
2016-11-27 18:42:48 +01:00
Felix Lange
e1e2df656a internal/build: add support for git tag in local Environment
I didn't add this initially because the command I tried was too slow.
The 'git for-each-ref ...' invocation takes 40ms on my machine. That
ought to be acceptable.
2016-11-23 10:40:22 +01:00
Felix Lange
82e09c17a9 internal/build: fix git tag env variable for AppVeyor 2016-10-03 17:19:43 +02:00
Felix Lange
b4b5921dd0 internal/build: use less edgy command to get the branch name 2016-10-03 10:22:14 +02:00
Felix Lange
4f7627972e build: improve debian packaging
This commit tweaks the debian packaging tool:

* All build environment metadata can now be overriden on the command
  line. This allows testing the CI build behaviour locally.
* -unstable packages now actually contain the binaries (oops)
* packages use Go 1.7 to build
* archiving is skipped for PR builds
2016-10-02 13:08:56 +02:00