forked from sisl/tufte_algorithms_book
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
54 lines (47 loc) · 1.11 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
stages:
- test
- deploy
variables:
# override DEPOT_PATH to install packages in the project
# folder, because gitlab can only cache files whthin it
JULIA_DEPOT_PATH: "$CI_PROJECT_DIR/.julia"
cache:
paths:
- $JULIA_DEPOT_PATH
# To initialize submodules you need to set variables
# GIT_SUBMODULE_STRATEGY=recursive
# in gitlab CI/CD page
before_script:
- cd style &&
python3 setup.py install &&
cd ..
- cd lexer &&
python3 setup.py install &&
cd ..
# install julia dependency
- julia -e 'using Pkg; Pkg.add("jlpkg")' &&
julia -e 'import jlpkg; jlpkg.install(destdir="/usr/local/bin")' &&
jlpkg --project=@. add $(cat REQUIRE | grep -v julia)
.test_template: &test_definition
script:
- make test
Julia 1.0:
image: johnnychen94/juliabook:1.0
stage: test
<<: *test_definition
Julia 1.1:
image: johnnychen94/juliabook:1.1
stage: test
<<: *test_definition
Julia 1.2:
image: johnnychen94/juliabook:1.2
stage: test
<<: *test_definition
Deploy:
image: johnnychen94/juliabook:stable
stage: deploy
script:
- make compile
artifacts:
paths:
- "book.pdf"