From d2af40d22965eb37356280e6b61d1f0c95991c95 Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Tue, 5 Jan 2021 08:57:14 +0100 Subject: [PATCH 1/2] Update make targets to support parallel building. --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index a0d968e..3c35032 100644 --- a/Makefile +++ b/Makefile @@ -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: From 245e538fae91b344ae726f7c875d9d7bfce84aa0 Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Tue, 5 Jan 2021 08:58:53 +0100 Subject: [PATCH 2/2] CI: Enable parallel builds. --- .github/workflows/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e5e75c9..ab36591 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: |