Merge pull request #73 from strukturag/parallel-make

Update make targets to support parallel building.
This commit is contained in:
Joachim Bauch 2021-01-05 09:14:55 +01:00 committed by GitHub
commit 464a683e53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 9 deletions

View File

@ -39,8 +39,10 @@ jobs:
- name: Build applications
run: |
make client
make server
echo "Building with $(nproc) threads"
make client -j$(nproc)
make proxy -j$(nproc)
make server -j$(nproc)
- name: Run tests
run: |

View File

@ -99,26 +99,26 @@ coverhtml: dependencies vet common
sed -i "/_easyjson/d" cover.out && \
GOPATH=$(GOPATH) $(GO) tool cover -html=cover.out -o coverage.html
%_easyjson.go: %.go
%_easyjson.go: %.go easyjson
PATH=$(shell dirname $(GO)):$(PATH) GOPATH=$(GOPATH) ./vendor/bin/easyjson -all $*.go
common: easyjson \
common: \
src/signaling/api_signaling_easyjson.go \
src/signaling/api_backend_easyjson.go \
src/signaling/api_proxy_easyjson.go \
src/signaling/natsclient_easyjson.go \
src/signaling/room_easyjson.go
client: dependencies common
$(BINDIR):
mkdir -p $(BINDIR)
client: dependencies common $(BINDIR)
GOPATH=$(GOPATH) $(GO) build $(BUILDARGS) -ldflags '$(INTERNALLDFLAGS)' -o $(BINDIR)/client ./src/client/...
server: dependencies common
mkdir -p $(BINDIR)
server: dependencies common $(BINDIR)
GOPATH=$(GOPATH) $(GO) build $(BUILDARGS) -ldflags '$(INTERNALLDFLAGS)' -o $(BINDIR)/signaling ./src/server/...
proxy: dependencies common
mkdir -p $(BINDIR)
proxy: dependencies common $(BINDIR)
GOPATH=$(GOPATH) $(GO) build $(BUILDARGS) -ldflags '$(INTERNALLDFLAGS)' -o $(BINDIR)/proxy ./src/proxy/...
clean: