summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: f83d784305e4eefda4e33861975edd8d4d736446 (plain)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
stages:
  - build

variables:
  GOPATH: /go
  APP_PATH: /go/src/0xacab.org/leap/bitmask-vpn

build_test:
  image: 0xacab.org:4567/leap/docker/bitmask-systray:latest
  stage: build
  script:
    - mkdir -p /go/src/0xacab.org/leap/
    - ln -s "$(pwd)" ${APP_PATH}
    - cd ${APP_PATH}
    - make get
    - make test
    - make build_bitmaskd
    - make build
  tags:
    - linux
  artifacts:
    paths:
      - 'bitmask-vpn'
      - 'bitmask-helper'
      - 'bitmask-connect'
    expire_in: 1 month

win_installer:
 image: 0xacab.org:4567/leap/docker/bitmask-systray:latest
 stage: build
 script:
   - mkdir -p /go/src/0xacab.org/leap/
   - ln -s "$(pwd)" ${APP_PATH}
   - cd ${APP_PATH}

   # we need to manually patch w32 until they merge #81
   - mkdir -p /go/src/github.com/AllenDang/
   - cd /go/src/github.com/AllenDang/
   - git clone https://github.com/AllenDang/w32
   - cd w32
   - curl https://downloads.leap.se/thirdparty/w32.patch | patch -p1 -N

   - cd ${APP_PATH}

   - git clone https://0xacab.org/leap/riseup_vpn
   - cd riseup_vpn
   - make openvpn_cross_win
   - make build_cross_win
   - mv dist/RiseupVPN-*.exe ..
 tags:
   - linux
 artifacts:
   name: installer_win_$CI_COMMIT_REF_NAME
   paths:
     - RiseupVPN-*.exe
   expire_in: 1 month

snap:
 image: 0xacab.org:4567/leap/docker/bitmask-systray:latest
 stage: build
 script:
   - mkdir -p /go/src/0xacab.org/leap/
   - ln -s "$(pwd)" ${APP_PATH}

   - git clone https://0xacab.org/leap/riseup_vpn /riseup_vpn
   - cd /riseup_vpn
   - sed -i 's/https:\/\/0xacab.org\/leap\/bitmask-vpn.*$/\/go\/src\/0xacab.org\/leap\/bitmask-vpn/' snap/snapcraft.yaml
   - sed -i 's/git clone.*$//' snap/version.sh
   - sed -i 's/git -C bitmask-vpn/git -C \/go\/src\/0xacab.org\/leap\/bitmask-vpn/' snap/version.sh
   - snapcraft snap
   - mv riseup-vpn*.snap ${APP_PATH}
 tags:
   - linux
 artifacts:
   name: snap_$CI_COMMIT_REF_NAME
   paths:
     - riseup-vpn*.snap
   expire_in: 1 month

deb:
  image: 0xacab.org:4567/leap/docker/bitmask-systray:latest
  stage: build
  allow_failure: true
  script:
    - mkdir -p /go/src/0xacab.org/leap/
    - ln -s "$(pwd)" ${APP_PATH}
    - git clone https://0xacab.org/leap/riseup_vpn
    - cd riseup_vpn
    - make build_deb
  tags:
    - linux
  artifacts:
    name: debian_$CI_COMMIT_REF_NAME
    paths:
      - riseup_vpn/dist/*.deb
    expire_in: 1 month

osx_installer:
  stage: build
  allow_failure: true
  variables:
      GOPATH: /tmp/go/
      APP_PATH: /tmp/go/src/0xacab.org/leap/bitmask-vpn
  script:
    - git clone https://0xacab.org/leap/riseup_vpn
    - cd riseup_vpn
    - make openvpn_osx
    - make build_osx
  tags:
    - yosemite
    - osx
  artifacts:
    name: installer_osx_$CI_COMMIT_REF_NAME
    paths:
      - riseup_vpn/dist/RiseupVPN-*.pkg
    expire_in: 1 month