|
| 1 | +version: 2.1 |
| 2 | + |
1 | 3 | defaults: &defaults |
2 | 4 | environment: |
3 | 5 | OPAMVERBOSE: 1 |
4 | 6 | OPAMWITHTEST: true |
5 | 7 | OPAMYES: true |
6 | 8 | TERM: xterm |
7 | | - steps: |
8 | | - - checkout |
9 | | - - run: |
10 | | - name: Configure environment |
11 | | - command: echo . ~/.profile >> $BASH_ENV |
12 | | - - run: |
13 | | - name: Install dependencies |
14 | | - command: opam install --deps-only . |
15 | | - - run: |
16 | | - name: List installed packages |
17 | | - command: opam list |
18 | | - - run: |
19 | | - name: Build, test, and install package |
20 | | - command: opam install . |
21 | | - - run: |
22 | | - name: Uninstall package |
23 | | - command: opam uninstall . |
24 | | - - run: |
25 | | - name: Build and test locally |
26 | | - command: make |
27 | | - - run: |
28 | | - name: Cleanup local directory |
29 | | - command: | |
30 | | - make clean |
31 | | - ls -AGR |
| 9 | + |
| 10 | +commands: |
| 11 | + startup: |
| 12 | + steps: |
| 13 | + - checkout |
| 14 | + - run: |
| 15 | + name: Pull submodules |
| 16 | + command: git submodule update --init |
| 17 | + - run: |
| 18 | + name: Configure environment |
| 19 | + command: echo . ~/.profile >> $BASH_ENV |
| 20 | + - run: |
| 21 | + name: Install dependencies |
| 22 | + command: opam install --deps-only . |
| 23 | + - run: |
| 24 | + name: List installed packages |
| 25 | + command: opam list |
| 26 | + build: |
| 27 | + steps: |
| 28 | + - run: |
| 29 | + name: Build, test, and install package |
| 30 | + command: opam install . |
| 31 | + - run: |
| 32 | + name: Uninstall package |
| 33 | + command: opam uninstall . |
| 34 | + - run: |
| 35 | + name: Build and test locally |
| 36 | + command: make |
| 37 | + - run: |
| 38 | + name: Cleanup local directory |
| 39 | + command: | |
| 40 | + make clean |
| 41 | + ls -AGR |
| 42 | + deploy: |
| 43 | + steps: |
| 44 | + - run: |
| 45 | + name: Build Documentation |
| 46 | + command: make html |
| 47 | + - run: |
| 48 | + name: Configure Git |
| 49 | + command: | |
| 50 | + git config --global core.autocrlf input |
| 51 | + git config --global user.name "Yishuai Li" |
| 52 | + git config --global user.email "[email protected]" |
| 53 | + - run: |
| 54 | + name: Deploy GitHub Pages |
| 55 | + command: | |
| 56 | + if [ -z "$CIRCLE_TAG" ] |
| 57 | + then TAG=$CIRCLE_BRANCH |
| 58 | + else TAG=$CIRCLE_TAG |
| 59 | + fi |
| 60 | + PAGES=coq-ext-lib/$TAG |
| 61 | + if [ -z "$CIRCLE_PULL_REQUESTS" ] && [ $CIRCLE_PROJECT_USERNAME == coq-community ] |
| 62 | + then git clone -b gh-pages --depth 1 [email protected]:coq-community/coq-ext-lib.git |
| 63 | + rm -rf $PAGES/* |
| 64 | + mkdir -p $PAGES |
| 65 | + cp -LRf html/* $PAGES |
| 66 | + cd coq-ext-lib |
| 67 | + git add . |
| 68 | + git commit -m "$TAG $CIRCLE_SHA1" || true |
| 69 | + git push |
| 70 | + fi |
32 | 71 |
|
33 | 72 | jobs: |
34 | | - coq.8.8: |
| 73 | + coq 8_8: |
35 | 74 | <<: *defaults |
| 75 | + steps: |
| 76 | + - startup |
| 77 | + - build |
36 | 78 | docker: |
37 | 79 | - image: coqorg/coq:8.8 |
38 | | - coq.8.9: |
| 80 | + coq 8_9: |
39 | 81 | <<: *defaults |
| 82 | + steps: |
| 83 | + - startup |
| 84 | + - build |
40 | 85 | docker: |
41 | 86 | - image: coqorg/coq:8.9 |
42 | | - coq.8.10: |
| 87 | + coq 8_10: |
43 | 88 | <<: *defaults |
| 89 | + steps: |
| 90 | + - startup |
| 91 | + - build |
44 | 92 | docker: |
45 | 93 | - image: coqorg/coq:8.10 |
46 | | - coq.dev: |
| 94 | + coq dev: |
47 | 95 | <<: *defaults |
| 96 | + steps: |
| 97 | + - startup |
| 98 | + - build |
48 | 99 | docker: |
49 | 100 | - image: coqorg/coq:dev |
| 101 | + doc: |
| 102 | + <<: *defaults |
| 103 | + steps: |
| 104 | + - startup |
| 105 | + - deploy |
| 106 | + docker: |
| 107 | + - image: ysli/coq |
50 | 108 |
|
51 | 109 | workflows: |
52 | 110 | version: 2 |
53 | 111 | build: |
54 | 112 | jobs: |
55 | | - - coq.8.8 |
56 | | - - coq.8.9 |
57 | | - - coq.8.10 |
58 | | - - coq.dev |
| 113 | + - coq 8_8: |
| 114 | + filters: |
| 115 | + branches: |
| 116 | + ignore: gh-pages |
| 117 | + tags: |
| 118 | + only: /^v.*/ |
| 119 | + - coq 8_9: |
| 120 | + filters: |
| 121 | + branches: |
| 122 | + ignore: gh-pages |
| 123 | + tags: |
| 124 | + only: /^v.*/ |
| 125 | + - coq 8_10: |
| 126 | + filters: |
| 127 | + branches: |
| 128 | + ignore: gh-pages |
| 129 | + tags: |
| 130 | + only: /^v.*/ |
| 131 | + - coq dev: |
| 132 | + filters: |
| 133 | + branches: |
| 134 | + ignore: gh-pages |
| 135 | + tags: |
| 136 | + only: /^v.*/ |
| 137 | + - doc: |
| 138 | + requires: |
| 139 | + - coq 8_8 |
| 140 | + - coq 8_9 |
| 141 | + - coq 8_10 |
| 142 | + - coq dev |
| 143 | + filters: |
| 144 | + branches: |
| 145 | + ignore: gh-pages |
| 146 | + tags: |
| 147 | + only: /^v.*/ |
0 commit comments