-
Notifications
You must be signed in to change notification settings - Fork 12
/
.gitlab-ci.yml
137 lines (130 loc) · 3.8 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
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
---
stages:
- lint
- build
- package
build_test:
image: registry.0xacab.org/jkito/bitmask-vpn:latest
stage: build
script:
- make test
- patch -p1 < docker/*.patch
# TODO missing xcb package in the docker image. investigate what to install to run minimal tests.
# - make test_ui
- PROVIDER=bitmask && make vendor && make build
tags:
- linux
artifacts:
paths:
- 'build/qt/release'
expire_in: 1 week
lint:
image: golangci/golangci-lint:v1.59-alpine
stage: build
script:
- golangci-lint run --timeout=5m
tags:
- linux
build_macos:
stage: build
script:
- export PROVIDER=riseup
- make vendor
- make -j4 build
- make installer
tags:
- macos
artifacts:
paths:
- 'build/installer/*.app'
expire_in: 1 week
build_Arch_Linux_package:
image: archlinux
stage: package
before_script:
- "pacman -Suy base-devel --noconfirm"
- "useradd non_root"
- "echo 'non_root ALL=NOPASSWD: ALL' >> /etc/sudoers"
- "mkdir /home/non_root"
- "cp -r Makefile ArchLinux/ /home/non_root"
- "chown -R non_root:non_root /home/non_root"
script:
# makepkg does not run as root, but it needs sudo to install dependencies
- "cd /home/non_root && sudo -u non_root make package_arch"
- "cd /home/non_root && pacman -U ArchLinux/*tar.zst --noconfirm"
# artifacts must be relative to the working directory (e.g. /builds/leap/bitmask-vpn)
- "cp /home/non_root/ArchLinux/*.tar.zst $CI_PROJECT_DIR"
artifacts:
paths:
- '*.tar.zst'
expire_in: 1 week
tags:
- linux
build_debian12_package:
stage: package
# we use backports because we need go1.22
image: debian:bookworm-backports
before_script:
- "apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -q -y make sudo"
- "make depends"
- "DEBIAN_FRONTEND=noninteractive apt-get install -y -q golang-1.22"
- "update-alternatives --install /usr/bin/go go /usr/lib/go-1.22/bin/go 0"
- 'ln -s $(qmake6 -query "QT_INSTALL_BINS")/lrelease /usr/local/bin/lrelease'
script:
- "PROVIDER=bitmask make vendor"
- "PROVIDER=bitmask QMAKE=qmake6 make package_deb"
- "make clean"
- "PROVIDER=riseup make vendor"
- "PROVIDER=riseup QMAKE=qmake6 make package_deb"
after_script:
- "mv deploy/*.deb build/riseup/build"
artifacts:
paths:
- "build/riseup/build/"
expire_in: 1 week
tags:
- linux
build_ubuntu22_package:
stage: package
image: ubuntu:22.04
before_script:
- "apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -q -y software-properties-common make sudo"
- "add-apt-repository ppa:longsleep/golang-backports -y"
- "DEBIAN_FRONTEND=noninteractive apt-get install -y -q golang-go"
- "make depends"
- 'ln -s $(qmake6 -query "QT_INSTALL_BINS")/lrelease /usr/local/bin/lrelease'
script:
- "PROVIDER=bitmask make vendor"
- "PROVIDER=bitmask QMAKE=qmake6 make package_deb"
- "make clean"
- "PROVIDER=riseup make vendor"
- "PROVIDER=riseup QMAKE=qmake6 make package_deb"
after_script:
- "mv deploy/*.deb build/riseup/build"
artifacts:
paths:
- "build/riseup/build/"
expire_in: 1 week
tags:
- linux
build_ubuntu24_package:
stage: package
image: ubuntu:24.04
before_script:
- "apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -q -y make sudo"
- "make depends"
- 'ln -s $(qmake6 -query "QT_INSTALL_BINS")/lrelease /usr/local/bin/lrelease'
script:
- "PROVIDER=bitmask make vendor"
- "PROVIDER=bitmask QMAKE=qmake6 make package_deb"
- "make clean"
- "PROVIDER=riseup make vendor"
- "PROVIDER=riseup QMAKE=qmake6 make package_deb"
after_script:
- "mv deploy/*.deb build/riseup/build"
artifacts:
paths:
- "build/riseup/build/"
expire_in: 1 week
tags:
- linux