-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
166 lines (152 loc) · 4.51 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
166 lines (152 loc) · 4.51 KB
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
variables:
GET_SOURCES_ATTEMPTS: "3"
GIT_SUBMODULE_STRATEGY: "recursive"
GIT_SSL_NO_VERIFY: "true"
stages:
- ubuntu build
- ubuntu fstest
- mint build
- mint fstest
- fedora build
- fedora fstest
- arch build
- arch fstest
build on ubuntu:
image: ubuntu
stage: ubuntu build
dependencies: []
before_script: &common_compile_debian
- apt-get update -qq && apt-get install -y -qq git cmake g++ libfuse-dev libcurl4-gnutls-dev libjsoncpp-dev
script: &common_script
- mkdir build
- cd build
- cmake ..
- make -j$(nproc)
- ./apitest
artifacts: &common_artifacts
expire_in: 1 day
paths:
- build/marcfs
deb package for ubuntu:
image: ubuntu
stage: ubuntu build
dependencies: []
before_script:
- apt-get update -qq && apt-get install -y -qq git cmake g++ libfuse-dev libcurl4-gnutls-dev libjsoncpp-dev debhelper dh-make dpkg-dev
script:
- export DEBFULLNAME="Oleg (Kanedias) Chernovskiy"
- export DEBEMAIL="adonai@xaker.ru"
- "cmake . -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_INSTALL_PREFIX=/usr"
- dh_make --packagename marcfs_0.4 --copyright gpl3 --single --createorig --yes
- cp README.md debian/README.Debian
- dpkg-buildpackage -us -uc -j$(nproc)
- cp ../*.deb .
artifacts:
paths:
- "*.deb"
fstest on ubuntu:
image: ubuntu
stage: ubuntu fstest
dependencies:
- build on ubuntu
before_script: &common_test_debian
- apt-get update -qq && apt-get install -y -qq fuse libcurl3-gnutls libjsoncpp1 python3
- useradd --create-home fstest
- cp build/marcfs tests/fstest.py ~fstest
- "chown -R fstest: ~fstest"
after_script: &common_fstest_after
- userdel fstest
script: &common_fstest_script
- su -c 'python3 fstest.py -v' - fstest
build on mint:
image: vcatechnology/linux-mint
stage: mint build
dependencies: []
before_script: *common_compile_debian
script: *common_script
artifacts: *common_artifacts
fstest on mint:
image: vcatechnology/linux-mint
stage: mint fstest
dependencies:
- build on mint
before_script: *common_test_debian
after_script: *common_fstest_after
script: *common_fstest_script
build on fedora:
image: fedora
stage: fedora build
dependencies: []
before_script:
- yum -y install git-all cmake gcc-c++ fuse-devel libcurl-devel jsoncpp-devel
script: *common_script
artifacts: *common_artifacts
rpm package for fedora:
image: fedora
stage: fedora build
dependencies: []
before_script:
- yum -y install git-all cmake gcc-c++ fuse-devel libcurl-devel jsoncpp-devel jemalloc-devel rpm-build
script:
- version=$(grep Version fuse-marcfs.spec | grep -oP "\d.*")
- tar --transform "s|^|fuse-marcfs-$version/|g" -cvaf fuse-marcfs-$version.tar.bz2 *
- mkdir -pv ~/rpmbuild/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp}
- mv -v fuse-marcfs-$version.tar.bz2 ~/rpmbuild/SOURCES
- rpmbuild -ba fuse-marcfs.spec
- cp -v /root/rpmbuild/RPMS/*/*.rpm .
artifacts:
paths:
- "*.rpm"
fstest on fedora:
image: fedora
stage: fedora fstest
dependencies:
- build on fedora
before_script:
- yum -y install fuse fuse-libs libcurl jsoncpp python
- useradd --create-home fstest
- cp build/marcfs tests/fstest.py ~fstest
- "chown -R fstest: ~fstest"
after_script: *common_fstest_after
script:
- su -c 'export NSS_STRICT_NOFORK=DISABLED; python3 fstest.py -v' - fstest
build on arch:
# image: pritunl/archlinux # GPG signing errors
image: base/archlinux
stage: arch build
dependencies: []
before_script:
- pacman -Syu --noconfirm
- pacman -S --noconfirm git make cmake gcc fuse2 libcurl-gnutls jsoncpp
script: *common_script
artifacts: *common_artifacts
aur package for arch:
# image: pritunl/archlinux # GPG signing errors
image: base/archlinux
stage: arch build
dependencies: []
before_script:
- pacman -Syu --noconfirm
- pacman -S --noconfirm git make cmake gcc fuse2 libcurl-gnutls jsoncpp fakeroot
- useradd --create-home build
- cp PKGBUILD ~build
script:
- su -c 'makepkg -s' - build
- cp -v ~build/*.tar.xz .
artifacts:
paths:
- "*.tar.xz"
fstest on arch:
# image: pritunl/archlinux
image: base/archlinux
stage: arch fstest
dependencies:
- build on arch
before_script:
- pacman -Syu --noconfirm
- pacman -S --noconfirm fuse2 libcurl-gnutls jsoncpp python
- useradd --create-home fstest
- cp build/marcfs tests/fstest.py ~fstest
- "chown -R fstest: ~fstest"
after_script: *common_fstest_after
script: *common_fstest_script