-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
57 lines (51 loc) · 1.4 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
stages:
- build
- deploy
everything:
stage: build
image: rustlang/rust:nightly
script:
- apt-get update -y
- apt-get install -y pkg-config libx11-dev libxi-dev libgl1-mesa-dev libasound2-dev
- rustup target add wasm32-wasi
- cargo build --all --verbose
- cargo test --all --verbose --exclude my-game
engine-desktop:
stage: build
image: rustlang/rust:nightly
script:
- cargo build --bin vg-engine
engine-android:
stage: build
image: rust:1.67
script:
- cargo install cargo-apk
- cargo apk build --manifest-path vg-engine/Cargo.toml
signaling:
stage: build
image: rustlang/rust:nightly
script:
- cargo build --package vg-signaling --release --verbose --target x86_64-unknown-linux-gnu
artifacts:
paths:
- target/x86_64-unknown-linux-gnu/release/vg-signaling
deploy:
stage: deploy
image: alpine:latest
script:
- apk add --no-cache rsync openssh
- mkdir -p ~/.ssh
- echo "$SSH_PRIVATE_KEY" >> ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- rsync -ravO target/x86_64-unknown-linux-gnu/release/vg-signaling [email protected]:/opt/vg-signaling/
- ssh [email protected] "systemctl restart vg-signaling"
only:
- main
format:
stage: build
image: rust:latest
script:
- rustup component add rustfmt
- cargo fmt
allow_failure: true