This repository has been archived by the owner on Jun 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
77 lines (71 loc) · 2.09 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
stages:
- build
- test
before_script:
- apt-get update && apt-get -y install luajit luarocks
- luarocks install luafilesystem
.job_template: &test_definition
before_script:
- apt-get update && apt-get -y install luajit luarocks cmake
- luarocks install luabitop
- luarocks install luafilesystem
- luarocks install penlight
- luarocks install luv |& egrep -v '^tar'
- luarocks install luaposix
- git clone https://github.com/CoderPuppy/cc-emu emu --branch for-ci
- git clone https://github.com/CoderPuppy/ComputercraftLua emu/cc --branch ci
build:
stage: build
script:
- echo "Running development build. Not building minified"
- luajit ./bin/construct.lua --source src --output titanium.lua
environment: production
artifacts:
name: "devel_${CI_BUILD_NAME}_${CI_BUILD_REF_NAME}"
paths:
- titanium.lua
except:
- tags
build-release:
stage: build
script:
- apt-get -y install ruby curl
- echo "Running release build. Building minified"
- luajit ./bin/construct.lua --source src --output titanium.lua
- luajit ./bin/construct.lua --source src --output titanium.min.lua --minify
- echo "Searching for documentation"
- ruby bin/commentParse.rb
- echo "Publishing documentation"
- echo -n data= > body
- base64 rubyout >> body
- echo -n "&key=$DEPLOY_DOCUMENTATION_KEY&tag=$CI_BUILD_TAG" >> body
- curl --data "@body" http://harryfelton.web44.net/titanium/deliverDocs.php
environment: release
artifacts:
name: "release_${CI_BUILD_REF_NAME}"
paths:
- titanium.lua
- titanium.min.lua
only:
- tags
test:
<<: *test_definition
stage: test
script:
- echo "Testing development build"
- luajit emu/cli.lua . bin/ci/run_test.lua titanium.lua tml
except:
- tags
dependencies:
- build
test-release:
<<: *test_definition
stage: test
script:
- echo "Testing release builds"
- luajit emu/cli.lua . bin/ci/run_test.lua titanium.lua tml
- luajit emu/cli.lua . bin/ci/run_test.lua titanium.min.lua tml
only:
- tags
dependencies:
- build-release