Skip to content

Commit 50b7f8d

Browse files
authored
Merge pull request #7 from coq-community/meta-files
update Makefile and generate files from templates
2 parents 41b3cbf + 5a344f9 commit 50b7f8d

File tree

5 files changed

+85
-60
lines changed

5 files changed

+85
-60
lines changed

.travis.yml

Lines changed: 53 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,61 @@
1-
language: nix
1+
opam: &OPAM
2+
language: minimal
3+
sudo: required
4+
services: docker
5+
install: |
6+
# Prepare the COQ container
7+
docker pull ${COQ_IMAGE}
8+
docker run -d -i --init --name=COQ -v ${TRAVIS_BUILD_DIR}:/home/coq/${CONTRIB_NAME} -w /home/coq/${CONTRIB_NAME} ${COQ_IMAGE}
9+
docker exec COQ /bin/bash --login -c "
10+
# This bash script is double-quoted to interpolate Travis CI env vars:
11+
echo \"Build triggered by ${TRAVIS_EVENT_TYPE}\"
12+
export PS4='+ \e[33;1m(\$0 @ line \$LINENO) \$\e[0m '
13+
set -ex # -e = exit on failure; -x = trace for debug
14+
opam update -y
15+
opam pin add ${CONTRIB_NAME} . -y --no-action
16+
opam install ${CONTRIB_NAME} -y -j ${NJOBS} --deps-only
17+
opam config list
18+
opam repo list
19+
opam list
20+
"
21+
script:
22+
- echo -e "${ANSI_YELLOW}Building ${CONTRIB_NAME}...${ANSI_RESET}" && echo -en 'travis_fold:start:script\\r'
23+
- |
24+
docker exec COQ /bin/bash --login -c "
25+
export PS4='+ \e[33;1m(\$0 @ line \$LINENO) \$\e[0m '
26+
set -ex
27+
sudo chown -R coq:coq /home/coq/${CONTRIB_NAME}
28+
opam install ${CONTRIB_NAME} -v -y -j ${NJOBS}
29+
"
30+
- docker stop COQ # optional
31+
- echo -en 'travis_fold:end:script\\r'
232

3-
script:
4-
- nix-build --argstr coq-version-or-url "$COQ" --extra-substituters https://coq.cachix.org --trusted-public-keys "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= coq.cachix.org-1:5QW/wwEnD+l2jvN6QRbRRsa4hBHG3QiQQ26cxu1F5tI="
33+
nix: &NIX
34+
language: nix
35+
script:
36+
- nix-build --argstr coq-version-or-url "$COQ" --extra-substituters https://coq.cachix.org --trusted-public-keys "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= coq.cachix.org-1:5QW/wwEnD+l2jvN6QRbRRsa4hBHG3QiQQ26cxu1F5tI="
537

638
matrix:
739
include:
840

9-
# Test supported versions of Coq
10-
- env: COQ=https://github.com/coq/coq/tarball/master
11-
- env: COQ=8.9
12-
- env: COQ=8.8
13-
- env: COQ=8.7
41+
# Test supported versions of Coq via Nix
42+
- env:
43+
- COQ=https://github.com/coq/coq/tarball/master
44+
<<: *NIX
45+
- env:
46+
- COQ=8.9
47+
<<: *NIX
48+
- env:
49+
- COQ=8.8
50+
<<: *NIX
51+
- env:
52+
- COQ=8.7
53+
<<: *NIX
1454

15-
# Test opam package
16-
- language: minimal
17-
sudo: required
18-
services: docker
19-
env:
55+
# Test supported versions of Coq via OPAM
56+
- env:
2057
- COQ_IMAGE=coqorg/coq:dev
21-
- CONTRIB_NAME=qarith-stern-brocot
58+
- CONTRIB_NAME=coq-qarith-stern-brocot
2259
- NJOBS=2
23-
install: |
24-
# Prepare the COQ container
25-
docker pull ${COQ_IMAGE}
26-
docker run -d -i --init --name=COQ -v ${TRAVIS_BUILD_DIR}:/home/coq/${CONTRIB_NAME} -w /home/coq/${CONTRIB_NAME} ${COQ_IMAGE}
27-
docker exec COQ /bin/bash --login -c "
28-
# This bash script is double-quoted to interpolate Travis CI env vars:
29-
echo \"Build triggered by ${TRAVIS_EVENT_TYPE}\"
30-
export PS4='+ \e[33;1m(\$0 @ line \$LINENO) \$\e[0m '
31-
set -ex # -e = exit on failure; -x = trace for debug
32-
opam update -y
33-
opam install -y -j ${NJOBS} --deps-only .
34-
opam config list
35-
opam repo list
36-
opam list
37-
"
38-
script:
39-
- echo -e "${ANSI_YELLOW}Building ${CONTRIB_NAME}...${ANSI_RESET}" && echo -en 'travis_fold:start:script\\r'
40-
- |
41-
docker exec COQ /bin/bash --login -c "
42-
export PS4='+ \e[33;1m(\$0 @ line \$LINENO) \$\e[0m '
43-
set -ex
44-
sudo chown -R coq:coq /home/coq/${CONTRIB_NAME}
45-
opam install -y -j ${NJOBS} .
46-
"
47-
- docker stop COQ # optional
48-
- echo -en 'travis_fold:end:script\\r'
60+
<<: *OPAM
61+

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
all: Makefile.coq
2-
+make -f Makefile.coq all
2+
+$(MAKE) -f Makefile.coq all
33

44
clean: Makefile.coq
5-
+make -f Makefile.coq clean
6-
rm -f Makefile.coq
5+
+$(MAKE) -f Makefile.coq cleanall
6+
rm -f Makefile.coq Makefile.coq.conf
77

88
Makefile.coq: _CoqProject
99
$(COQBIN)coq_makefile -f _CoqProject -o Makefile.coq
1010

11-
_CoqProject: ;
11+
_CoqProject Makefile: ;
1212

1313
%: Makefile.coq
14-
+make -f Makefile.coq $@
14+
+$(MAKE) -f Makefile.coq $@
1515

1616
.PHONY: all clean

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
[![Gitter][gitter-shield]][gitter-link]
77
[![DOI][doi-shield]][doi-link]
88

9-
[doi-shield]: https://zenodo.org/badge/DOI/10.1007/978-3-540-24849-1_20.svg
10-
[doi-link]: https://doi.org/10.1007/978-3-540-24849-1_20
11-
129
[travis-shield]: https://travis-ci.com/coq-community/qarith-stern-brocot.svg?branch=master
1310
[travis-link]: https://travis-ci.com/coq-community/qarith-stern-brocot/builds
1411

@@ -21,6 +18,9 @@
2118
[gitter-shield]: https://img.shields.io/badge/chat-on%20gitter-%23c1272d.svg
2219
[gitter-link]: https://gitter.im/coq-community/Lobby
2320

21+
[doi-shield]: https://zenodo.org/badge/DOI/10.1007/978-3-540-24849-1_20.svg
22+
[doi-link]: https://doi.org/10.1007/978-3-540-24849-1_20
23+
2424
Development of rational numbers as finite binary lists and defining
2525
field operations on them in two different ways: strict and lazy.
2626

@@ -36,13 +36,13 @@ More details about the project can be found in the paper
3636
- Coq-community maintainer(s):
3737
- Hugo Herbelin ([**@herbelin**](https://github.com/herbelin))
3838
- License: [GNU Lesser General Public License v2.1 or later](LICENSE)
39-
- Compatible Coq versions: Coq 8.7 or greater (use releases for other Coq versions)
40-
- Additional dependencies: none
39+
- Compatible Coq versions: 8.7 or later (use releases for other Coq versions)
40+
- Additional Coq dependencies: none
4141

4242
## Building and installation instructions
4343

44-
The easiest way to install the latest released version is via
45-
[OPAM](https://opam.ocaml.org/doc/Install.html):
44+
The easiest way to install the latest released version of Binary Rational Numbers
45+
is via [OPAM](https://opam.ocaml.org/doc/Install.html):
4646

4747
```shell
4848
opam repo add coq-released https://coq.inria.fr/opam/released
@@ -61,6 +61,7 @@ make install
6161
After installation, the included modules are available under
6262
the `QArithSternBrocot` namespace.
6363

64+
6465
## Documentation
6566

6667
This package contains a rational arithmetic library for Coq.

opam renamed to coq-qarith-stern-brocot.opam

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
1-
opam-version: "1.2"
1+
opam-version: "2.0"
22
maintainer: "[email protected]"
33

44
homepage: "https://github.com/coq-community/qarith-stern-brocot"
5-
dev-repo: "https://github.com/coq-community/qarith-stern-brocot.git"
5+
dev-repo: "git+https://github.com/coq-community/qarith-stern-brocot.git"
66
bug-reports: "https://github.com/coq-community/qarith-stern-brocot/issues"
77
license: "LGPL-2.1-or-later"
88

9+
synopsis: "Binary rational numbers"
10+
description: """
11+
Development of rational numbers as finite binary lists and defining
12+
field operations on them in two different ways: strict and lazy.
13+
"""
14+
915
build: [make "-j%{jobs}%"]
1016
install: [make "install"]
11-
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/QArithSternBrocot"]
1217
depends: [
13-
"coq" {(>= "8.7" & < "8.10~") | (= "dev")}
18+
"ocaml"
19+
"coq" {(>= "8.7" & < "8.11~") | (= "dev")}
1420
]
1521

1622
tags: [

meta.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
---
22
fullname: Binary Rational Numbers
33
shortname: qarith-stern-brocot
4+
organization: coq-community
5+
community: true
6+
7+
synopsis: Binary rational numbers
48

59
description: |
610
Development of rational numbers as finite binary lists and defining
@@ -26,16 +30,17 @@ license:
2630
identifier: LGPL-2.1-or-later
2731

2832
supported_coq_versions:
29-
text: Coq 8.7 or greater (use releases for other Coq versions)
30-
opam: '{(>= "8.7" & < "8.10~") | (= "dev")}'
33+
text: 8.7 or later (use releases for other Coq versions)
34+
opam: '{(>= "8.7" & < "8.11~") | (= "dev")}'
3135

32-
tested_coq_versions:
36+
tested_coq_nix_versions:
3337
- version_or_url: https://github.com/coq/coq/tarball/master
3438
- version_or_url: 8.9
3539
- version_or_url: 8.8
3640
- version_or_url: 8.7
3741

38-
tested_coq_opam_version: dev
42+
tested_coq_opam_versions:
43+
- version: dev
3944

4045
namespace: QArithSternBrocot
4146

0 commit comments

Comments
 (0)