Merge pull request #18376 from prometheus/superq/new_promci
Some checks failed
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
Stale Check / stale (push) Has been cancelled
Lock Threads / action (push) Has been cancelled

chore: Use make target for protoc
This commit is contained in:
Julien
2026-03-26 17:27:06 +01:00
committed by GitHub
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."