mirror of
https://github.com/containers/podman.git
synced 2025-08-01 07:40:22 +08:00
Merge pull request #1996 from giuseppe/validate-all-commits
Makefile: validate that each commit can at least build
This commit is contained in:
23
.cirrus.yml
23
.cirrus.yml
@ -22,6 +22,7 @@ env:
|
|||||||
# Save a little typing (path relative to $CIRRUS_WORKING_DIR)
|
# Save a little typing (path relative to $CIRRUS_WORKING_DIR)
|
||||||
SCRIPT_BASE: "./contrib/cirrus"
|
SCRIPT_BASE: "./contrib/cirrus"
|
||||||
PACKER_BASE: "./contrib/cirrus/packer"
|
PACKER_BASE: "./contrib/cirrus/packer"
|
||||||
|
CIRRUS_CLONE_DEPTH: 200
|
||||||
|
|
||||||
####
|
####
|
||||||
#### Variables for composing new cache-images (used in PR testing) from
|
#### Variables for composing new cache-images (used in PR testing) from
|
||||||
@ -97,11 +98,33 @@ gating_task:
|
|||||||
- '/usr/local/bin/entrypoint.sh lint'
|
- '/usr/local/bin/entrypoint.sh lint'
|
||||||
|
|
||||||
|
|
||||||
|
build_each_commit_task:
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- "gating"
|
||||||
|
|
||||||
|
gce_instance:
|
||||||
|
image_project: "libpod-218412"
|
||||||
|
zone: "us-central1-a" # Required by Cirrus for the time being
|
||||||
|
cpu: 2
|
||||||
|
memory: "4Gb"
|
||||||
|
disk: 40
|
||||||
|
matrix:
|
||||||
|
image_name: "fedora-29-libpod-0c954a67"
|
||||||
|
|
||||||
|
timeout_in: 20m
|
||||||
|
|
||||||
|
script:
|
||||||
|
- $SCRIPT_BASE/setup_environment.sh
|
||||||
|
- git fetch --depth $CIRRUS_CLONE_DEPTH origin $CIRRUS_BASE_BRANCH
|
||||||
|
- env GOPATH=/var/tmp/go/ make build-all-new-commits GIT_BASE_BRANCH=origin/$CIRRUS_BASE_BRANCH
|
||||||
|
|
||||||
# This task does the unit and integration testing for every platform
|
# This task does the unit and integration testing for every platform
|
||||||
testing_task:
|
testing_task:
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- "gating"
|
- "gating"
|
||||||
|
- "build_each_commit"
|
||||||
|
|
||||||
gce_instance:
|
gce_instance:
|
||||||
image_project: "libpod-218412"
|
image_project: "libpod-218412"
|
||||||
|
5
Makefile
5
Makefile
@ -5,6 +5,7 @@ HEAD ?= HEAD
|
|||||||
CHANGELOG_BASE ?= HEAD~
|
CHANGELOG_BASE ?= HEAD~
|
||||||
CHANGELOG_TARGET ?= HEAD
|
CHANGELOG_TARGET ?= HEAD
|
||||||
PROJECT := github.com/containers/libpod
|
PROJECT := github.com/containers/libpod
|
||||||
|
GIT_BASE_BRANCH ?= origin/master
|
||||||
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
|
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
|
||||||
GIT_BRANCH_CLEAN ?= $(shell echo $(GIT_BRANCH) | sed -e "s/[^[:alnum:]]/-/g")
|
GIT_BRANCH_CLEAN ?= $(shell echo $(GIT_BRANCH) | sed -e "s/[^[:alnum:]]/-/g")
|
||||||
LIBPOD_IMAGE ?= libpod_dev$(if $(GIT_BRANCH_CLEAN),:$(GIT_BRANCH_CLEAN))
|
LIBPOD_IMAGE ?= libpod_dev$(if $(GIT_BRANCH_CLEAN),:$(GIT_BRANCH_CLEAN))
|
||||||
@ -345,6 +346,10 @@ API.md: cmd/podman/varlink/io.podman.varlink
|
|||||||
|
|
||||||
validate: gofmt .gitvalidation
|
validate: gofmt .gitvalidation
|
||||||
|
|
||||||
|
build-all-new-commits:
|
||||||
|
# Validate that all the commits build on top of $(GIT_BASE_BRANCH)
|
||||||
|
git rebase $(GIT_BASE_BRANCH) -x make
|
||||||
|
|
||||||
.PHONY: \
|
.PHONY: \
|
||||||
.gopathok \
|
.gopathok \
|
||||||
binaries \
|
binaries \
|
||||||
|
Reference in New Issue
Block a user