Fix CI build and update Makefile to build all services
Some checks failed
CI / Test (pull_request) Failing after 13s
CI / Lint (pull_request) Failing after 12s
CI / Build (pull_request) Failing after 5s
CI / Format Check (pull_request) Failing after 2s

- Add $HOME/go/bin to PATH using $GITHUB_PATH for protoc plugins
- Update Makefile build target to build all service binaries:
  - platform, api-gateway, auth-service, identity-service, authz-service, audit-service
- Update CI workflow to use 'make build' instead of individual commands
- Upload all service binaries as CI artifacts
- Fixes protoc plugin discovery and ensures all services are built
This commit is contained in:
2025-11-06 22:34:49 +01:00
parent be9baee180
commit ea022365a9
2 changed files with 15 additions and 6 deletions

View File

@@ -38,6 +38,7 @@ jobs:
apk add --no-cache protobuf-dev protoc
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Generate protobuf files
run: make generate-proto
@@ -102,6 +103,7 @@ jobs:
apk add --no-cache protobuf-dev protoc
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Generate protobuf files
run: make generate-proto
@@ -147,6 +149,7 @@ jobs:
apk add --no-cache protobuf-dev protoc
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Generate protobuf files
run: make generate-proto
@@ -159,9 +162,7 @@ jobs:
fi
- name: Build
run: |
go build -v -o bin/platform ./cmd/platform
go build -v -o bin/api-gateway ./cmd/api-gateway
run: make build
- name: Upload build artifacts
uses: actions/upload-artifact@v3
@@ -170,6 +171,10 @@ jobs:
path: |
bin/platform
bin/api-gateway
bin/auth-service
bin/identity-service
bin/authz-service
bin/audit-service
retention-days: 7
fmt:

View File

@@ -18,7 +18,7 @@ help:
@echo " make lint - Run linters"
@echo " make fmt - Format code"
@echo " make fmt-check - Check code formatting"
@echo " make build - Build platform and api-gateway binaries"
@echo " make build - Build all service binaries"
@echo " make clean - Clean build artifacts"
@echo " make docker-build - Build Docker image"
@echo " make docker-run - Run Docker container"
@@ -85,10 +85,14 @@ fmt-check:
@echo "Code is properly formatted"
build:
@echo "Building platform and api-gateway binaries..."
@echo "Building all service binaries..."
$(GO) build -v -o bin/platform ./cmd/platform
$(GO) build -v -o bin/api-gateway ./cmd/api-gateway
@echo "Build complete: bin/platform, bin/api-gateway"
$(GO) build -v -o bin/auth-service ./cmd/auth-service
$(GO) build -v -o bin/identity-service ./cmd/identity-service
$(GO) build -v -o bin/authz-service ./cmd/authz-service
$(GO) build -v -o bin/audit-service ./cmd/audit-service
@echo "Build complete: bin/platform, bin/api-gateway, bin/auth-service, bin/identity-service, bin/authz-service, bin/audit-service"
clean:
@echo "Cleaning build artifacts..."