-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
74 lines (63 loc) · 1.62 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
74 lines (63 loc) · 1.62 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
image: "rust:latest"
variables:
CARGO_HOME: /root/.cargo
RUST_BACKTRACE: "1"
cache:
paths:
- ${CARGO_HOME}
- ./target
stages:
- test
- build
#- deploy
.build_template: &build_script
### run build, test and doc
- rustc --version && cargo --version # Print version info for debugging
- cargo build --release
- cargo doc
# Install a C compiler, cmake and git into the container.
.linux_dependencies: &linux_deps
### run build, test and doc
- apt-get update -yqq
- apt-get install -yqq --no-install-recommends build-essential libasound2-dev libudev-dev
# Install a C compiler, cmake and git into the container.
.test_template: &test_script
- rustc --version && cargo --version # Print version info for debugging
- cargo test --verbose
- cargo clippy -- -Dwarnings
windows:
image: tomaka/rust-mingw-docker:latest
stage: build
artifacts:
paths:
- target/x86_64-pc-windows-gnu/release/nintaudio.exe
script:
- rustc --version && cargo --version # Print version info for debugging
- cargo build --release --target x86_64-pc-windows-gnu
# macos:
# script: *build_script
# stage: build
# cache:
# paths:
# - target/release/deps
# tags:
# - macos
linux:
script: *build_script
stage: build
before_script: *linux_deps
artifacts:
paths:
- target/release/nintaudio
- target/docs
test:stable:
image: rustdocker/rust:stable
script: *test_script
stage: test
before_script: *linux_deps
test:beta:
allow_failure: true
image: rustdocker/rust:nightly
script: *test_script
stage: test
before_script: *linux_deps