Skip to content

Commit

Permalink
Update CI to do parallel builds
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Sim <[email protected]>
  • Loading branch information
ihcsim committed May 26, 2024
1 parent 1421a04 commit 7d7c6a2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ on:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read
pull-requests: read

jobs:
build:
prebuild:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -17,4 +22,25 @@ jobs:
version: v1.58
- run: make codegen-verify
- run: make test
- run: make build
- uses: actions/upload-artifact@v4
with:
name: build
path: ${{ github.workspace }}

controller:
needs: prebuild
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: build
- run: make controller

plugin:
needs: prebuild
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: build
- run: make plugin
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ OPENAPI_GO_PKG := github.com/ihcsim/k8s-dra/pkg/openapi

BOILERPLATE_FILE := hack/boilerplate.go.txt

build: controller plugin
build: test controller plugin

controller: tidy lint
controller:
GOOS=$(GOOS) GOARCH=$(GOARCH) go build ./cmd/controller

plugin: tidy lint
plugin:
GOOS=$(GOOS) GOARCH=$(GOARCH) go build ./cmd/plugin

test: tidy lint
Expand Down

0 comments on commit 7d7c6a2

Please sign in to comment.