-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitlab-ci.yml
61 lines (50 loc) · 2.28 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
stages:
- test
- deploy
cache:
paths:
- ./cache/
before_script:
- apt-get update -yqq
- apt-get install -yqq curl gnupg p7zip-full
- git submodule init
- git submodule update
- cp -f './dlang-deploy/get_ldc2.sh' './get_ldc2.sh'
- if [ ! -d './ldc2-conf' ]; then mkdir './ldc2-conf';fi
- cp -f './dlang-deploy/ldc2-conf/linux-x64.conf' './ldc2-conf/linux-x64.conf'
- sh './get_ldc2.sh'
test:
stage: test
only:
- master
script:
- ./ldc2/bin/dub build --arch=i686-windows-msvc --compiler='./ldc2/bin/ldc2' --config=library
- ./ldc2/bin/dub build --arch=x86_64-windows-msvc --compiler='./ldc2/bin/ldc2' --config=library
- ./ldc2/bin/dub build --arch=x86_64-linux-gnu --compiler='./ldc2/bin/ldc2' --config=library
- ./ldc2/bin/dub build --arch=i686-windows-msvc --compiler='./ldc2/bin/ldc2' --config=test
- ./ldc2/bin/dub build --arch=x86_64-windows-msvc --compiler='./ldc2/bin/ldc2' --config=test
- ./ldc2/bin/dub build --arch=x86_64-linux-gnu --compiler='./ldc2/bin/ldc2' --config=test
build_binary:
stage: deploy
only:
- master
when: manual
script:
- if [ ! -d './public' ]; then mkdir './public';fi
- ./ldc2/bin/dub build --arch=i686-windows-msvc --compiler='./ldc2/bin/ldc2' --config=test --build=release
- mv './libguess-d.exe' './public/libguess-test-x86.exe'
- ./ldc2/bin/dub build --arch=x86_64-windows-msvc --compiler='./ldc2/bin/ldc2' --config=test --build=release
- mv './libguess-d.exe' './public/libguess-test-x64.exe'
- ./ldc2/bin/dub build --arch=x86_64-linux-gnu --compiler='./ldc2/bin/ldc2' --config=test --build=release
- mv './libguess-d' './public/libguess-test-linux_x86_64'
- cd './public/'
- sha256sum -b 'libguess-test-x86.exe' | tee -a 'SHA256SUMS'
- sha512sum -b 'libguess-test-x86.exe' | tee -a 'SHA512SUMS'
- sha256sum -b 'libguess-test-x64.exe' | tee -a 'SHA256SUMS'
- sha512sum -b 'libguess-test-x64.exe' | tee -a 'SHA512SUMS'
- sha256sum -b 'libguess-test-linux_x86_64' | tee -a 'SHA256SUMS'
- sha512sum -b 'libguess-test-linux_x86_64' | tee -a 'SHA512SUMS'
- ls -als './'
artifacts:
paths:
- public