-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
63 lines (58 loc) · 1.26 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
image: nimlang/nim:latest
.build:compiler: &nimbuild
cache:
key: nim-${NIMBRANCH}
paths:
- nim-${NIMBRANCH}
before_script:
- |
if [ ! -x nim-${NIMBRANCH}/bin/nim ]; then
git clone -b ${NIMBRANCH} --depth 5 git://github.com/nim-lang/nim nim-${NIMBRANCH}/
cd nim-${NIMBRANCH}
git clone --depth 5 git://github.com/nim-lang/csources csources/
cd csources
sh build.sh
cd ..
rm -rf csources
bin/nim c koch
./koch boot -d:release
./koch nimble
else
cd nim-${NIMBRANCH}
git fetch origin
if ! git merge FETCH_HEAD | grep "Already up-to-date"; then
bin/nim c koch
./koch boot -d:release
./koch nimble
fi
fi
cd ..
export PATH="nim-${NIMBRANCH}/bin${PATH:+:$PATH}"
.test: &testscript
stage: test
except:
- gh-pages
script:
- nimble -v
- nim -v
- nimble tests
test:devel:
variables:
NIMBRANCH: devel
allow_failure: true
<<: *nimbuild
<<: *testscript
test:master:
<<: *testscript
pages:
stage: deploy
script:
- nimble docs
- find htmldocs -type f -exec sed -i 's/nesm\.html/index\.html/g' {} \;
- mv htmldocs/nesm.html htmldocs/index.html
- mv htmldocs public
artifacts:
paths:
- public
only:
- master