Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #78 from ibuildthecloud/master
Browse files Browse the repository at this point in the history
Run build in parallel
  • Loading branch information
ibuildthecloud authored Oct 15, 2018
2 parents 4dc9f5f + 75c364c commit 13acc90
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
15 changes: 11 additions & 4 deletions scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,21 @@ LDFLAGS="-X github.com/rancher/rio/version.Version=$VERSION -w -s"
STATIC="-extldflags -static"
STATIC_SQLITE="-extldflags '-static -lm -ldl -lz -lpthread'"

cross()
{
echo Building windows CLI
GOOS=windows GOARCH=amd64 go build -ldflags "$LDFLAGS" -o bin/rio-windows ./cli/main.go
echo Building mac CLI
GOOS=darwin GOARCH=amd64 go build -ldflags "$LDFLAGS" -o bin/rio-darwin ./cli/main.go
}

cross &

mkdir -p bin
echo Building incluster
CGO_ENABLED=0 go build -ldflags "$LDFLAGS $STATIC" -o bin/rio-incluster

echo Building cli full
CGO_ENABLED=1 go build -tags "static_build libsqlite3 k3s ctr netgo osusergo" -ldflags "$LDFLAGS $STATIC_SQLITE" -o bin/rio-full ./cli/main.go

echo Building windows CLI
GOOS=windows GOARCH=amd64 go build -ldflags "$LDFLAGS" -o bin/rio-windows ./cli/main.go
echo Building mac CLI
GOOS=darwin GOARCH=amd64 go build -ldflags "$LDFLAGS" -o bin/rio-darwin ./cli/main.go
wait
3 changes: 2 additions & 1 deletion scripts/ci
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ set -e

cd $(dirname $0)

./validate
./validate &
./build
wait
./package
./test

0 comments on commit 13acc90

Please sign in to comment.