Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump the CLI go build version to 1.21.5 #1629

Closed
wants to merge 17 commits into from
13 changes: 0 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,19 +193,6 @@ jobs:
key: ${{ runner.os }}-${{ steps.env.outputs.arch }}-buildx-${{ github.sha }}
upload-chunk-size: 1000000

# Cache downloaded Go dependencies.
- name: Setup Go Cache
uses: actions/cache@v3.3.2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
cli/.gobin
cli/.gocache
cli/.gomod
key: ${{ runner.os }}-${{ steps.env.outputs.arch }}-go-${{ hashFiles('cli/go.sum') }}
upload-chunk-size: 1000000

# Cache the cmocka build. Use a key based on a hash of all the files used
# in the build.
- name: Setup cmocka Cache
Expand Down
11 changes: 8 additions & 3 deletions cli/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ MIN_REQ_GO_MINOR_VERSION = 18
# cache downloaded modules and binaries locally
export GOBIN := $(shell pwd)/.gobin/$(ARCH)
export GOCACHE := $(shell pwd)/.gocache
# commented out the below since go 1.21.5 is broken
export GOMODCACHE := $(shell pwd)/.gomod
export GOFLAGS := -modcacherw
export GOINSECURE := *

BINDIR := ../bin/linux/$(ARCH)
LIBDIR := ../lib/linux/$(ARCH)
Expand Down Expand Up @@ -74,11 +76,13 @@ clean:
$(RM) -rf -- bpf/vmlinux.h

## deps: install dependencies
deps: $(GO_BINDATA) $(GOVVV) $(GOLANGCI_LINT) $(TRIVY)
deps: goenv $(GO_BINDATA) $(GOVVV) $(GOLANGCI_LINT) $(TRIVY)
goenv:
( cd .. && $(GO) env )
$(GO_BINDATA):
$(GO) install github.com/go-bindata/go-bindata/...
( cd .. && $(GO) install github.com/go-bindata/go-bindata/...@latest )
$(GOVVV):
$(GO) install github.com/ahmetb/govvv
( cd .. && $(GO) install github.com/ahmetb/govvv@latest )
$(GOLANGCI_LINT):
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | \
sh -s -- -b $(GOBIN) v1.42.1
Expand Down Expand Up @@ -116,6 +120,7 @@ $(SCOPE): $(GOVVV) $(filter-out %_test.go,$(shell find . -type f -name '*.go'))
$(BUILD_OPTS) \
-o $(SCOPE)
$(RM) -r $(SCOPEDYN)
chmod -f -R +w $(GOMODCACHE)/golang.org/toolchain*/ || true

## test: run unit tests
test:
Expand Down
2 changes: 1 addition & 1 deletion cli/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/criblio/scope

go 1.21.4
go 1.21.5

replace github.com/olekukonko/tablewriter => github.com/cockroachdb/tablewriter v0.0.5-0.20200105123400-bd15540e8847

Expand Down
8 changes: 6 additions & 2 deletions docker/builder/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,9 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV key=52B59B1571A79DBC054901C0F6BC817356A3D45E
RUN apt-get update && \
apt-get install -y software-properties-common gpg apt-utils libelf-dev && \
add-apt-repository -y ppa:longsleep/golang-backports && \
apt-get update && \
# ( gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys "$key" || gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" ) && \
apt-get install -y \
golang \
autoconf \
automake \
curl \
Expand All @@ -61,6 +59,12 @@ RUN apt-get update && \
dpkg-reconfigure --frontend noninteractive tzdata && \
apt-get clean

# Install Go
#RUN curl -LO https://go.dev/dl/go1.21.5.linux-amd64.tar.gz && \
# rm -rf /usr/local/go && \
# tar -C /usr/local -xzf go1.21.5.linux-amd64.tar.gz
#ENV PATH "$PATH:/usr/local/go/bin"

ARG UPX_VERSION=4.0.1
ARG CMAKE_VERSION=3.24.3

Expand Down
Loading