Skip to content

Commit

Permalink
Fix release binaries build
Browse files Browse the repository at this point in the history
  • Loading branch information
anjmao committed Mar 14, 2024
1 parent 39a8b19 commit ea47c14
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 46 deletions.
28 changes: 2 additions & 26 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,34 +42,10 @@ jobs:
go-version: '1.21'

- name: Build agent go binary amd64
run: VERSION=${RELEASE_TAG:-commit-$GITHUB_SHA} make kvisor-agent
env:
GOOS: linux
GOARCH: amd64
CGO_ENABLED: 0
run: UNAME_M=x86_64 VERSION=${RELEASE_TAG:-commit-$GITHUB_SHA} make kvisor-agent

- name: Build controller go binary amd64
run: VERSION=${RELEASE_TAG:-commit-$GITHUB_SHA} make kvisor-controller
env:
GOOS: linux
GOARCH: amd64
CGO_ENABLED: 0

- name: Build agent go binary arm64
run: VERSION=${RELEASE_TAG:-commit-$GITHUB_SHA} make kvisor-agent
if: ${{ github.event_name != 'pull_request' && github.event_name != 'release' }}
env:
GOOS: linux
GOARCH: arm64
CGO_ENABLED: 0

- name: Build controller go binary arm64
run: VERSION=${RELEASE_TAG:-commit-$GITHUB_SHA} make kvisor-controller
if: ${{ github.event_name != 'pull_request' && github.event_name != 'release' }}
env:
GOOS: linux
GOARCH: arm64
CGO_ENABLED: 0
run: UNAME_M=x86_64 VERSION=${RELEASE_TAG:-commit-$GITHUB_SHA} make kvisor-controller

- name: Run golangci-lint
# You may pin to the exact commit or the version.
Expand Down
24 changes: 4 additions & 20 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,16 @@ jobs:
run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Build agent go binary amd64
run: VERSION=${RELEASE_TAG:-commit-$GITHUB_SHA} make kvisor-agent
env:
GOOS: linux
GOARCH: amd64
CGO_ENABLED: 0
run: UNAME_M=x86_64 VERSION=${RELEASE_TAG:-commit-$GITHUB_SHA} make kvisor-agent

- name: Build controller go binary amd64
run: VERSION=${RELEASE_TAG:-commit-$GITHUB_SHA} make kvisor-controller
env:
GOOS: linux
GOARCH: amd64
CGO_ENABLED: 0
run: UNAME_M=x86_64 VERSION=${RELEASE_TAG:-commit-$GITHUB_SHA} make kvisor-controller

- name: Build agent go binary arm64
run: VERSION=${RELEASE_TAG:-commit-$GITHUB_SHA} make kvisor-agent
env:
GOOS: linux
GOARCH: arm64
CGO_ENABLED: 0
run: UNAME_M=arm64 VERSION=${RELEASE_TAG:-commit-$GITHUB_SHA} make kvisor-agent

- name: Build controller go binary arm64
run: VERSION=${RELEASE_TAG:-commit-$GITHUB_SHA} make kvisor-controller
env:
GOOS: linux
GOARCH: arm64
CGO_ENABLED: 0
run: UNAME_M=arm64 VERSION=${RELEASE_TAG:-commit-$GITHUB_SHA} make kvisor-controller

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ GO_ENV_EBPF =
GO_ENV_EBPF += GOOS=linux
GO_ENV_EBPF += CC=$(CMD_CLANG)
GO_ENV_EBPF += GOARCH=$(GO_ARCH)
GO_ENV_EBPF += CGO_ENABLED=0
GO_DEBUG_FLAG = -s -w

# Build kvisor binary and docker image.
Expand Down

0 comments on commit ea47c14

Please sign in to comment.