mirror of
https://github.com/taigrr/arc
synced 2025-01-18 04:33:13 -08:00
add build instructions
This commit is contained in:
parent
0075ef607f
commit
cdd799359b
17
INSTALL.md
Normal file
17
INSTALL.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# arc - build instructions
|
||||||
|
|
||||||
|
arc is written in Go and all dependencies are vendored so building can be
|
||||||
|
as simple as running `go get github.com/wg/arc` or checking out the code
|
||||||
|
into a Go workspace and running `go install github.com/wg/arc`.
|
||||||
|
|
||||||
|
Building an executable that is identical to a released binary requires a
|
||||||
|
number of conditions be met:
|
||||||
|
|
||||||
|
1. the Go toolchain version must be identical
|
||||||
|
2. GOROOT, GOPATH and PWD must be identical
|
||||||
|
3. the path separator character must be "/"
|
||||||
|
|
||||||
|
The Go compiler creates executables with debug information containing
|
||||||
|
filesystem paths of all packages used to build the executable as well as
|
||||||
|
the working directory. Aside from that its output is deterministic, even
|
||||||
|
when cross compiling.
|
34
circle.yml
Normal file
34
circle.yml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
machine:
|
||||||
|
environment:
|
||||||
|
GOPATH: /go
|
||||||
|
PROJECT: $CIRCLE_PROJECT_REPONAME
|
||||||
|
IMPORT: github.com/$CIRCLE_PROJECT_USERNAME/$PROJECT
|
||||||
|
GOPKG: go1.6.2.linux-amd64.tar.gz
|
||||||
|
|
||||||
|
checkout:
|
||||||
|
post:
|
||||||
|
- sudo mkdir -p $GOPATH
|
||||||
|
- sudo chown $USER $GOPATH
|
||||||
|
- mkdir -p $GOPATH/src/$IMPORT
|
||||||
|
- cp -r * $GOPATH/src/$IMPORT
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
pre:
|
||||||
|
- sudo rm -rf /usr/local/go
|
||||||
|
- curl -O https://storage.googleapis.com/golang/$GOPKG
|
||||||
|
- sudo tar -xf $GOPKG -C /usr/local
|
||||||
|
override:
|
||||||
|
- echo 'export GOPATH=$GOPATH' >> ~/.circlerc
|
||||||
|
|
||||||
|
test:
|
||||||
|
pre:
|
||||||
|
- go version
|
||||||
|
- go env
|
||||||
|
override:
|
||||||
|
- go test -v -race $IMPORT/...
|
||||||
|
post:
|
||||||
|
- cd /go && GOOS=darwin GOARCH=amd64 go build -o $CIRCLE_ARTIFACTS/darwin/amd64/$PROJECT $IMPORT
|
||||||
|
- cd /go && GOOS=freebsd GOARCH=amd64 go build -o $CIRCLE_ARTIFACTS/freebsd/amd64/$PROJECT $IMPORT
|
||||||
|
- cd /go && GOOS=linux GOARCH=amd64 go build -o $CIRCLE_ARTIFACTS/linux/amd64/$PROJECT $IMPORT
|
||||||
|
- cd /go && GOOS=windows GOARCH=amd64 go build -o $CIRCLE_ARTIFACTS/windows/amd64/$PROJECT.exe $IMPORT
|
||||||
|
- find $CIRCLE_ARTIFACTS -type f -exec shasum -a 256 {} \; | tee $CIRCLE_ARTIFACTS/sha256.txt
|
Loading…
x
Reference in New Issue
Block a user