-
Notifications
You must be signed in to change notification settings - Fork 10
/
.gitlab-ci.yml
92 lines (85 loc) · 1.65 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
stages:
- install
- rs_check_lint
- wasm
- ts_check_lint
- test
- build
- deploy
npm_ci:
stage: install
tags:
- linux
script: npm ci
artifacts:
paths:
- node_modules
.build_base:
tags:
- linux
dependencies:
- npm_ci
rs_check_lint:
stage: rs_check_lint
image: rust:latest
tags:
- linux
# before_script:
# - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# - source "$HOME/.cargo/env"
script:
- cd rust-src
- cargo check
- rustup component add clippy
- cargo clippy -- -Dwarnings
wasm_build:
tags:
- linux
stage: wasm
image: rust:latest
extends:
- .build_base
before_script:
# - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# - source "$HOME/.cargo/env"
- curl --proto '=https' --tlsv1.2 -sSf https://rustwasm.github.io/wasm-pack/installer/init.sh | sh
script:
- wasm-pack build ./rust-src --target web
artifacts:
paths:
- rust-src/pkg
- node_modules
ts_check_lint:
dependencies:
- npm_ci
- wasm_build
stage: ts_check_lint
tags:
- linux
script:
- npx tsc
- npm run lint
npm_build:
dependencies:
- wasm_build
stage: build
image: git-registry.mycard.moe/mycard/docker-runner-base:master-x86
tags:
- linux
script:
- cp neos.config.prod.json neos.config.json
- npm run build:prod
artifacts:
paths:
- dist
deploy:
stage: deploy
tags:
- linux
only:
- main
dependencies:
- npm_build
script:
- mv neos-assets dist/
- aws s3 --endpoint=https://minio.mycard.moe:9000 sync --delete dist/ s3://mycard/neos