-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.gitlab-ci.yml
93 lines (82 loc) · 3.4 KB
/
.gitlab-ci.yml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Some useful links:
# https://github.com/JuliaCI/Coverage.jl/issues/226
# https://gitlab.com/tkpapp/GitlabJuliaDemo.jl
# Below is the template to run your tests in Julia
.test_template: &test_definition
# Uncomment below if you would like to run the tests on specific references
# only, such as the branches `master`, `development`, etc.
# only:
# - master
# - development
tags:
- julia
# Note: OpenMPI doesn't support running as root, unless --allow-run-as-root is
# passed to mpirun. With MPICH there's no such problem.
before_script:
- apt-get -qq update
- apt-get install -y --no-install-recommends mpich libmpich-dev
script:
- mpichversion
- julia -e 'using InteractiveUtils;
versioninfo()'
# Force precompilation of packages in serial mode.
# Otherwise, if precompilation runs in parallel, there may be race
# conditions...
- julia --project=@. -e 'import Pkg;
Pkg.instantiate();
using PencilFFTs'
# Note: code coverage (at least using Coverage.jl) apparently doesn't work
# with parallel code.
- julia --project=@. --color=yes -e 'import Pkg; Pkg.test(; coverage=false)'
# Name a test and select an appropriate image.
# images comes from Docker hub
# Note: test will only work starting from Julia 1.2, because of the way how test
# dependencies are specified (using a separate test/Project.toml file).
# See https://julialang.github.io/Pkg.jl/v1/creating-packages/#Test-specific-dependencies-in-Julia-1.2-and-above-1
# Right now latest = 1.3
# test:latest:
# image: julia:latest
# <<: *test_definition
test:1.3:
image: julia:1.3
<<: *test_definition
# Maybe you would like to test your package against the development branch:
# test:1.1-dev (not sure there is such an image in docker, so not tested yet):
# image: julia:v1.1-dev
# # ... allowing for failures, since we are testing against the development
# # branch:
# allow_failure: true
# <<: *test_definition
# REMARK: Do not forget to enable the coverage feature for your project, if you
# are using code coverage reporting above. This can be done by
#
# - Navigating to the `CI/CD Pipelines` settings of your project,
# - Copying and pasting the default `Simplecov` regex example provided, i.e.,
# `\(\d+.\d+\%\) covered` in the `test coverage parsing` textfield.
# Example documentation deployment
# pages:
# image: julia:latest
# stage: deploy
# script:
# - apt-get update -qq && apt-get install -y git # needed by Documenter
# - apt-get install -y --no-install-recommends mpich libmpich-dev # needed to import PencilFFTs
# - julia -e 'using Pkg;
# Pkg.add(PackageSpec(url=pwd()));
# Pkg.build("PencilFFTs");'
# - julia -e 'using Pkg; import PencilFFTs; Pkg.add("Documenter")' # install Documenter
# - julia --color=yes docs/make.jl # make documentation
# - mv docs/build public # move to the directory picked up by Gitlab pages
# artifacts:
# paths:
# - public
# only:
# - master
# WARNING: This template is using the `julia` images from [Docker
# Hub][3]. One can use custom Julia images and/or the official ones found
# in the same place. However, care must be taken to correctly locate the binary
# file (`/opt/julia/bin/julia` above), which is usually given on the image's
# description page.
#
# [3]: https://hub.docker.com/_/julia/
#
# vim: shiftwidth=2