-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.gitlab-ci.yml
47 lines (41 loc) · 1.89 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
variables:
CI_IMAGE_TAG: 'cuda'
stages:
- test
- postprocess
include:
- 'https://raw.githubusercontent.com/JuliaGPU/gitlab-ci/master/templates/v0/common.yml'
- 'https://raw.githubusercontent.com/JuliaGPU/gitlab-ci/master/templates/v0/test_v0.7.yml'
- 'https://raw.githubusercontent.com/JuliaGPU/gitlab-ci/master/templates/v0/test_v1.0.yml'
- 'https://raw.githubusercontent.com/JuliaGPU/gitlab-ci/master/templates/v0/test_dev.yml'
# - 'https://raw.githubusercontent.com/JuliaGPU/gitlab-ci/master/templates/v0/postprocess_documentation.yml'
# - 'https://raw.githubusercontent.com/JuliaGPU/gitlab-ci/master/templates/v0/postprocess_coverage.yml'
test:v0.7:
allow_failure: true
test:dev:
allow_failure: true
# === Borrowing from CUDAnative.jl ===
# Documenter.jl's `deploydocs` really is only made to work with Travis,
# so we need to fake quite a bit of environment in order for it to work.
# TODO: create an unconditional `deploydocs`, and pick when to deploy in here.
documentation:
stage: postprocess
image: juliagpu/julia:v1.0-cuda
variables:
DOCUMENTER_DEBUG: "true"
TRAVIS_REPO_SLUG: "una-dinosauria/Rayuela.jl"
TRAVIS_BRANCH: $CI_COMMIT_REF_NAME
TRAVIS_TAG: $CI_COMMIT_TAG
dependencies:
- test:v1.0
script:
# gitlab-ce#15280
- apt update && apt install -y jq
- export PR_ID=$(curl -s "http://gitlab.ca/api/v4/projects/${CI_PROJECT_ID}/merge_requests?private_token=${OAUTH_TOKEN}&state=opened" | jq -r ".[]|select(.sha == \"$CI_COMMIT_SHA\")|.iid")
- export TRAVIS_PULL_REQUEST=$(if [ "$PR_ID" == "" ]; then echo "false"; else echo "true"; fi)
- apt install -y openssh-client && mkdir /root/.ssh
- julia --project -e 'using Pkg;
ps=PackageSpec(name="Documenter", version="0.19"); Pkg.add(ps); Pkg.pin(ps)'
- julia --project -e 'using Pkg;
Pkg.build("Rayuela")'
- julia --project docs/make.jl