-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·42 lines (29 loc) · 1.48 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
-include dockerfile-commons/test-dockerignore.mk
-include dockerfile-commons/lint-dockerfiles.mk
-include dockerfile-commons/docker-funcs.mk
SHELL := /bin/bash
IMAGE_NAME = semenovp/tiny-parigp
PARIGP_VER ?= "2.13.0"
GP2C_VER ?= "0.0.12"
VCS_REF=$(shell git rev-parse --short HEAD)
.PHONY: help
help: ## Prints the help.
@echo 'Commands:'
@grep --no-filename -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) |\
awk 'BEGIN {FS = ":.*?## "}; {printf " %-20s %s\n", $$1, $$2}'
.DEFAULT_GOAL := build
build: lint-dockerfiles build_gp build_gp2c; ## Buolds all the images.
.PHONY: build_gp
build_gp: export ARGS=-f Dockerfile.pari .
build_gp: export BUILD_ARGS='parigp_version="$(PARIGP_VER)" vcsref="$(VCS_REF)"'
build_gp: ## Builds the images for PARI/GP.
@$(call build_docker_image,"$(IMAGE_NAME):latest","parigp_packages='' $(BUILD_ARGS)","$(ARGS)")
@$(call build_docker_image,"$(IMAGE_NAME):latest-alldata","$(BUILD_ARGS)","$(ARGS)")
.PHONY: build_gp2c
build_gp2c: ## Builds the image for GP2C/GP2C-RUN.
@$(call build_docker_image,"$(IMAGE_NAME):gp2c-latest",'gp2c_version="$(GP2C_VER)" vcsref="$(VCS_REF)"',"-f Dockerfile.gp2c .")
.PHONY: test
test: ## Tests the the already built images.
@$(call goss_docker_image,"$(IMAGE_NAME):latest","tests/gp.yaml","PARIGP_VER=$(PARIGP_VER)")
@$(call goss_docker_image,"$(IMAGE_NAME):latest-alldata","tests/gp_alldata.yaml")
@$(call goss_docker_image,"$(IMAGE_NAME):gp2c-latest","tests/gp2c.yaml","PARIGP_VER=$(PARIGP_VER) GP2C_VER=$(GP2C_VER)")