Browse code

pin Kaniko version to v0.16.0

Temporary fix for CI. Correspondent Kaniko issue:
https://github.com/GoogleContainerTools/kaniko/issues/1024

Slava Ostroukh authored on 18/03/2020 22:19:51 • Joseph Weston committed on 20/03/2020 10:16:25
Showing 1 changed files
... ...
@@ -19,7 +19,7 @@ variables:
19 19
   stage: build-env
20 20
   when: manual
21 21
   image:
22
-    name: gcr.io/kaniko-project/executor:debug
22
+    name: gcr.io/kaniko-project/executor:debug-v0.16.0
23 23
     entrypoint: [""]
24 24
   artifacts:
25 25
     untracked: true
Browse code

Merge branch 'stable'

Joseph Weston authored on 13/11/2019 11:41:47
Showing 0 changed files
Browse code

remove qsymm installation from test setup

Qsymm is now installed in the testing image directly

Joseph Weston authored on 12/11/2019 16:42:57
Showing 1 changed files
... ...
@@ -103,24 +103,18 @@ build-env:default:
103 103
   before_script:
104 104
     - source deactivate
105 105
     - source activate kwant-latest
106
-    - pip install qsymm
107 106
 
108 107
 .bleeding-edge-env: &bleeding_edge_env
109 108
   before_script:
110 109
     - source deactivate
111 110
     - conda env update -f /kwant-latest.yml
112 111
     - source activate kwant-latest
113
-    - pip install qsymm
114 112
 
115 113
 .ubuntu-env: &ubuntu_env
116 114
   image: gitlab.kwant-project.org:5005/kwant/kwant/ubuntu
117
-  before_script:
118
-    - pip3 install qsymm
119 115
 
120 116
 .debian-env: &debian_env
121 117
   image: gitlab.kwant-project.org:5005/kwant/kwant/debian
122
-  before_script:
123
-    - pip3 install qsymm
124 118
 
125 119
 ## Build Jobs
126 120
 
Browse code

Revert "change credentials directory from /kaniko/.docker to /root/.docker"

This reverts commit f2ac01b9cc42976680a6fc587bb86c9f2ca02890.

Joseph Weston authored on 09/09/2019 14:15:36
Showing 1 changed files
... ...
@@ -25,8 +25,8 @@ variables:
25 25
     untracked: true
26 26
     expire_in: 1 hour
27 27
   before_script:
28
-    - mkdir -p /root/.docker
29
-    - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /root/.docker/config.json
28
+    - mkdir -p /kaniko/.docker
29
+    - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
30 30
 
31 31
 build-env:ubuntu:
32 32
   <<: *build-env
Browse code

always allow rebuilding images regardless of which files changed

We still have to manually start image building jobs, and there is
no disadvantage to allowing rebuilding arbitrary images.

Joseph Weston authored on 09/09/2019 14:09:57
Showing 1 changed files
... ...
@@ -30,9 +30,6 @@ variables:
30 30
 
31 31
 build-env:ubuntu:
32 32
   <<: *build-env
33
-  only:
34
-    changes:
35
-      - docker/Dockerfile.ubuntu
36 33
   script:
37 34
     - /kaniko/executor
38 35
       --context $CI_PROJECT_DIR/docker
... ...
@@ -41,9 +38,6 @@ build-env:ubuntu:
41 38
 
42 39
 build-env:debian:
43 40
   <<: *build-env
44
-  only:
45
-    changes:
46
-      - docker/Dockerfile.debian
47 41
   script:
48 42
     - /kaniko/executor
49 43
       --context $CI_PROJECT_DIR/docker
... ...
@@ -52,10 +46,6 @@ build-env:debian:
52 46
 
53 47
 build-env:conda:
54 48
   <<: *build-env
55
-  only:
56
-    changes:
57
-      - docker/Dockerfile.conda
58
-      - docker/*.yml
59 49
   script:
60 50
     - /kaniko/executor
61 51
       --context $CI_PROJECT_DIR/docker
... ...
@@ -64,10 +54,6 @@ build-env:conda:
64 54
 
65 55
 build-env:default:
66 56
   <<: *build-env
67
-  only:
68
-    changes:
69
-      - docker/Dockerfile.conda
70
-      - docker/*.yml
71 57
   script:
72 58
     - /kaniko/executor
73 59
       --context $CI_PROJECT_DIR/docker
Browse code

change credentials directory from /kaniko/.docker to /root/.docker

Latest versions of Kaniko builder use this new credentials directory

Joseph Weston authored on 09/09/2019 14:09:11
Showing 1 changed files
... ...
@@ -25,8 +25,8 @@ variables:
25 25
     untracked: true
26 26
     expire_in: 1 hour
27 27
   before_script:
28
-    - mkdir -p /kaniko/.docker
29
-    - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
28
+    - mkdir -p /root/.docker
29
+    - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /root/.docker/config.json
30 30
 
31 31
 build-env:ubuntu:
32 32
   <<: *build-env
Browse code

move documentation-building package installation to docker

Joseph Weston authored on 23/05/2019 10:30:35 • Anton Akhmerov committed on 27/05/2019 13:49:29
Showing 1 changed files
... ...
@@ -239,9 +239,6 @@ build documentation:
239 239
     - build:latest
240 240
   stage: test
241 241
   script:
242
-    - apt-get update && apt-get install -y librsvg2-bin  # for converting svgs to pdfs
243
-    - pip install git+https://github.com/jupyter-widgets/jupyter-sphinx sphinxcontrib-svg2pdfconverter
244
-    - python -m ipykernel install --user --name kwant-latest
245 242
     - make -C doc clean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W -D jupyter_execute_default_kernel=kwant-latest' SOURCE_LINK_TEMPLATE="$CI_PROJECT_URL"/blob/\$\$r/\$\$f
246 243
   artifacts:
247 244
     paths:
... ...
@@ -254,9 +251,6 @@ build PDF documentation:
254 251
     - build:latest
255 252
   stage: test
256 253
   script:
257
-    - apt-get update && apt-get install -y librsvg2-bin  # for converting svgs to pdfs
258
-    - pip install git+https://github.com/jupyter-widgets/jupyter-sphinx sphinxcontrib-svg2pdfconverter
259
-    - python -m ipykernel install --user --name kwant-latest
260 254
     - make -C doc latex SPHINXOPTS='-n -W -D jupyter_execute_default_kernel=kwant-latest'
261 255
     - cd doc/build/latex
262 256
     - make all-pdf
Browse code

correct paths for kaniko auth files

Joseph Weston authored on 23/05/2019 10:30:12 • Anton Akhmerov committed on 27/05/2019 13:49:29
Showing 1 changed files
... ...
@@ -25,8 +25,8 @@ variables:
25 25
     untracked: true
26 26
     expire_in: 1 hour
27 27
   before_script:
28
-    - mkdir -p /root/.docker
29
-    - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /root/.docker/config.json
28
+    - mkdir -p /kaniko/.docker
29
+    - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
30 30
 
31 31
 build-env:ubuntu:
32 32
   <<: *build-env
Browse code

convert SVG to PDF when using latex builder

Joseph Weston authored on 15/05/2019 15:17:08
Showing 1 changed files
... ...
@@ -239,7 +239,8 @@ build documentation:
239 239
     - build:latest
240 240
   stage: test
241 241
   script:
242
-    - pip install git+https://github.com/jupyter-widgets/jupyter-sphinx
242
+    - apt-get update && apt-get install -y librsvg2-bin  # for converting svgs to pdfs
243
+    - pip install git+https://github.com/jupyter-widgets/jupyter-sphinx sphinxcontrib-svg2pdfconverter
243 244
     - python -m ipykernel install --user --name kwant-latest
244 245
     - make -C doc clean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W -D jupyter_execute_default_kernel=kwant-latest' SOURCE_LINK_TEMPLATE="$CI_PROJECT_URL"/blob/\$\$r/\$\$f
245 246
   artifacts:
... ...
@@ -253,7 +254,8 @@ build PDF documentation:
253 254
     - build:latest
254 255
   stage: test
255 256
   script:
256
-    - pip install git+https://github.com/jupyter-widgets/jupyter-sphinx
257
+    - apt-get update && apt-get install -y librsvg2-bin  # for converting svgs to pdfs
258
+    - pip install git+https://github.com/jupyter-widgets/jupyter-sphinx sphinxcontrib-svg2pdfconverter
257 259
     - python -m ipykernel install --user --name kwant-latest
258 260
     - make -C doc latex SPHINXOPTS='-n -W -D jupyter_execute_default_kernel=kwant-latest'
259 261
     - cd doc/build/latex
Browse code

clean up Makefile

Use a more modern sphinx invocation

Joseph Weston authored on 02/05/2019 15:40:43
Showing 1 changed files
... ...
@@ -241,7 +241,7 @@ build documentation:
241 241
   script:
242 242
     - pip install git+https://github.com/jupyter-widgets/jupyter-sphinx
243 243
     - python -m ipykernel install --user --name kwant-latest
244
-    - make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W -D jupyter_execute_default_kernel=kwant-latest' SOURCE_LINK_TEMPLATE="$CI_PROJECT_URL"/blob/\$\$r/\$\$f
244
+    - make -C doc clean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W -D jupyter_execute_default_kernel=kwant-latest' SOURCE_LINK_TEMPLATE="$CI_PROJECT_URL"/blob/\$\$r/\$\$f
245 245
   artifacts:
246 246
     paths:
247 247
       - doc/build/html/
Browse code

add jupyter-sphinx to documentation config

Joseph Weston authored on 25/04/2019 15:41:23
Showing 1 changed files
... ...
@@ -241,7 +241,7 @@ build documentation:
241 241
   script:
242 242
     - pip install git+https://github.com/jupyter-widgets/jupyter-sphinx
243 243
     - python -m ipykernel install --user --name kwant-latest
244
-    - make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W' SOURCE_LINK_TEMPLATE="$CI_PROJECT_URL"/blob/\$\$r/\$\$f
244
+    - make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W -D jupyter_execute_default_kernel=kwant-latest' SOURCE_LINK_TEMPLATE="$CI_PROJECT_URL"/blob/\$\$r/\$\$f
245 245
   artifacts:
246 246
     paths:
247 247
       - doc/build/html/
... ...
@@ -255,7 +255,7 @@ build PDF documentation:
255 255
   script:
256 256
     - pip install git+https://github.com/jupyter-widgets/jupyter-sphinx
257 257
     - python -m ipykernel install --user --name kwant-latest
258
-    - make -C doc latex SPHINXOPTS='-n -W'
258
+    - make -C doc latex SPHINXOPTS='-n -W -D jupyter_execute_default_kernel=kwant-latest'
259 259
     - cd doc/build/latex
260 260
     - make all-pdf
261 261
   artifacts:
Browse code

install jupyter-sphinx when building documentation

Joseph Weston authored on 02/05/2019 15:08:15
Showing 1 changed files
... ...
@@ -239,6 +239,8 @@ build documentation:
239 239
     - build:latest
240 240
   stage: test
241 241
   script:
242
+    - pip install git+https://github.com/jupyter-widgets/jupyter-sphinx
243
+    - python -m ipykernel install --user --name kwant-latest
242 244
     - make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W' SOURCE_LINK_TEMPLATE="$CI_PROJECT_URL"/blob/\$\$r/\$\$f
243 245
   artifacts:
244 246
     paths:
... ...
@@ -251,6 +253,8 @@ build PDF documentation:
251 253
     - build:latest
252 254
   stage: test
253 255
   script:
256
+    - pip install git+https://github.com/jupyter-widgets/jupyter-sphinx
257
+    - python -m ipykernel install --user --name kwant-latest
254 258
     - make -C doc latex SPHINXOPTS='-n -W'
255 259
     - cd doc/build/latex
256 260
     - make all-pdf
Browse code

fix typos in Gitlab CI

Joseph Weston authored on 06/05/2019 10:36:11
Showing 1 changed files
... ...
@@ -223,9 +223,9 @@ test:bleeding-edge:
223 223
     - schedules
224 224
   allow_failure: true
225 225
 
226
-coverage:latest
227
-  << *coverage
228
-  << *latest_env
226
+coverage:latest:
227
+  <<: *coverage
228
+  <<: *latest_env
229 229
   dependencies:
230 230
     - build:latest
231 231
   only:
Browse code

enable coverage reports on scheduled builds only

Joseph Weston authored on 06/05/2019 10:10:38
Showing 1 changed files
... ...
@@ -173,6 +173,16 @@ check for dependencies installed:
173 173
     reports:
174 174
       junit: tests.xml
175 175
 
176
+.coverage: &coverage
177
+  stage: test
178
+  script:
179
+    - py.test -r w --cov=kwant --cov-report term --cov-report html --flakes kwant --junitxml=tests.xml --durations=10
180
+  artifacts:
181
+    paths:
182
+      - htmlcov
183
+    reports:
184
+      junit: tests.xml
185
+
176 186
 
177 187
 test:stable:
178 188
   <<: *test
... ...
@@ -213,6 +223,14 @@ test:bleeding-edge:
213 223
     - schedules
214 224
   allow_failure: true
215 225
 
226
+coverage:latest
227
+  << *coverage
228
+  << *latest_env
229
+  dependencies:
230
+    - build:latest
231
+  only:
232
+    - schedules
233
+
216 234
 ## Documentation building
217 235
 
218 236
 build documentation:
... ...
@@ -251,7 +269,44 @@ check for broken links in doc:
251 269
   allow_failure: true
252 270
 
253 271
 
254
-## Upload dev documentation
272
+## Upload coverage reports and dev documentation
273
+
274
+upload coverage:
275
+  stage: deploy
276
+  only:
277
+    - schedules
278
+  dependencies:
279
+    - coverage:latest
280
+  environment:
281
+    name: coverage/$CI_BUILD_REF_NAME
282
+    url: https://kwant-project.org/coverage/$CI_BUILD_REF_SLUG
283
+    on_stop: remove_coverage
284
+  before_script:
285
+    - mkdir -p ~/.ssh
286
+    - echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
287
+  script:
288
+    - mv htmlcov $CI_BUILD_REF_SLUG
289
+    - rsync -rlv -e "$IGNORE_HOSTKEY" --delete --relative $CI_BUILD_REF_SLUG kwant@kwant-project.org:coverage/
290
+  after_script:
291
+    - rm -rf ~/.ssh
292
+
293
+
294
+remove_coverage:
295
+  stage: deploy
296
+  only:
297
+    - branches@kwant/kwant
298
+  when: manual
299
+  environment:
300
+    name: coverage/$CI_BUILD_REF_NAME
301
+    action: stop
302
+  before_script:
303
+    - mkdir -p ~/.ssh
304
+    - echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
305
+  script:
306
+    - mkdir empty/
307
+    - rsync -rlv -e "$IGNORE_HOSTKEY" --delete empty/ kwant@kwant-project.org:coverage/$CI_BUILD_REF_SLUG
308
+  after_script:
309
+    - rm -rf ~/.ssh
255 310
 
256 311
 
257 312
 upload documentation to the test server:
Browse code

temporarily remove coverage reports (too slow)

Anton Akhmerov authored on 03/05/2019 13:17:27
Showing 1 changed files
... ...
@@ -168,10 +168,8 @@ check for dependencies installed:
168 168
 .test: &test
169 169
   stage: test
170 170
   script:
171
-    - py.test -r w --cov=kwant --cov-report term --cov-report html --flakes kwant --junitxml=tests.xml --durations=10
171
+    - py.test -r w --flakes kwant --junitxml=tests.xml --durations=10
172 172
   artifacts:
173
-    paths:
174
-      - htmlcov
175 173
     reports:
176 174
       junit: tests.xml
177 175
 
... ...
@@ -253,42 +251,7 @@ check for broken links in doc:
253 251
   allow_failure: true
254 252
 
255 253
 
256
-## Upload coverage reports and dev documentation
257
-
258
-upload coverage:
259
-  stage: deploy
260
-  only:
261
-    - branches@kwant/kwant
262
-  environment:
263
-    name: coverage/$CI_BUILD_REF_NAME
264
-    url: https://kwant-project.org/coverage/$CI_BUILD_REF_SLUG
265
-    on_stop: remove_coverage
266
-  before_script:
267
-    - mkdir -p ~/.ssh
268
-    - echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
269
-  script:
270
-    - mv htmlcov $CI_BUILD_REF_SLUG
271
-    - rsync -rlv -e "$IGNORE_HOSTKEY" --delete --relative $CI_BUILD_REF_SLUG kwant@kwant-project.org:coverage/
272
-  after_script:
273
-    - rm -rf ~/.ssh
274
-
275
-
276
-remove_coverage:
277
-  stage: deploy
278
-  only:
279
-    - branches@kwant/kwant
280
-  when: manual
281
-  environment:
282
-    name: coverage/$CI_BUILD_REF_NAME
283
-    action: stop
284
-  before_script:
285
-    - mkdir -p ~/.ssh
286
-    - echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
287
-  script:
288
-    - mkdir empty/
289
-    - rsync -rlv -e "$IGNORE_HOSTKEY" --delete empty/ kwant@kwant-project.org:coverage/$CI_BUILD_REF_SLUG
290
-  after_script:
291
-    - rm -rf ~/.ssh
254
+## Upload dev documentation
292 255
 
293 256
 
294 257
 upload documentation to the test server:
Browse code

temporarily remove building of conda package

The build process uses a recipe from a separate repository, which was not
updated for a while. Instead we should be calling conda-build directly.
However this may be done separately.

Anton Akhmerov authored on 08/02/2019 18:38:35
Showing 1 changed files
... ...
@@ -253,41 +253,6 @@ check for broken links in doc:
253 253
   allow_failure: true
254 254
 
255 255
 
256
-## Conda package building
257
-
258
-.conda-template: &conda_job
259
-  stage: deploy
260
-  image: condaforge/linux-anvil
261
-  script:
262
-    - /usr/bin/sudo -n yum install -y devtoolset-2-gcc-gfortran
263
-    - git clone https://gitlab.kwant-project.org/kwant/conda-recipes.git
264
-    - conda config --add channels kwant
265
-    - conda build --python 3.5 conda-recipes/kwant-dev
266
-    - conda build --python 3.6 conda-recipes/kwant-dev
267
-    - mv /opt/conda/conda-bld/linux-64/kwant-dev*.tar.bz2 .
268
-    - if [ ! -z $ANACONDA_TOKEN ]; then anaconda --token=$ANACONDA_TOKEN upload --force kwant-dev*tar.bz2; fi
269
-  artifacts:
270
-    paths:
271
-      - kwant-dev*.tar.bz2
272
-    expire_in: 1 month
273
-
274
-
275
-# build on master always
276
-build and upload conda package:
277
-  <<: *conda_job
278
-  only:
279
-    - master@kwant/kwant
280
-
281
-
282
-# manual triggers for branches other than master possible
283
-build and upload conda package (manual):
284
-  <<: *conda_job
285
-  only:
286
-    - branches@kwant/kwant
287
-  except:
288
-    - master@kwant/kwant
289
-  when: manual
290
-
291 256
 ## Upload coverage reports and dev documentation
292 257
 
293 258
 upload coverage:
Browse code

remove an obsolete conda toolchain hotfix

Anton Akhmerov authored on 08/02/2019 18:37:47
Showing 1 changed files
... ...
@@ -92,13 +92,11 @@ build-env:default:
92 92
   before_script:
93 93
     - source deactivate
94 94
     - source activate kwant-stable
95
-    - unset CFLAGS  # https://github.com/conda-forge/toolchain-feedstock/issues/41
96 95
 
97 96
 .no-extras-env: &no_extras_env
98 97
   before_script:
99 98
     - source deactivate
100 99
     - source activate kwant-stable-no-extras
101
-    - unset CFLAGS  # https://github.com/conda-forge/toolchain-feedstock/issues/41
102 100
 
103 101
 # Note that this is 'latest' as of when the image was last built
104 102
 .latest-env: &latest_env
... ...
@@ -106,7 +104,6 @@ build-env:default:
106 104
     - source deactivate
107 105
     - source activate kwant-latest
108 106
     - pip install qsymm
109
-    - unset CFLAGS  # https://github.com/conda-forge/toolchain-feedstock/issues/41
110 107
 
111 108
 .bleeding-edge-env: &bleeding_edge_env
112 109
   before_script:
Browse code

add qsymm to optional dependencies

Also update CI to install qsymm on relevant platforms, and update
pytest config to skip kwant.qsymm tests when qsymm is not installed

Joseph Weston authored on 06/02/2019 18:08:18
Showing 1 changed files
... ...
@@ -105,6 +105,7 @@ build-env:default:
105 105
   before_script:
106 106
     - source deactivate
107 107
     - source activate kwant-latest
108
+    - pip install qsymm
108 109
     - unset CFLAGS  # https://github.com/conda-forge/toolchain-feedstock/issues/41
109 110
 
110 111
 .bleeding-edge-env: &bleeding_edge_env
... ...
@@ -112,13 +113,17 @@ build-env:default:
112 113
     - source deactivate
113 114
     - conda env update -f /kwant-latest.yml
114 115
     - source activate kwant-latest
116
+    - pip install qsymm
115 117
 
116 118
 .ubuntu-env: &ubuntu_env
117 119
   image: gitlab.kwant-project.org:5005/kwant/kwant/ubuntu
120
+  before_script:
121
+    - pip3 install qsymm
118 122
 
119 123
 .debian-env: &debian_env
120 124
   image: gitlab.kwant-project.org:5005/kwant/kwant/debian
121
-
125
+  before_script:
126
+    - pip3 install qsymm
122 127
 
123 128
 ## Build Jobs
124 129
 
Browse code

CI: allow test failures on bleeding edge

The UI will show the test failures as warnings (which we can
address).

Joseph Weston authored on 04/02/2019 11:22:55
Showing 1 changed files
... ...
@@ -147,6 +147,7 @@ build:bleeding-edge:
147 147
   <<: *bleeding_edge_env
148 148
   only:
149 149
     - schedules
150
+  allow_failure: true
150 151
 
151 152
 ## Test Jobs
152 153
 
... ...
@@ -210,6 +211,7 @@ test:bleeding-edge:
210 211
     - build:bleeding-edge
211 212
   only:
212 213
     - schedules
214
+  allow_failure: true
213 215
 
214 216
 ## Documentation building
215 217
 
Browse code

print durations of 10 slowest tests

Anton Akhmerov authored on 31/12/2018 21:14:00
Showing 1 changed files
... ...
@@ -165,7 +165,7 @@ check for dependencies installed:
165 165
 .test: &test
166 166
   stage: test
167 167
   script:
168
-    - py.test -r w --cov=kwant --cov-report term --cov-report html --flakes kwant --junitxml=tests.xml
168
+    - py.test -r w --cov=kwant --cov-report term --cov-report html --flakes kwant --junitxml=tests.xml --durations=10
169 169
   artifacts:
170 170
     paths:
171 171
       - htmlcov
Browse code

only build docker images when manually triggered

Anton Akhmerov authored on 31/12/2018 02:14:45
Showing 1 changed files
... ...
@@ -17,6 +17,7 @@ variables:
17 17
 
18 18
 .build-env: &build-env
19 19
   stage: build-env
20
+  when: manual
20 21
   image:
21 22
     name: gcr.io/kaniko-project/executor:debug
22 23
     entrypoint: [""]
Browse code

increase artifact expiry time

Sometimes the testing jobs fail because the build artifacts
are removed.

Joseph Weston authored on 29/11/2018 12:10:48
Showing 1 changed files
... ...
@@ -84,7 +84,7 @@ build-env:default:
84 84
     - ./setup.py build_ext -i
85 85
   artifacts:
86 86
     untracked: true
87
-    expire_in: 1 hour
87
+    expire_in: 2 hour
88 88
 
89 89
 
90 90
 .stable-env: &stable_env
Browse code

build testing images as part of Kwant's CI pipeline

Only builds testing images when the relevant dockerfile/conda envs
have changed.

Joseph Weston authored on 28/11/2018 15:08:42
Showing 1 changed files
... ...
@@ -1,6 +1,7 @@
1
-image: gitlab.kwant-project.org:5005/kwant/testing
1
+image: gitlab.kwant-project.org:5005/kwant/kwant
2 2
 
3 3
 stages:
4
+  - build-env
4 5
   - build
5 6
   - test
6 7
   - deploy
... ...
@@ -11,6 +12,69 @@ variables:
11 12
   # secret information, and using 'ssh-keyscan' causes the CI server's IP to be blacklisted
12 13
   IGNORE_HOSTKEY: "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
13 14
 
15
+## Building Docker environments
16
+## Only runs when docker specifications change
17
+
18
+.build-env: &build-env
19
+  stage: build-env
20
+  image:
21
+    name: gcr.io/kaniko-project/executor:debug
22
+    entrypoint: [""]
23
+  artifacts:
24
+    untracked: true
25
+    expire_in: 1 hour
26
+  before_script:
27
+    - mkdir -p /root/.docker
28
+    - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /root/.docker/config.json
29
+
30
+build-env:ubuntu:
31
+  <<: *build-env
32
+  only:
33
+    changes:
34
+      - docker/Dockerfile.ubuntu
35
+  script:
36
+    - /kaniko/executor
37
+      --context $CI_PROJECT_DIR/docker
38
+      --dockerfile $CI_PROJECT_DIR/docker/Dockerfile.ubuntu
39
+      --destination $CI_REGISTRY_IMAGE/ubuntu
40
+
41
+build-env:debian:
42
+  <<: *build-env
43
+  only:
44
+    changes:
45
+      - docker/Dockerfile.debian
46
+  script:
47
+    - /kaniko/executor
48
+      --context $CI_PROJECT_DIR/docker
49
+      --dockerfile $CI_PROJECT_DIR/docker/Dockerfile.debian
50
+      --destination $CI_REGISTRY_IMAGE/debian
51
+
52
+build-env:conda:
53
+  <<: *build-env
54
+  only:
55
+    changes:
56
+      - docker/Dockerfile.conda
57
+      - docker/*.yml
58
+  script:
59
+    - /kaniko/executor
60
+      --context $CI_PROJECT_DIR/docker
61
+      --dockerfile $CI_PROJECT_DIR/docker/Dockerfile.conda
62
+      --destination $CI_REGISTRY_IMAGE/conda
63
+
64
+build-env:default:
65
+  <<: *build-env
66
+  only:
67
+    changes:
68
+      - docker/Dockerfile.conda
69
+      - docker/*.yml
70
+  script:
71
+    - /kaniko/executor
72
+      --context $CI_PROJECT_DIR/docker
73
+      --dockerfile $CI_PROJECT_DIR/docker/Dockerfile.conda
74
+      --destination $CI_REGISTRY_IMAGE
75
+
76
+
77
+## Build environment specifications
14 78
 
15 79
 .build: &build
16 80
   stage: build
... ...
@@ -49,10 +113,10 @@ variables:
49 113
     - source activate kwant-latest
50 114
 
51 115
 .ubuntu-env: &ubuntu_env
52
-  image: gitlab.kwant-project.org:5005/kwant/testing/ubuntu
116
+  image: gitlab.kwant-project.org:5005/kwant/kwant/ubuntu
53 117
 
54 118
 .debian-env: &debian_env
55
-  image: gitlab.kwant-project.org:5005/kwant/testing/debian
119
+  image: gitlab.kwant-project.org:5005/kwant/kwant/debian
56 120
 
57 121
 
58 122
 ## Build Jobs
Browse code

Merge branch 'stable'

Joseph Weston authored on 10/10/2018 13:08:40
Showing 0 changed files
Browse code

CI: build against different dependencies

Currently we test against 5 environments: Ubuntu LTS, Debian stable,
minimum required dependency versions from conda forge, minimum
required dependencies without extras (sympy and matplotlib), and latest
dependency versions from conda forge.

Joseph Weston authored on 08/08/2018 16:58:49
Showing 1 changed files
... ...
@@ -1,4 +1,4 @@
1
-image: kwant/testing
1
+image: gitlab.kwant-project.org:5005/kwant/testing
2 2
 
3 3
 stages:
4 4
   - build
... ...
@@ -12,7 +12,7 @@ variables:
12 12
   IGNORE_HOSTKEY: "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
13 13
 
14 14
 
15
-build package:
15
+.build: &build
16 16
   stage: build
17 17
   script:
18 18
     - echo -e "[DEFAULT]\ndefine_macros = CYTHON_TRACE=1" >build.conf
... ...
@@ -22,12 +22,74 @@ build package:
22 22
     untracked: true
23 23
     expire_in: 1 hour
24 24
 
25
+
26
+.stable-env: &stable_env
27
+  before_script:
28
+    - source deactivate
29
+    - source activate kwant-stable
30
+    - unset CFLAGS  # https://github.com/conda-forge/toolchain-feedstock/issues/41
31
+
32
+.no-extras-env: &no_extras_env
33
+  before_script:
34
+    - source deactivate
35
+    - source activate kwant-stable-no-extras
36
+    - unset CFLAGS  # https://github.com/conda-forge/toolchain-feedstock/issues/41
37
+
38
+# Note that this is 'latest' as of when the image was last built
39
+.latest-env: &latest_env
40
+  before_script:
41
+    - source deactivate
42
+    - source activate kwant-latest
43
+    - unset CFLAGS  # https://github.com/conda-forge/toolchain-feedstock/issues/41
44
+
45
+.bleeding-edge-env: &bleeding_edge_env
46
+  before_script:
47
+    - source deactivate
48
+    - conda env update -f /kwant-latest.yml
49
+    - source activate kwant-latest
50
+
51
+.ubuntu-env: &ubuntu_env
52
+  image: gitlab.kwant-project.org:5005/kwant/testing/ubuntu
53
+
54
+.debian-env: &debian_env
55
+  image: gitlab.kwant-project.org:5005/kwant/testing/debian
56
+
57
+
58
+## Build Jobs
59
+
60
+build:ubuntu:
61
+  <<: *build
62
+  <<: *ubuntu_env
63
+
64
+build:debian:
65
+  <<: *build
66
+  <<: *debian_env
67
+
68
+build:stable:
69
+  <<: *build
70
+  <<: *stable_env
71
+
72
+build:no-extras:
73
+  <<: *build
74
+  <<: *no_extras_env
75
+
76
+build:latest:
77
+  <<: *build
78
+  <<: *latest_env
79
+
80
+build:bleeding-edge:
81
+  <<: *build
82
+  <<: *bleeding_edge_env
83
+  only:
84
+    - schedules
85
+
86
+## Test Jobs
87
+
25 88
 check whitespace style:
26
-  stage: build
89
+  stage: test
27 90
   script: ./check_whitespace
28 91
   allow_failure: true
29 92
 
30
-
31 93
 check for dependencies installed:
32 94
   stage: test
33 95
   script:
... ...
@@ -35,7 +97,59 @@ check for dependencies installed:
35 97
   allow_failure: true
36 98
 
37 99
 
100
+.test: &test
101
+  stage: test
102
+  script:
103
+    - py.test -r w --cov=kwant --cov-report term --cov-report html --flakes kwant
104
+  artifacts:
105
+    paths:
106
+      - htmlcov
107
+
108
+
109
+test:stable:
110
+  <<: *test
111
+  <<: *stable_env
112
+  dependencies:
113
+    - build:stable
114
+
115
+test:no-extras:
116
+  <<: *test
117
+  <<: *no_extras_env
118
+  dependencies:
119
+    - build:no-extras
120
+
121
+test:ubuntu:
122
+  <<: *test
123
+  <<: *ubuntu_env
124
+  dependencies:
125
+    - build:ubuntu
126
+
127
+test:debian:
128
+  <<: *test
129
+  <<: *debian_env
130
+  dependencies:
131
+    - build:debian
132
+
133
+test:latest:
134
+  <<: *test
135
+  <<: *latest_env
136
+  dependencies:
137
+    - build:latest
138
+
139
+test:bleeding-edge:
140
+  <<: *test
141
+  <<: *bleeding_edge_env
142
+  dependencies:
143
+    - build:bleeding-edge
144
+  only:
145
+    - schedules
146
+
147
+## Documentation building
148
+
38 149
 build documentation:
150
+  <<: *latest_env
151
+  dependencies:
152
+    - build:latest
39 153
   stage: test
40 154
   script:
41 155
     - make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W' SOURCE_LINK_TEMPLATE="$CI_PROJECT_URL"/blob/\$\$r/\$\$f
... ...
@@ -45,9 +159,11 @@ build documentation:
45 159
     expire_in: 1 month
46 160
 
47 161
 build PDF documentation:
162
+  <<: *latest_env
163
+  dependencies:
164
+    - build:latest
48 165
   stage: test
49 166
   script:
50
-    - pip3 install sympy
51 167
     - make -C doc latex SPHINXOPTS='-n -W'
52 168
     - cd doc/build/latex
53 169
     - make all-pdf
... ...
@@ -56,22 +172,18 @@ build PDF documentation:
56 172
       - doc/build/latex/kwant.pdf
57 173
     expire_in: 1 month
58 174
 
59
-run tests:
60
-  stage: test
61
-  script:
62
-    - py.test -r w --cov=kwant --cov-report term --cov-report html --flakes kwant
63
-  artifacts:
64
-    paths:
65
-      - htmlcov
66
-
67
-
68 175
 check for broken links in doc:
176
+  <<: *latest_env
177
+  dependencies:
178
+    - build:latest
69 179
   stage: test
70 180
   script:
71 181
     - make -C doc linkcheck
72 182
   allow_failure: true
73 183
 
74 184
 
185
+## Conda package building
186
+
75 187
 .conda-template: &conda_job
76 188
   stage: deploy
77 189
   image: condaforge/linux-anvil
... ...
@@ -105,6 +217,7 @@ build and upload conda package (manual):
105 217
     - master@kwant/kwant
106 218
   when: manual
107 219
 
220
+## Upload coverage reports and dev documentation
108 221
 
109 222
 upload coverage:
110 223
   stage: deploy
... ...
@@ -192,7 +305,8 @@ upload dev version docs:
192 305
   after_script:
193 306
     - rm -rf ~/.ssh
194 307
 
195
-# tagged version deploy
308
+
309
+## Build documentation for tagged releases
196 310
 
197 311
 .tagged-version: &tagged_version
198 312
     only:
Browse code

ci: generate junit report from tests

Anton Akhmerov authored on 22/08/2018 20:30:58
Showing 1 changed files
... ...
@@ -61,10 +61,12 @@ build PDF documentation:
61 61
 run tests:
62 62
   stage: test
63 63
   script:
64
-    - py.test -r w --cov=kwant --cov-report term --cov-report html --flakes kwant
64
+    - py.test -r w --cov=kwant --cov-report term --cov-report html --flakes kwant --junitxml=tests.xml
65 65
   artifacts:
66 66
     paths:
67 67
       - htmlcov
68
+    reports:
69
+      junit: tests.xml
68 70
 
69 71
 
70 72
 check for broken links in doc:
Browse code

Merge branch 'stable'

Christoph Groth authored on 17/08/2018 17:59:35
Showing 0 changed files
Browse code

fix CI link template

Anton Akhmerov authored on 14/08/2018 17:09:29 • Christoph Groth committed on 14/08/2018 17:58:29
Showing 1 changed files
... ...
@@ -38,7 +38,7 @@ check for dependencies installed:
38 38
 build documentation:
39 39
   stage: test
40 40
   script:
41
-    - make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W' SOURCE_LINK_TEMPLATE="$CI_PROJECT_URL"/blob/$$r/$$f
41
+    - make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W' SOURCE_LINK_TEMPLATE="$CI_PROJECT_URL"/blob/\$\$r/\$\$f
42 42
   artifacts:
43 43
     paths:
44 44
       - doc/build/html/
Browse code

links to source: get refname from version string

So it's no longer necessary to provide the REFNAME environment variable.
Also the link template string format is now more general to support at
least gitlab github and cgit.

Christoph Groth authored on 13/08/2018 17:14:10
Showing 1 changed files
... ...
@@ -38,7 +38,7 @@ check for dependencies installed:
38 38
 build documentation:
39 39
   stage: test
40 40
   script:
41
-    - make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W' REFNAME="${CI_COMMIT_TAG:-$CI_COMMIT_SHA}" SOURCE_URL="$CI_PROJECT_URL"/blob
41
+    - make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W' SOURCE_LINK_TEMPLATE="$CI_PROJECT_URL"/blob/$$r/$$f
42 42
   artifacts:
43 43
     paths:
44 44
       - doc/build/html/
Browse code

ci: remove Github mirroring

Gitlab now has built-in mirroring, so we don't need to have a CI
step for this now.

Joseph Weston authored on 03/08/2018 11:12:49
Showing 1 changed files
... ...
@@ -12,26 +12,6 @@ variables:
12 12
   IGNORE_HOSTKEY: "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
13 13
 
14 14
 
15
-mirror repository:
16
-    stage: build
17
-    only:
18
-        - branches@kwant/kwant
19
-    allow_failure: true
20
-    variables:
21
-      REPOS: "git@github.com:kwant-project/kwant.git git@gitlab.com:kwant/kwant.git"
22
-    before_script:
23
-      - HOSTS=$(for REPO in $REPOS; do echo ${REPO%:*} | cut -d'@' -f2; done)
24
-      - mkdir ~/.ssh && chmod 700 ~/.ssh
25
-      - for HOST in $HOSTS; do ssh-keyscan $HOST >> ~/.ssh/known_hosts; done
26
-      - echo "$DEPLOY_KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
27
-    after_script:
28
-      - rm -rf ~/.ssh
29
-    script:
30
-      - ORIGIN_URL=$(git config --get remote.origin.url)
31
-      - cd $(mktemp -d); git clone --bare $ORIGIN_URL .
32
-      - for REPO in $REPOS; do git push --mirror $REPO; done
33
-
34
-
35 15
 build package:
36 16
   stage: build
37 17
   script:
Browse code

ci: remove Github mirroring

Gitlab now has built-in mirroring, so we don't need to have a CI
step for this now.

Joseph Weston authored on 03/08/2018 11:12:49
Showing 1 changed files
... ...
@@ -11,26 +11,6 @@ variables:
11 11
   IGNORE_HOSTKEY: "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
12 12
 
13 13
 
14
-mirror repository:
15
-    stage: build
16
-    only:
17
-        - branches@kwant/kwant
18
-    allow_failure: true
19
-    variables:
20
-      REPOS: "git@github.com:kwant-project/kwant.git git@gitlab.com:kwant/kwant.git"
21
-    before_script:
22
-      - HOSTS=$(for REPO in $REPOS; do echo ${REPO%:*} | cut -d'@' -f2; done)
23
-      - mkdir ~/.ssh && chmod 700 ~/.ssh
24
-      - for HOST in $HOSTS; do ssh-keyscan $HOST >> ~/.ssh/known_hosts; done
25
-      - echo "$DEPLOY_KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
26
-    after_script:
27
-      - rm -rf ~/.ssh
28
-    script:
29
-      - ORIGIN_URL=$(git config --get remote.origin.url)
30
-      - cd $(mktemp -d); git clone --bare $ORIGIN_URL .
31
-      - for REPO in $REPOS; do git push --mirror $REPO; done
32
-
33
-
34 14
 build package:
35 15
   stage: build
36 16
   script:
Browse code

fix CI to run "deploy" tasks only for main kwant repo

Rafał Skolasiński authored on 05/07/2018 15:13:09
Showing 1 changed files
... ...
@@ -113,15 +113,16 @@ check for broken links in doc:
113 113
 build and upload conda package:
114 114
   <<: *conda_job
115 115
   only:
116
-    - master
116
+    - master@kwant/kwant
117 117
 
118 118
 
119 119
 # manual triggers for branches other than master possible
120 120
 build and upload conda package (manual):
121 121
   <<: *conda_job
122
+  only:
123
+    - branches@kwant/kwant
122 124
   except:
123
-    - master
124
-    - /^v[0-9]+\.[0-9]+.[0-9]+$/@kwant/kwant
125
+    - master@kwant/kwant
125 126
   when: manual
126 127
 
127 128
 
Browse code

use latest matplotlib when generating the documentation

Closes #171

Joseph Weston authored on 12/03/2018 16:37:34
Showing 1 changed files
... ...
@@ -57,6 +57,7 @@ check for dependencies installed:
57 57
 build documentation:
58 58
   stage: test
59 59
   script:
60
+    - pip3 install --upgrade matplotlib
60 61
     - make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W' REFNAME="${CI_COMMIT_TAG:-$CI_COMMIT_SHA}" SOURCE_URL="$CI_PROJECT_URL"/blob
61 62
   artifacts:
62 63
     paths:
... ...
@@ -67,6 +68,7 @@ build PDF documentation:
67 68
   stage: test
68 69
   script:
69 70
     - pip3 install sympy
71
+    - pip3 install --upgrade matplotlib
70 72
     - make -C doc latex SPHINXOPTS='-n -W'
71 73
     - cd doc/build/latex
72 74
     - make all-pdf
Browse code

add CI stages to prepare tagged releases

Joseph Weston authored on 20/11/2017 15:19:18
Showing 1 changed files
... ...
@@ -4,6 +4,7 @@ stages:
4 4
   - build
5 5
   - test
6 6
   - deploy
7
+  - release
7 8
 
8 9
 variables:
9 10
   # rsync is used to send documentation to our web servers: we never send any
... ...
@@ -120,6 +121,7 @@ build and upload conda package (manual):
120 121
   <<: *conda_job
121 122
   except:
122 123
     - master
124
+    - /^v[0-9]+\.[0-9]+.[0-9]+$/@kwant/kwant
123 125
   when: manual
124 126
 
125 127
 
... ...
@@ -209,17 +211,22 @@ upload dev version docs:
209 211
   after_script:
210 212
     - rm -rf ~/.ssh
211 213
 
214
+# tagged version deploy
212 215
 
213
-upload docs of tagged build:
214
-  stage: deploy
215
-  environment:
216
-    name: production
217
-  only:
218
-     - /^v[0-9]+\.[0-9]+.[0-9]+$/@kwant/kwant
219
-  before_script:
220
-    - mkdir -p ~/.ssh
221
-    - echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
216
+.tagged-version: &tagged_version
217
+    only:
218
+       - /^v[0-9]+\.[0-9]+.[0-9]+$/@kwant/kwant
219
+
220
+gather release artifacts:
221
+  <<: *tagged_version
222
+  stage: release
222 223
   script:
223
-    - rsync -rlv -e "$IGNORE_HOSTKEY" --delete doc/build/html/* kwant@kwant-project.org:doc/$(echo $CI_BUILD_TAG | sed 's/v\([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/')
224
-  after_script:
225
-    - rm -rf ~/.ssh
224
+    - ./setup.py sdist
225
+    - mkdir docs
226
+    - mv doc/build/latex/kwant.pdf docs/kwant-doc-${CI_COMMIT_TAG//v}.pdf
227
+    - mv doc/build/html docs/html
228
+    - zip -r docs/kwant-doc-${CI_COMMIT_TAG//v}.zip docs/html
229
+  artifacts:
230
+    paths:
231
+      - docs
232
+      - dist
Browse code

run yum install with sudo during the conda build

Bas Nijholt authored on 10/01/2018 15:02:56
Showing 1 changed files
... ...
@@ -95,7 +95,7 @@ check for broken links in doc:
95 95
   stage: deploy
96 96
   image: condaforge/linux-anvil
97 97
   script:
98
-    - yum install -y devtoolset-2-gcc-gfortran
98
+    - /usr/bin/sudo -n yum install -y devtoolset-2-gcc-gfortran
99 99
     - git clone https://gitlab.kwant-project.org/kwant/conda-recipes.git
100 100
     - conda config --add channels kwant
101 101
     - conda build --python 3.5 conda-recipes/kwant-dev
Browse code

enable reporting of warnings

Joseph Weston authored on 19/06/2017 14:05:52
Showing 1 changed files
... ...
@@ -78,7 +78,7 @@ build PDF documentation:
78 78
 run tests:
79 79
   stage: test
80 80
   script:
81
-    - py.test --cov=kwant --cov-report term --cov-report html --flakes kwant
81
+    - py.test -r w --cov=kwant --cov-report term --cov-report html --flakes kwant
82 82
   artifacts:
83 83
     paths:
84 84
       - htmlcov
Browse code

ci: enable PDF documentation builds

Joseph Weston authored on 11/09/2017 11:47:16
Showing 1 changed files
... ...
@@ -63,6 +63,17 @@ build documentation:
63 63
       - doc/build/html/
64 64
     expire_in: 1 month
65 65
 
66
+build PDF documentation:
67
+  stage: test
68
+  script:
69
+    - pip3 install sympy
70
+    - make -C doc latex SPHINXOPTS='-n -W'
71
+    - cd doc/build/latex
72
+    - make all-pdf
73
+  artifacts:
74
+    paths:
75
+      - doc/build/latex/kwant.pdf
76
+    expire_in: 1 month
66 77
 
67 78
 run tests:
68 79
   stage: test
Browse code

ci: remove sympy from CI config

sympy is installed in the Kwant testing image now.

Joseph Weston authored on 30/08/2017 15:09:08
Showing 1 changed files
... ...
@@ -57,7 +57,6 @@ check for dependencies installed:
57 57
 build documentation:
58 58
   stage: test
59 59
   script:
60
-    - pip3 install sympy
61 60
     - make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W' REFNAME="${CI_COMMIT_TAG:-$CI_COMMIT_SHA}" SOURCE_URL="$CI_PROJECT_URL"/blob
62 61
   artifacts:
63 62
     paths:
... ...
@@ -68,7 +67,6 @@ build documentation:
68 67
 run tests:
69 68
   stage: test
70 69
   script:
71
-    - pip3 install sympy
72 70
     - py.test --cov=kwant --cov-report term --cov-report html --flakes kwant
73 71
   artifacts:
74 72
     paths:
... ...
@@ -78,7 +76,6 @@ run tests:
78 76
 check for broken links in doc:
79 77
   stage: test
80 78
   script:
81
-    - pip3 install sympy
82 79
     - make -C doc linkcheck
83 80
   allow_failure: true
84 81
 
Browse code

add links in the documentation to the source code

Pablo Pérez Piskunow authored on 22/06/2017 20:39:54
Showing 1 changed files
... ...
@@ -58,7 +58,7 @@ build documentation:
58 58
   stage: test
59 59
   script:
60 60
     - pip3 install sympy
61
-    - make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W'
61
+    - make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W' REFNAME="${CI_COMMIT_TAG:-$CI_COMMIT_SHA}" SOURCE_URL="$CI_PROJECT_URL"/blob
62 62
   artifacts:
63 63
     paths:
64 64
       - doc/build/html/
Browse code

add discretizer tutorial

RafaÅ‚ SkolasiÅ„ski authored on 21/03/2017 12:29:05 • Joseph Weston committed on 18/04/2017 16:13:50
Showing 1 changed files
... ...
@@ -57,6 +57,7 @@ check for dependencies installed:
57 57
 build documentation:
58 58
   stage: test
59 59
   script:
60
+    - pip3 install sympy
60 61
     - make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W'
61 62
   artifacts:
62 63
     paths:
... ...
@@ -77,6 +78,7 @@ run tests:
77 78
 check for broken links in doc:
78 79
   stage: test
79 80
   script:
81
+    - pip3 install sympy
80 82
     - make -C doc linkcheck
81 83
   allow_failure: true
82 84
 
Browse code

CI: build and optionally upload conda package in a single job

We build conda packages on 'master' (on all forks) by default.
Builds for branches may be triggered manually.

Joseph Weston authored on 28/03/2017 12:45:44
Showing 1 changed files
... ...
@@ -3,7 +3,6 @@ image: kwant/testing
3 3
 stages:
4 4
   - build
5 5
   - test
6
-  - package
7 6
   - deploy
8 7
 
9 8
 variables:
... ...
@@ -82,11 +81,8 @@ check for broken links in doc:
82 81
   allow_failure: true
83 82
 
84 83
 
85
-create conda package:
86
-  stage: package
87
-  only:
88
-    - master
89
-    - /^.*-build$/
84
+.conda-template: &conda_job
85
+  stage: deploy
90 86
   image: condaforge/linux-anvil
91 87
   script:
92 88
     - yum install -y devtoolset-2-gcc-gfortran
... ...
@@ -95,18 +91,26 @@ create conda package:
95 91
     - conda build --python 3.5 conda-recipes/kwant-dev
96 92
     - conda build --python 3.6 conda-recipes/kwant-dev
97 93
     - mv /opt/conda/conda-bld/linux-64/kwant-dev*.tar.bz2 .
94
+    - if [ ! -z $ANACONDA_TOKEN ]; then anaconda --token=$ANACONDA_TOKEN upload --force kwant-dev*tar.bz2; fi
98 95
   artifacts:
99 96
     paths:
100 97
       - kwant-dev*.tar.bz2
101 98
     expire_in: 1 month
102 99
 
103
-upload conda package:
104
-  stage: deploy
100
+
101
+# build on master always
102
+build and upload conda package:
103
+  <<: *conda_job
105 104
   only:
106
-    - master@kwant/kwant
107
-  image: condaforge/linux-anvil
108
-  script:
109
-    - anaconda --token=$ANACONDA_TOKEN upload --force kwant-dev*tar.bz2
105
+    - master
106
+
107
+
108
+# manual triggers for branches other than master possible
109
+build and upload conda package (manual):
110
+  <<: *conda_job
111
+  except:
112
+    - master
113
+  when: manual
110 114
 
111 115
 
112 116
 upload coverage:
Browse code

CI: remove python 3.4 support from conda packaging

Conda forge removes support for Python 3.4. If anyone is using
conda then they can easily upgrade to newer Python in any case.

Joseph Weston authored on 28/03/2017 12:31:31
Showing 1 changed files
... ...
@@ -92,7 +92,6 @@ create conda package:
92 92
     - yum install -y devtoolset-2-gcc-gfortran
93 93
     - git clone https://gitlab.kwant-project.org/kwant/conda-recipes.git
94 94
     - conda config --add channels kwant
95
-    - conda build --python 3.4 conda-recipes/kwant-dev
96 95
     - conda build --python 3.5 conda-recipes/kwant-dev
97 96
     - conda build --python 3.6 conda-recipes/kwant-dev
98 97
     - mv /opt/conda/conda-bld/linux-64/kwant-dev*.tar.bz2 .
Browse code

CI: remove host key checking when uploading documentation

Previously we used 'ssh-keyscan' on every upload, so derived
no security from host key checking. 'ssh-keyscan' caused the CI
server's IP to be blacklisted, so now we just ignore the host key
entirely. We never send private information, so this is fine.

Joseph Weston authored on 24/03/2017 12:19:23
Showing 1 changed files
... ...
@@ -6,6 +6,11 @@ stages:
6 6
   - package
7 7
   - deploy
8 8
 
9
+variables:
10
+  # rsync is used to send documentation to our web servers: we never send any
11
+  # secret information, and using 'ssh-keyscan' causes the CI server's IP to be blacklisted
12
+  IGNORE_HOSTKEY: "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
13
+
9 14
 
10 15
 mirror repository:
11 16
     stage: build
... ...
@@ -114,11 +119,11 @@ upload coverage:
114 119
     url: https://kwant-project.org/coverage/$CI_BUILD_REF_SLUG
115 120
     on_stop: remove_coverage
116 121
   before_script:
117
-    - mkdir -p ~/.ssh && ssh-keyscan kwant-project.org >> ~/.ssh/known_hosts
122
+    - mkdir -p ~/.ssh
118 123
     - echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
119 124
   script:
120 125
     - mv htmlcov $CI_BUILD_REF_SLUG
121
-    - rsync -rlv --delete --relative $CI_BUILD_REF_SLUG kwant@kwant-project.org:coverage/
126
+    - rsync -rlv -e "$IGNORE_HOSTKEY" --delete --relative $CI_BUILD_REF_SLUG kwant@kwant-project.org:coverage/
122 127
   after_script:
123 128
     - rm -rf ~/.ssh
124 129
 
... ...
@@ -132,11 +137,11 @@ remove_coverage:
132 137
     name: coverage/$CI_BUILD_REF_NAME
133 138
     action: stop
134 139
   before_script:
135
-    - mkdir -p ~/.ssh && ssh-keyscan kwant-project.org >> ~/.ssh/known_hosts
140
+    - mkdir -p ~/.ssh
136 141
     - echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
137 142
   script:
138 143
     - mkdir empty/
139
-    - rsync -rlv --delete empty/ kwant@kwant-project.org:coverage/$CI_BUILD_REF_SLUG
144
+    - rsync -rlv -e "$IGNORE_HOSTKEY" --delete empty/ kwant@kwant-project.org:coverage/$CI_BUILD_REF_SLUG
140 145
   after_script:
141 146
     - rm -rf ~/.ssh
142 147
 
... ...
@@ -150,10 +155,10 @@ upload documentation to the test server:
150 155
   only:
151 156
     - branches@kwant/kwant
152 157
   before_script:
153
-    - mkdir -p ~/.ssh && ssh-keyscan kwant-project.org >> ~/.ssh/known_hosts
158
+    - mkdir -p ~/.ssh
154 159
     - echo $TEST_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
155 160
   script:
156
-    - rsync -rlv --delete doc/build/html/* kwant@kwant-project.org:doc/$CI_BUILD_REF_SLUG
161
+    - rsync -rlv -e "$IGNORE_HOSTKEY" --delete doc/build/html/* kwant@kwant-project.org:doc/$CI_BUILD_REF_SLUG
157 162
   after_script:
158 163
     - rm -rf ~/.ssh
159 164
 
... ...
@@ -167,11 +172,11 @@ remove_docs:
167 172
     name: docs review/$CI_BUILD_REF_NAME
168 173
     action: stop
169 174
   before_script:
170
-    - mkdir -p ~/.ssh && ssh-keyscan kwant-project.org >> ~/.ssh/known_hosts
175
+    - mkdir -p ~/.ssh
171 176
     - echo $TEST_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
172 177
   script:
173 178
     - mkdir empty
174
-    - rsync -arv --delete empty/ kwant@kwant-project.org:doc/$CI_BUILD_REF_SLUG/
179
+    - rsync -arv -e "$IGNORE_HOSTKEY" --delete empty/ kwant@kwant-project.org:doc/$CI_BUILD_REF_SLUG/
175 180
   after_script:
176 181
     - rm -rf ~/.ssh
177 182
 
... ...
@@ -184,10 +189,10 @@ upload dev version docs:
184 189
   only:
185 190
     - master@kwant/kwant
186 191
   before_script:
187
-    - mkdir -p ~/.ssh && ssh-keyscan kwant-project.org >> ~/.ssh/known_hosts
192
+    - mkdir -p ~/.ssh
188 193
     - echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
189 194
   script:
190
-    - rsync -rlv --delete doc/build/html/* kwant@kwant-project.org:doc/dev
195
+    - rsync -rlv -e "$IGNORE_HOSTKEY" --delete doc/build/html/* kwant@kwant-project.org:doc/dev
191 196
   after_script:
192 197
     - rm -rf ~/.ssh
193 198
 
... ...
@@ -199,9 +204,9 @@ upload docs of tagged build:
199 204
   only:
200 205
      - /^v[0-9]+\.[0-9]+.[0-9]+$/@kwant/kwant
201 206
   before_script:
202
-    - mkdir -p ~/.ssh && ssh-keyscan kwant-project.org >> ~/.ssh/known_hosts
207
+    - mkdir -p ~/.ssh
203 208
     - echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
204 209
   script:
205
-    - rsync -rlv --delete doc/build/html/* kwant@kwant-project.org:doc/$(echo $CI_BUILD_TAG | sed 's/v\([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/')
210
+    - rsync -rlv -e "$IGNORE_HOSTKEY" --delete doc/build/html/* kwant@kwant-project.org:doc/$(echo $CI_BUILD_TAG | sed 's/v\([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/')
206 211
   after_script:
207 212
     - rm -rf ~/.ssh
Browse code

CI: separate conda packaging into separate jobs

We previously restricted conda package uploading to master branch on the
main Kwant repository, as otherwise this step would fail for forked
repositories without a valid anaconda key. Now we build the conda
packages and upload to anaconda in two separate jobs, and the upload job
is only run on the main Kwant repository.

Joseph Weston authored on 23/03/2017 12:12:00
Showing 1 changed files
... ...
@@ -3,6 +3,7 @@ image: kwant/testing
3 3
 stages:
4 4
   - build
5 5
   - test
6
+  - package
6 7
   - deploy
7 8
 
8 9
 
... ...
@@ -77,9 +78,10 @@ check for broken links in doc:
77 78
 
78 79
 
79 80
 create conda package:
80
-  stage: deploy
81
+  stage: package
81 82
   only:
82
-    - master@kwant/kwant
83
+    - master
84
+    - /^.*-build$/
83 85
   image: condaforge/linux-anvil
84 86
   script:
85 87
     - yum install -y devtoolset-2-gcc-gfortran
... ...
@@ -89,10 +91,18 @@ create conda package:
89 91
     - conda build --python 3.5 conda-recipes/kwant-dev
90 92
     - conda build --python 3.6 conda-recipes/kwant-dev
91 93
     - mv /opt/conda/conda-bld/linux-64/kwant-dev*.tar.bz2 .
92
-    - anaconda --token=$ANACONDA_TOKEN upload --force kwant-dev*tar.bz2
93 94
   artifacts:
94 95
     paths:
95 96
       - kwant-dev*.tar.bz2
97
+    expire_in: 1 month
98
+
99
+upload conda package:
100
+  stage: deploy
101
+  only:
102
+    - master@kwant/kwant
103
+  image: condaforge/linux-anvil
104
+  script:
105
+    - anaconda --token=$ANACONDA_TOKEN upload --force kwant-dev*tar.bz2
96 106
 
97 107
 
98 108
 upload coverage:
Browse code

only build conda packages for official kwant

Joseph Weston authored on 08/03/2017 20:28:37
Showing 1 changed files
... ...
@@ -79,7 +79,7 @@ check for broken links in doc:
79 79
 create conda package:
80 80
   stage: deploy
81 81
   only:
82
-    - master
82
+    - master@kwant/kwant
83 83
   image: condaforge/linux-anvil
84 84
   script:
85 85
     - yum install -y devtoolset-2-gcc-gfortran
Browse code

integrate discretizer into kwant

Rafał Skolasiński authored on 17/10/2016 17:25:42
Showing 1 changed files
... ...
@@ -62,6 +62,7 @@ build documentation:
62 62
 run tests:
63 63
   stage: test
64 64
   script:
65
+    - pip3 install sympy
65 66
     - py.test --cov=kwant --cov-report term --cov-report html --flakes kwant
66 67
   artifacts:
67 68
     paths:
Browse code

add automatic building for kwant-dev conda package

Bas Nijholt authored on 27/01/2017 16:48:04
Showing 1 changed files
... ...
@@ -5,6 +5,7 @@ stages:
5 5
   - test
6 6
   - deploy
7 7
 
8
+
8 9
 mirror repository:
9 10
     stage: build
10 11
     only:
... ...
@@ -24,6 +25,7 @@ mirror repository:
24 25
       - cd $(mktemp -d); git clone --bare $ORIGIN_URL .
25 26
       - for REPO in $REPOS; do git push --mirror $REPO; done
26 27
 
28
+
27 29
 build package:
28 30
   stage: build
29 31
   script:
... ...
@@ -39,12 +41,14 @@ check whitespace style:
39 41
   script: ./check_whitespace
40 42
   allow_failure: true
41 43
 
44
+
42 45
 check for dependencies installed:
43 46
   stage: test
44 47
   script:
45 48
     - if [ -d .eggs ]; then echo "$(ls -d .eggs/*/) downloaded by build, update build environment" >&2; fi
46 49
   allow_failure: true
47 50
 
51
+
48 52
 build documentation:
49 53
   stage: test
50 54
   script:
... ...
@@ -54,6 +58,7 @@ build documentation:
54 58
       - doc/build/html/
55 59
     expire_in: 1 month
56 60
 
61
+
57 62
 run tests:
58 63
   stage: test
59 64
   script:
... ...
@@ -62,6 +67,7 @@ run tests:
62 67
     paths:
63 68
       - htmlcov
64 69
 
70
+
65 71
 check for broken links in doc:
66 72
   stage: test
67 73
   script:
... ...
@@ -69,6 +75,25 @@ check for broken links in doc:
69 75
   allow_failure: true
70 76
 
71 77
 
78
+create conda package:
79
+  stage: deploy
80
+  only:
81
+    - master
82
+  image: condaforge/linux-anvil
83
+  script:
84
+    - yum install -y devtoolset-2-gcc-gfortran
85
+    - git clone https://gitlab.kwant-project.org/kwant/conda-recipes.git
86
+    - conda config --add channels kwant
87
+    - conda build --python 3.4 conda-recipes/kwant-dev
88
+    - conda build --python 3.5 conda-recipes/kwant-dev
89
+    - conda build --python 3.6 conda-recipes/kwant-dev
90
+    - mv /opt/conda/conda-bld/linux-64/kwant-dev*.tar.bz2 .
91
+    - anaconda --token=$ANACONDA_TOKEN upload --force kwant-dev*tar.bz2
92
+  artifacts:
93
+    paths:
94
+      - kwant-dev*.tar.bz2
95
+
96
+
72 97
 upload coverage:
73 98
   stage: deploy
74 99
   only:
... ...
@@ -86,6 +111,7 @@ upload coverage:
86 111
   after_script:
87 112
     - rm -rf ~/.ssh
88 113
 
114
+
89 115
 remove_coverage:
90 116
   stage: deploy
91 117
   only:
... ...
@@ -154,6 +180,7 @@ upload dev version docs:
154 180
   after_script:
155 181
     - rm -rf ~/.ssh
156 182
 
183
+
157 184
 upload docs of tagged build:
158 185
   stage: deploy
159 186
   environment:
Browse code

allow removing coverage

Anton Akhmerov authored on 05/01/2017 16:31:29
Showing 1 changed files
... ...
@@ -76,6 +76,7 @@ upload coverage:
76 76
   environment:
77 77
     name: coverage/$CI_BUILD_REF_NAME
78 78
     url: https://kwant-project.org/coverage/$CI_BUILD_REF_SLUG
79
+    on_stop: remove_coverage
79 80
   before_script:
80 81
     - mkdir -p ~/.ssh && ssh-keyscan kwant-project.org >> ~/.ssh/known_hosts
81 82
     - echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
... ...
@@ -85,6 +86,24 @@ upload coverage:
85 86
   after_script:
86 87
     - rm -rf ~/.ssh
87 88
 
89
+remove_coverage:
90
+  stage: deploy
91
+  only:
92
+    - branches@kwant/kwant
93
+  when: manual
94
+  environment:
95
+    name: coverage/$CI_BUILD_REF_NAME
96
+    action: stop
97
+  before_script:
98
+    - mkdir -p ~/.ssh && ssh-keyscan kwant-project.org >> ~/.ssh/known_hosts
99
+    - echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
100
+  script:
101
+    - mkdir empty/
102
+    - rsync -rlv --delete empty/ kwant@kwant-project.org:coverage/$CI_BUILD_REF_SLUG
103
+  after_script:
104
+    - rm -rf ~/.ssh
105
+
106
+
88 107
 upload documentation to the test server:
89 108
   stage: deploy
90 109
   environment:
... ...
@@ -105,6 +124,8 @@ upload documentation to the test server:
105 124
 remove_docs:
106 125
   stage: deploy
107 126
   when: manual
127
+  only:
128
+    - branches@kwant/kwant
108 129
   environment:
109 130
     name: docs review/$CI_BUILD_REF_NAME
110 131
     action: stop
Browse code

setup environments, ensure unique urls for branch docs

Anton Akhmerov authored on 05/01/2017 15:24:23
Showing 1 changed files
... ...
@@ -80,36 +80,69 @@ upload coverage:
80 80
     - mkdir -p ~/.ssh && ssh-keyscan kwant-project.org >> ~/.ssh/known_hosts
81 81
     - echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
82 82
   script:
83
-    - rsync -rlv --delete htmlcov/* kwant@kwant-project.org:coverage/$CI_BUILD_REF_SLUG
83
+    - mv htmlcov $CI_BUILD_REF_SLUG
84
+    - rsync -rlv --delete --relative $CI_BUILD_REF_SLUG kwant@kwant-project.org:coverage/
84 85
   after_script:
85 86
     - rm -rf ~/.ssh
86 87
 
87 88
 upload documentation to the test server:
88 89
   stage: deploy
90
+  environment:
91
+    name: docs review/$CI_BUILD_REF_NAME
92
+    url: https://test.kwant-project.org/doc/$CI_BUILD_REF_SLUG
93
+    on_stop: remove_docs
89 94
   only:
90 95
     - branches@kwant/kwant
96
+  before_script:
97
+    - mkdir -p ~/.ssh && ssh-keyscan kwant-project.org >> ~/.ssh/known_hosts
98
+    - echo $TEST_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
91 99
   script:
100
+    - rsync -rlv --delete doc/build/html/* kwant@kwant-project.org:doc/$CI_BUILD_REF_SLUG
101
+  after_script:
102
+    - rm -rf ~/.ssh
103
+
104
+
105
+remove_docs:
106
+  stage: deploy
107
+  when: manual
108
+  environment:
109
+    name: docs review/$CI_BUILD_REF_NAME
110
+    action: stop
111
+  before_script:
92 112
     - mkdir -p ~/.ssh && ssh-keyscan kwant-project.org >> ~/.ssh/known_hosts
93 113
     - echo $TEST_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
94
-    - rsync -rlv --delete doc/build/html/* kwant@kwant-project.org:doc/dev
114
+  script:
115
+    - mkdir empty
116
+    - rsync -arv --delete empty/ kwant@kwant-project.org:doc/$CI_BUILD_REF_SLUG/
117
+  after_script:
95 118
     - rm -rf ~/.ssh
96 119
 
120
+
97 121
 upload dev version docs:
98 122
   stage: deploy
123
+  environment:
124
+    name: production
125
+    url: https://kwant-project.org/doc/dev
99 126
   only:
100 127
     - master@kwant/kwant
101
-  script:
128
+  before_script:
102 129
     - mkdir -p ~/.ssh && ssh-keyscan kwant-project.org >> ~/.ssh/known_hosts
103 130
     - echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
131
+  script:
104 132
     - rsync -rlv --delete doc/build/html/* kwant@kwant-project.org:doc/dev
133
+  after_script:
105 134
     - rm -rf ~/.ssh
106 135
 
107 136
 upload docs of tagged build:
108 137
   stage: deploy
138
+  environment:
139
+    name: production
109 140
   only:
110 141
      - /^v[0-9]+\.[0-9]+.[0-9]+$/@kwant/kwant
111
-  script:
142
+  before_script:
112 143
     - mkdir -p ~/.ssh && ssh-keyscan kwant-project.org >> ~/.ssh/known_hosts
113 144
     - echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
145
+  script:
114 146
     - rsync -rlv --delete doc/build/html/* kwant@kwant-project.org:doc/$(echo $CI_BUILD_TAG | sed 's/v\([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/')
147
+  after_script:
115 148
     - rm -rf ~/.ssh
Browse code

setup generating and uploading coverage reports

Anton Akhmerov authored on 05/01/2017 15:23:35
Showing 1 changed files
... ...
@@ -57,7 +57,10 @@ build documentation:
57 57
 run tests:
58 58
   stage: test
59 59
   script:
60
-    - py.test --cov=kwant --flakes kwant
60
+    - py.test --cov=kwant --cov-report term --cov-report html --flakes kwant
61
+  artifacts:
62
+    paths:
63
+      - htmlcov
61 64
 
62 65
 check for broken links in doc:
63 66
   stage: test
... ...
@@ -65,6 +68,22 @@ check for broken links in doc:
65 68
     - make -C doc linkcheck
66 69
   allow_failure: true
67 70
 
71
+
72
+upload coverage:
73
+  stage: deploy
74
+  only:
75
+    - branches@kwant/kwant
76
+  environment:
77
+    name: coverage/$CI_BUILD_REF_NAME
78
+    url: https://kwant-project.org/coverage/$CI_BUILD_REF_SLUG
79
+  before_script:
80
+    - mkdir -p ~/.ssh && ssh-keyscan kwant-project.org >> ~/.ssh/known_hosts
81
+    - echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
82
+  script:
83
+    - rsync -rlv --delete htmlcov/* kwant@kwant-project.org:coverage/$CI_BUILD_REF_SLUG
84
+  after_script:
85
+    - rm -rf ~/.ssh
86
+
68 87
 upload documentation to the test server:
69 88
   stage: deploy
70 89
   only:
Browse code

CI: move whitespace check to external script

Without this measure, a failed check is no longer detected. This seems
to be a bug in gitlab CI.

Christoph Groth authored on 04/01/2017 14:45:01
Showing 1 changed files
... ...
@@ -36,8 +36,7 @@ build package:
36 36
 
37 37
 check whitespace style:
38 38
   stage: build
39
-  script:
40
-    - "! for f in `git ls-files | grep -v \\.diff$`; do file $f | grep -q ' text' || continue; grep -q '[[:blank:]]$' $f && echo $f: trailing whitespace; tail -n1 $f | read -r _ || echo $f: no newline at end of file; tail -n1 $f | grep -q '^$' && echo $f: empty line at end of file; done | grep . >&2"
39
+  script: ./check_whitespace
41 40
   allow_failure: true
42 41
 
43 42
 check for dependencies installed:
Browse code

allow CI failure on mirroring

Anton Akhmerov authored on 31/12/2016 14:23:38
Showing 1 changed files
... ...
@@ -9,6 +9,7 @@ mirror repository:
9 9
     stage: build
10 10
     only:
11 11
         - branches@kwant/kwant
12
+    allow_failure: true
12 13
     variables:
13 14
       REPOS: "git@github.com:kwant-project/kwant.git git@gitlab.com:kwant/kwant.git"
14 15
     before_script:
Browse code

CI: check for other whitespace blunders as well

Christoph Groth authored on 03/12/2016 00:00:29
Showing 1 changed files
... ...
@@ -33,10 +33,10 @@ build package:
33 33
     untracked: true
34 34
     expire_in: 1 hour
35 35
 
36
-check for whitespace:
36
+check whitespace style:
37 37
   stage: build
38 38
   script:
39
-    - "! for f in `git ls-files | grep -v \\.diff$`; do file $f | grep -q ' text' && grep -l '[[:blank:]]$' $f; done | grep . >&2"
39
+    - "! for f in `git ls-files | grep -v \\.diff$`; do file $f | grep -q ' text' || continue; grep -q '[[:blank:]]$' $f && echo $f: trailing whitespace; tail -n1 $f | read -r _ || echo $f: no newline at end of file; tail -n1 $f | grep -q '^$' && echo $f: empty line at end of file; done | grep . >&2"
40 40
   allow_failure: true
41 41
 
42 42
 check for dependencies installed:
Browse code

CI: add mirroring between kwant gitlab, gitlab.com and github.com

Joseph Weston authored on 03/11/2016 23:39:34
Showing 1 changed files
... ...
@@ -5,6 +5,24 @@ stages:
5 5
   - test
6 6
   - deploy
7 7
 
8
+mirror repository:
9
+    stage: build
10
+    only:
11
+        - branches@kwant/kwant
12
+    variables:
13
+      REPOS: "git@github.com:kwant-project/kwant.git git@gitlab.com:kwant/kwant.git"
14
+    before_script:
15
+      - HOSTS=$(for REPO in $REPOS; do echo ${REPO%:*} | cut -d'@' -f2; done)
16
+      - mkdir ~/.ssh && chmod 700 ~/.ssh
17
+      - for HOST in $HOSTS; do ssh-keyscan $HOST >> ~/.ssh/known_hosts; done
18
+      - echo "$DEPLOY_KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
19
+    after_script:
20
+      - rm -rf ~/.ssh
21
+    script:
22
+      - ORIGIN_URL=$(git config --get remote.origin.url)
23
+      - cd $(mktemp -d); git clone --bare $ORIGIN_URL .
24
+      - for REPO in $REPOS; do git push --mirror $REPO; done
25
+
8 26
 build package:
9 27
   stage: build
10 28
   script:
Browse code

setup.py: remove obsolete --cython-trace option

The CYTHON_TRACE macro can be now set in the build.conf file.

Christoph Groth authored on 21/09/2016 11:09:27
Showing 1 changed files
... ...
@@ -8,8 +8,9 @@ stages:
8 8
 build package:
9 9
   stage: build
10 10
   script:
11
-    - ./setup.py build --cython-trace
12
-    - ./setup.py build_ext --cython-trace -i
11
+    - echo -e "[DEFAULT]\ndefine_macros = CYTHON_TRACE=1" >build.conf
12
+    - ./setup.py build
13
+    - ./setup.py build_ext -i
13 14
   artifacts:
14 15
     untracked: true
15 16
     expire_in: 1 hour
Browse code

remove cruft from previous commit

Anton Akhmerov authored on 30/08/2016 22:07:28
Showing 1 changed files
... ...
@@ -73,5 +73,5 @@ upload docs of tagged build:
73 73
   script:
74 74
     - mkdir -p ~/.ssh && ssh-keyscan kwant-project.org >> ~/.ssh/known_hosts
75 75
     - echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
76
-    - rsync -rlv --delete doc/build/html/* kwant@kwant-project.org:doc/test$(echo $CI_BUILD_TAG | sed 's/v\([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/')
76
+    - rsync -rlv --delete doc/build/html/* kwant@kwant-project.org:doc/$(echo $CI_BUILD_TAG | sed 's/v\([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/')
77 77
     - rm -rf ~/.ssh
Browse code

prepare a more detailed test suit, fix minor typos

Summary of changes:
* Add a test for trailing whitespace, remove all trailling whitespace
* Add a test for broken URLs in docs, fix all broken URLs and permanent redirects
* Switch sphinx doc build to strict (warnings to errors) and nitpicky (broken links to warnings). Fix all sphinx warnings.
* Deploy docs from any commit to [kwant/kwant](https://gitlab.kwant-project.org/kwant/kwant) to https://test.kwant-project.org/doc/dev
* Deploy docs from any commit to master at kwant/kwant to https://kwant-project.org/doc/dev
* Deploy docs from any tag release tag (so anything that is vX.Y.Z) at kwant/kwant to https://kwant-project.org/doc/X.Y

Anton Akhmerov authored on 05/08/2016 22:57:01
Showing 1 changed files
... ...
@@ -1,6 +1,77 @@
1
-job:
1
+image: kwant/testing
2
+
3
+stages:
4
+  - build
5
+  - test
6
+  - deploy
7
+
8
+build package:
9
+  stage: build
10
+  script:
11
+    - ./setup.py build --cython-trace
12
+    - ./setup.py build_ext --cython-trace -i
13
+  artifacts:
14
+    untracked: true
15
+    expire_in: 1 hour
16
+
17
+check for whitespace:
18
+  stage: build
19
+  script:
20
+    - "! for f in `git ls-files | grep -v \\.diff$`; do file $f | grep -q ' text' && grep -l '[[:blank:]]$' $f; done | grep . >&2"
21
+  allow_failure: true
22
+
23
+check for dependencies installed:
24
+  stage: test
25
+  script:
26
+    - if [ -d .eggs ]; then echo "$(ls -d .eggs/*/) downloaded by build, update build environment" >&2; fi
27
+  allow_failure: true
28
+
29
+build documentation:
30
+  stage: test
31
+  script:
32
+    - make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W'
33
+  artifacts:
34
+    paths:
35
+      - doc/build/html/
36
+    expire_in: 1 month
37
+
38
+run tests:
39
+  stage: test
2 40
   script:
3
-    - python3 setup.py build --cython-trace
4
-    - python3 setup.py build_ext --cython-trace -i
5
-    - make -C doc clean && make -C doc html
6 41
     - py.test --cov=kwant --flakes kwant
42
+
43
+check for broken links in doc:
44
+  stage: test
45
+  script:
46
+    - make -C doc linkcheck
47
+  allow_failure: true
48
+
49
+upload documentation to the test server:
50
+  stage: deploy
51
+  only:
52
+    - branches@kwant/kwant
53
+  script:
54
+    - mkdir -p ~/.ssh && ssh-keyscan kwant-project.org >> ~/.ssh/known_hosts
55
+    - echo $TEST_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
56
+    - rsync -rlv --delete doc/build/html/* kwant@kwant-project.org:doc/dev
57
+    - rm -rf ~/.ssh
58
+
59
+upload dev version docs:
60
+  stage: deploy
61
+  only:
62
+    - master@kwant/kwant
63
+  script:
64
+    - mkdir -p ~/.ssh && ssh-keyscan kwant-project.org >> ~/.ssh/known_hosts
65
+    - echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
66
+    - rsync -rlv --delete doc/build/html/* kwant@kwant-project.org:doc/dev
67
+    - rm -rf ~/.ssh
68
+
69
+upload docs of tagged build:
70
+  stage: deploy
71
+  only:
72
+     - /^v[0-9]+\.[0-9]+.[0-9]+$/@kwant/kwant
73
+  script:
74
+    - mkdir -p ~/.ssh && ssh-keyscan kwant-project.org >> ~/.ssh/known_hosts
75
+    - echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
76
+    - rsync -rlv --delete doc/build/html/* kwant@kwant-project.org:doc/test$(echo $CI_BUILD_TAG | sed 's/v\([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/')
77
+    - rm -rf ~/.ssh
Browse code

enable coverage reports for cython modules

Joseph Weston authored on 25/07/2016 17:20:14
Showing 1 changed files
... ...
@@ -1,6 +1,6 @@
1 1
 job:
2 2
   script:
3
-    - python3 setup.py build
4
-    - python3 setup.py build_ext -i
3
+    - python3 setup.py build --cython-trace
4
+    - python3 setup.py build_ext --cython-trace -i
5 5
     - make -C doc clean && make -C doc html
6 6
     - py.test --cov=kwant --flakes kwant
Browse code

use flakes in ci, fix flakes warnings

Anton Akhmerov authored on 10/06/2016 03:18:14
Showing 1 changed files
... ...
@@ -3,4 +3,4 @@ job:
3 3
     - python3 setup.py build
4 4
     - python3 setup.py build_ext -i
5 5
     - make -C doc clean && make -C doc html
6
-    - py.test --cov=kwant kwant
7 6
\ No newline at end of file
7
+    - py.test --cov=kwant --flakes kwant
Browse code

use py.test; ci unchecked yet

Anton Akhmerov authored on 09/03/2016 01:26:17
Showing 1 changed files
... ...
@@ -3,4 +3,4 @@ job:
3 3
     - python3 setup.py build
4 4
     - python3 setup.py build_ext -i
5 5
     - make -C doc clean && make -C doc html
6
-    - nosetests3 --with-coverage --cover-package kwant
6
+    - py.test --cov=kwant kwant
7 7
\ No newline at end of file
Browse code

ensure we run doc build in clean environment

Joseph Weston authored on 24/04/2016 03:14:40
Showing 1 changed files
... ...
@@ -2,5 +2,5 @@ job:
2 2
   script:
3 3
     - python3 setup.py build
4 4
     - python3 setup.py build_ext -i
5
-    - make -C doc html
5
+    - make -C doc clean && make -C doc html
6 6
     - nosetests3 --with-coverage --cover-package kwant
Browse code

add a simple ci config

Anton Akhmerov authored on 23/10/2015 16:15:06 • Christoph Groth committed on 11/11/2015 16:06:13
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,6 @@
1
+job:
2
+  script:
3
+    - python3 setup.py build
4
+    - python3 setup.py build_ext -i
5
+    - make -C doc html
6
+    - nosetests3 --with-coverage --cover-package kwant