Merge pull request #18376 from prometheus/superq/new_promci
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Compliance testing (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run

chore: Use make target for protoc
This commit is contained in:
Julien 2026-03-26 17:27:06 +01:00 committed by GitHub
commit 5b1d22e2ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 9 deletions

View file

@ -43,15 +43,8 @@ jobs:
- run: go test --tags=slicelabels -race ./cmd/prometheus ./model/textparse ./prompb/...
- run: go test --tags=forcedirectio -race ./tsdb/
- run: GOARCH=386 go test ./...
- run: |
VERSION="3.15.8"
env
set -x
curl -s -L https://github.com/protocolbuffers/protobuf/releases/download/v${VERSION}/protoc-${VERSION}-linux-x86_64.zip > /tmp/protoc.zip
unzip -d /tmp /tmp/protoc.zip
chmod +x /tmp/bin/protoc
export PATH=/tmp/bin:$PATH
make proto
- run: make protoc
- run: make proto
- run: git diff --exit-code
test_go_oldest:

View file

@ -31,6 +31,15 @@ GOYACC_VERSION ?= v0.6.0
include Makefile.common
ifeq (arm, $(GOHOSTARCH))
PROTOC_ARCH ?= aarch_64
else
PROTOC_ARCH ?= x86_64
endif
PROTOC_VERSION ?= 3.15.8
PROTOC_URL ?= https://github.com/protocolbuffers/protobuf/releases/download/v$(PROTOC_VERSION)/protoc-$(PROTOC_VERSION)-linux-$(PROTOC_ARCH).zip
DOCKER_IMAGE_NAME ?= prometheus
# Only build UI if PREBUILT_ASSETS_STATIC_DIR is not set
@ -129,6 +138,15 @@ assets-tarball: assets
@echo '>> packaging assets'
scripts/package_assets.sh
.PHONY: protoc
protoc:
@echo ">> Installing protoc"
$(eval PROTOC_TMP := $(shell mktemp))
curl -s -o $(PROTOC_TMP) -L $(PROTOC_URL)
unzip -u $(PROTOC_TMP) bin/protoc -d $(FIRST_GOPATH)
chmod +x $(FIRST_GOPATH)/bin/protoc
rm -v $(PROTOC_TMP)
.PHONY: parser
parser:
@echo ">> running goyacc to generate the .go file."