-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
60 lines (57 loc) · 2.05 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
build_linux:
stage: build
image: electronuserland/builder:latest
timeout: 30m
script:
- |
echo GIT_BRANCH="$CI_COMMIT_REF_NAME" > electron-builder.env
sha=$CI_COMMIT_SHORT_SHA commithash="${sha:0:5}"
sed -i -re "s#[\"]version[\"]: [\"](.*)[\"]#\"version\": \"\1-$commithash\"#" package.json
npm install --no-audit
npm run build-native-linux
artifacts:
name: "SCALARISDX-$CI_COMMIT_REF_NAME-linux"
paths:
- dist-native/*.tar.gz
- dist-native/*.AppImage
- dist-native/*.deb
build_win:
stage: build
image: electronuserland/builder:wine
script:
- |
echo GIT_BRANCH="$CI_COMMIT_REF_NAME" > electron-builder.env
sha=$CI_COMMIT_SHORT_SHA commithash="${sha:0:5}"
sed -i -re "s#[\"]version[\"]: [\"](.*)[\"]#\"version\": \"\1-$commithash\"#" package.json
npm install --no-audit
npm run build-native-win
artifacts:
name: "SCALARISDX-$CI_COMMIT_REF_NAME-win"
paths:
- dist-native/*.exe
- dist-native/*.zip
build_mac:
stage: build
image: blocknetdx/devbuilds:blockdx-gitlab-mac
script:
- |
echo GIT_BRANCH="$CI_COMMIT_REF_NAME" > electron-builder.env
sha=$CI_COMMIT_SHORT_SHA commithash="${sha:0:5}"
sed -i -re "s#[\"]version[\"]: [\"](.*)[\"]#\"version\": \"\1-$commithash\"#" package.json
npm install --no-audit
npm run build-native-mac
artifacts:
name: "SCALARISDX-$CI_COMMIT_REF_NAME-mac"
paths:
- dist-native/mac/SCALARIS DX.app
test_artifacts:
stage: test
image: ubuntu:bionic
script:
- "set -- dist-native/SCALARIS-DX-*-linux-x64.tar.gz && [[ -f \"$1\" ]]"
- "set -- dist-native/SCALARIS-DX-*-linux-x86_64.AppImage && [[ -f \"$1\" ]]"
- "set -- dist-native/SCALARIS-DX-*-linux-armv7l.AppImage && [[ -f \"$1\" ]]"
- "set -- dist-native/SCALARIS-DX-*-linux-amd64.deb && [[ -f \"$1\" ]]"
- "set -- dist-native/SCALARIS-DX-*-win.exe && [[ -f \"$1\" ]]"
- "set -- dist-native/SCALARIS-DX-*-win-x64.zip && [[ -f \"$1\" ]]"
- "set -- dist-native/mac/SCALARIS*DX.app && [[ -d \"$1\" ]]"