Commit 4c6b14c9 authored by Jakob Botsch Nielsen's avatar Jakob Botsch Nielsen
Browse files

Initial commit (setup directory structure)

parents
Pipeline #10551 canceled with stages
*.vo
*.glob
.*.aux
.coqdeps.d
_CoqProject
[submodule "vendor/record-update"]
path = vendor/record-update
url = https://github.com/tchajed/coq-record-update.git
dist: trusty
sudo: required
language: generic
services:
- docker
env:
global:
- NJOBS="2"
matrix:
- COQ_IMAGE="coqorg/coq:dev"
- COQ_IMAGE="coqorg/coq:latest"
install: |
# Prepare the COQ container
docker run -d -i --init --name=COQ -v ${TRAVIS_BUILD_DIR}:/home/coq/demo -w /home/coq/demo ${COQ_IMAGE}
docker exec COQ /bin/bash --login -c "
# This bash script is double-quoted to interpolate Travis CI env vars:
echo \"Build triggered by ${TRAVIS_EVENT_TYPE}\"
export PS4='+ \e[33;1m(\$0 @ line \$LINENO) \$\e[0m '
set -ex # -e = exit on failure; -x = trace for debug
#opam update -y
opam config list
opam repo list
opam list
"
before_script:
- |
docker exec COQ /bin/bash --login -c "
export PS4='+ \e[33;1m(\$0 @ line \$LINENO) \$\e[0m '
sudo chown -R coq:coq /home/coq/demo
"
script:
- echo -e "${ANSI_YELLOW}Building ${TRAVIS_REPO_SLUG}...${ANSI_RESET}" && echo -en 'travis_fold:start:build\\r'
- docker exec COQ /bin/bash --login -c "make -j${NJOBS} -k test"
- echo -en 'travis_fold:end:build\\r'
after_script:
- docker stop COQ
SRC_DIRS := 'src' $(shell test -d 'vendor' && echo 'vendor')
ALL_VFILES := $(shell find $(SRC_DIRS) -name "*.v")
TEST_VFILES := $(shell find 'src' -name "*Tests.v")
PROJ_VFILES := $(shell find 'src' -name "*.v")
VFILES := $(filter-out $(TEST_VFILES),$(PROJ_VFILES))
COQARGS :=
default: $(VFILES:.v=.vo)
test: $(TEST_VFILES:.v=.vo) $(VFILES:.v=.vo)
_CoqProject: libname $(wildcard vendor/*)
@echo "-R src $$(cat libname)" > $@
@for libdir in $(wildcard vendor/*); do \
libname=$$(cat $$libdir/libname); \
if [ $$? -ne 0 ]; then \
echo "Do you need to run git submodule update --init --recursive?" 1>&2; \
exit 1; \
fi; \
echo "-R $$libdir/src $$(cat $$libdir/libname)" >> $@; \
done
@echo "_CoqProject:"
@cat $@
.coqdeps.d: $(ALL_VFILES) _CoqProject
@echo "COQDEP $@"
@coqdep -f _CoqProject $(ALL_VFILES) > $@
ifneq ($(MAKECMDGOALS), clean)
-include .coqdeps.d
endif
%.vo: %.v _CoqProject
@echo "COQC $<"
@coqc $(COQARGS) $(shell cat '_CoqProject') $< -o $@
clean:
@echo "CLEAN vo glob aux"
@rm -f $(ALL_VFILES:.v=.vo) $(ALL_VFILES:.v=.glob)
@find $(SRC_DIRS) -name ".*.aux" -exec rm {} \;
rm -f _CoqProject .coqdeps.d
.PHONY: default test clean
.DELETE_ON_ERROR:
SmartContracts
Subproject commit b1f9c7573158f217dd5353e0f9ee1cd5613689d0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment