-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
97 lines (89 loc) · 2.77 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
stages:
- Test
- Build
- Package
test-parser:
stage: Test
image: rust
script:
- cargo test
.cross-compile-parser: &cross-compile-parser
image: rust
services:
- docker:19.03.12-dind
variables:
CROSS_REMOTE: "1"
DOCKER_HOST: "tcp://docker:2375"
DOCKER_DRIVER: "overlay2"
before_script:
- cargo install cross --git https://github.com/cross-rs/cross
- apt -qq update
- apt install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common > /dev/null
- curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
- add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
- apt -qq update
- apt install -y docker-ce docker-ce-cli containerd.io > /dev/null
build-parser-x86_64-unknown-linux-gnu:
stage: Build
<<: *cross-compile-parser
script:
- cross build -v --release --target x86_64-unknown-linux-gnu
artifacts:
paths:
- target/x86_64-unknown-linux-gnu/release/spg-parser
build-parser-armv7-unknown-linux-gnueabihf:
stage: Build
<<: *cross-compile-parser
script:
- cross build -v --release --target armv7-unknown-linux-gnueabihf
artifacts:
paths:
- target/armv7-unknown-linux-gnueabihf/release/spg-parser
build-backend:
stage: Build
image: alpine:3
script:
- apk add --no-cache composer php8-zip php8-xmlreader curl
- composer install
# Patch spout until PR has been merged: https://github.com/box/spout/pull/735
- curl -o vendor/box/spout/src/Spout/Writer/ODS/Manager/WorksheetManager.php https://raw.githubusercontent.com/schrieveslaach/spout/25742181f889487c570e817c258778a94b37f223/src/Spout/Writer/ODS/Manager/WorksheetManager.php
artifacts:
paths:
- vendor/**
build-frontend:
stage: Build
image: alpine:3
script:
- apk add --no-cache curl unzip nodejs npm python3 make g++
- npm ci
- npm run test:unit
- npm run build
artifacts:
paths:
- build/**
package:
stage: Package
image: alpine:edge
script:
- apk add --no-cache tar
- mkdir spgverein
- cp CHANGELOG.md spgverein/
- cp -r appinfo/ spgverein/
- cp -r fonts/ spgverein/
- cp -r img/ spgverein/
- cp -r l10n/ spgverein/
- cp -r lib/ spgverein/
- cp -r templates/ spgverein/
- cp -r vendor/ spgverein/
- cp -r CHANGELOG.md spgverein/
- cp -r CHANGELOG.de.md spgverein/
- cp -r README.md spgverein/
- cp -r COPYING spgverein/
- cp -r build/css/ spgverein/
- cp -r build/js/ spgverein/
- cp target/armv7-unknown-linux-gnueabihf/release/spg-parser spgverein/lib/Repository/parser-armv7l
- cp target/x86_64-unknown-linux-gnu/release/spg-parser spgverein/lib/Repository/parser-x86_64
- tar -cvzf spgverein.tar.gz spgverein/
artifacts:
paths:
- spgverein.tar.gz