mirror of https://github.com/ceph/go-ceph
ci: add a test run for Iovec based on PtrGuard
Signed-off-by: Sven Anderson <sven@redhat.com>
This commit is contained in:
parent
b8a803ccbb
commit
5768911be7
|
@ -37,6 +37,8 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Run test container
|
- name: Run test container
|
||||||
run: make test-container "CEPH_VERSION=${{ matrix.ceph_version }}" "RESULTS_DIR=$PWD/_results"
|
run: make test-container "CEPH_VERSION=${{ matrix.ceph_version }}" "RESULTS_DIR=$PWD/_results"
|
||||||
|
- name: Run ptrguard test container
|
||||||
|
run: make test-container "USE_PTRGUARD=true" "CEPH_VERSION=${{ matrix.ceph_version }}" "RESULTS_DIR=$PWD/_results"
|
||||||
- name: Archive coverage results
|
- name: Archive coverage results
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
|
|
12
Makefile
12
Makefile
|
@ -7,6 +7,7 @@ CEPH_VERSION := nautilus
|
||||||
RESULTS_DIR :=
|
RESULTS_DIR :=
|
||||||
CHECK_GOFMT_FLAGS := -e -s -l
|
CHECK_GOFMT_FLAGS := -e -s -l
|
||||||
IMPLEMENTS_OPTS :=
|
IMPLEMENTS_OPTS :=
|
||||||
|
BUILD_TAGS := $(CEPH_VERSION)
|
||||||
|
|
||||||
ifeq ($(CONTAINER_CMD),)
|
ifeq ($(CONTAINER_CMD),)
|
||||||
CONTAINER_CMD:=$(shell docker version >/dev/null 2>&1 && echo docker)
|
CONTAINER_CMD:=$(shell docker version >/dev/null 2>&1 && echo docker)
|
||||||
|
@ -21,6 +22,11 @@ BUILDFILE=.build.$(CEPH_VERSION)
|
||||||
# the name of the image plus ceph version as tag
|
# the name of the image plus ceph version as tag
|
||||||
CI_IMAGE_TAG=$(CI_IMAGE_NAME):$(CEPH_VERSION)
|
CI_IMAGE_TAG=$(CI_IMAGE_NAME):$(CEPH_VERSION)
|
||||||
|
|
||||||
|
ifneq ($(USE_PTRGUARD),)
|
||||||
|
CONTAINER_OPTS += -e USE_PTRGUARD=true
|
||||||
|
BUILD_TAGS := $(BUILD_TAGS),ptrguard
|
||||||
|
endif
|
||||||
|
|
||||||
SELINUX := $(shell getenforce 2>/dev/null)
|
SELINUX := $(shell getenforce 2>/dev/null)
|
||||||
ifeq ($(SELINUX),Enforcing)
|
ifeq ($(SELINUX),Enforcing)
|
||||||
VOLUME_FLAGS = :z
|
VOLUME_FLAGS = :z
|
||||||
|
@ -31,11 +37,11 @@ ifdef RESULTS_DIR
|
||||||
endif
|
endif
|
||||||
|
|
||||||
build:
|
build:
|
||||||
go build -v -tags $(CEPH_VERSION) $(shell go list ./... | grep -v /contrib)
|
go build -v -tags $(BUILD_TAGS) $(shell go list ./... | grep -v /contrib)
|
||||||
fmt:
|
fmt:
|
||||||
go fmt ./...
|
go fmt ./...
|
||||||
test:
|
test:
|
||||||
go test -v -tags $(CEPH_VERSION) ./...
|
go test -v -tags $(BUILD_TAGS) ./...
|
||||||
|
|
||||||
.PHONY: test-docker test-container
|
.PHONY: test-docker test-container
|
||||||
test-docker: test-container
|
test-docker: test-container
|
||||||
|
@ -78,7 +84,7 @@ test-binaries: \
|
||||||
test-bins: test-binaries
|
test-bins: test-binaries
|
||||||
|
|
||||||
%.test: % force_go_build
|
%.test: % force_go_build
|
||||||
go test -c -tags $(CEPH_VERSION) ./$<
|
go test -c -tags $(BUILD_TAGS) ./$<
|
||||||
|
|
||||||
implements:
|
implements:
|
||||||
go build -o implements ./contrib/implements
|
go build -o implements ./contrib/implements
|
||||||
|
|
|
@ -94,7 +94,15 @@ while true ; do
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -n "${CEPH_VERSION}" ]; then
|
if [ -n "${CEPH_VERSION}" ]; then
|
||||||
BUILD_TAGS="-tags ${CEPH_VERSION}"
|
BUILD_TAGS="${CEPH_VERSION}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "${USE_PTRGUARD}" ]; then
|
||||||
|
BUILD_TAGS+=",ptrguard"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "${BUILD_TAGS}" ]; then
|
||||||
|
BUILD_TAGS="-tags ${BUILD_TAGS}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
show() {
|
show() {
|
||||||
|
|
Loading…
Reference in New Issue