-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
169 lines (136 loc) · 4.94 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
169 lines (136 loc) · 4.94 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
167
168
169
cargo-fmt:
image: rust
script:
- rustup component add rustfmt
- cargo fmt --check
cargo-clippy:
image: rust
script:
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y libudev-dev libclang-dev librust-alsa-sys-dev
- rustup component add clippy
# Install trunk for building the web UI (this assumes x86_64)
- curl --location --remote-name https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-musl.tar.gz
- tar xzf trunk-x86_64-unknown-linux-musl.tar.gz
- mv trunk $CARGO_HOME/bin/
- trunk --version
- rustup target add wasm32-unknown-unknown
# Catches lints that `RUSTFLAGS=-D warnings` does not (e.g. the
# clippy `needless_borrow` family) on every workspace target,
# including tests and examples.
- cargo clippy --workspace --all-targets -- -D warnings
cargo-doc:
image: rust
script:
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y libudev-dev libclang-dev librust-alsa-sys-dev
# Install trunk for building the web UI (this assumes x86_64)
- curl --location --remote-name https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-musl.tar.gz
- tar xzf trunk-x86_64-unknown-linux-musl.tar.gz
- mv trunk $CARGO_HOME/bin/
- trunk --version
- rustup target add wasm32-unknown-unknown
- export RUSTDOCFLAGS="-D warnings"
- cargo doc --no-deps
beamdriver:
image: rust
script:
# Install and build elf2uf2-rs
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y libudev-dev
- cargo install --git https://github.com/StripedMonkey/elf2uf2-rs.git#c1639b9e8bcaaaab653f9fa0e358fed0e8a7ce76 --locked
# Now build firmware
- cd firmware/beamdriver
- rustup target install thumbv6m-none-eabi
- cargo install flip-link
- cargo build --release
# Convert to .uf2 and copy to filename with our commit hash
- elf2uf2-rs target/thumbv6m-none-eabi/release/beamdriver
- cp target/thumbv6m-none-eabi/release/beamdriver.uf2 ${CI_PROJECT_DIR}/beamdriver-${CI_COMMIT_SHA}.uf2
artifacts:
paths:
- beamdriver-${CI_COMMIT_SHA}.uf2
name: "beamdriver-${CI_COMMIT_SHA}"
rpipico-pantilt-firmware:
image: rust
script:
# Install and build elf2uf2-rs
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y libudev-dev
- cargo install --git https://github.com/StripedMonkey/elf2uf2-rs.git#c1639b9e8bcaaaab653f9fa0e358fed0e8a7ce76 --locked
# Now build firmware
- cd firmware/rpipico-pantilt
- rustup target install thumbv6m-none-eabi
- cargo install flip-link
- cargo build --release
# Convert to .uf2 and copy to filename with our commit hash
- elf2uf2-rs target/thumbv6m-none-eabi/release/rpipico-pantilt
- cp target/thumbv6m-none-eabi/release/rpipico-pantilt.uf2 ${CI_PROJECT_DIR}/rpipico-pantilt-${CI_COMMIT_SHA}.uf2
artifacts:
paths:
- rpipico-pantilt-${CI_COMMIT_SHA}.uf2
name: "rpipico-pantilt-${CI_COMMIT_SHA}"
flo-tilta-dongle:
image: rust
script:
# Build firmware
- cd firmware/flo-tilta-dongle
- rustup target install thumbv7em-none-eabihf
- cargo build --release
pwm-motor-types:
image: rust
script:
- export RUSTFLAGS="-D warnings"
- rustup target install thumbv6m-none-eabi
- cd crates/pwm-motor-types
# Ensure that it builds without std
- cargo build --target thumbv6m-none-eabi
- cargo test
flo:
image: rust
script:
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y libudev-dev libclang-dev librust-alsa-sys-dev
- export RUSTFLAGS="-D warnings"
# Install trunk for building the web UI (this assumes x86_64)
- curl --location --remote-name https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-musl.tar.gz
- tar xzf trunk-x86_64-unknown-linux-musl.tar.gz
- mv trunk $CARGO_HOME/bin/
- trunk --version
- rustup target add wasm32-unknown-unknown
# The subsequent check builds in offline mode, so make sure we are ready for that.
- cargo build --release --workspace
- ./build.sh
- cargo test --workspace --all-targets
- cargo run --release -- --config config-byo.yaml show-config
- cargo run --release -- --config config-mini.yaml show-config
- cd ${CI_PROJECT_DIR}
- cp target/release/flo flo.${CI_COMMIT_SHA}
artifacts:
paths:
- flo.${CI_COMMIT_SHA}
name: "flo.${CI_COMMIT_SHA}"
test-crates:
image: rust
script:
- export RUSTFLAGS="-D warnings"
- cd crates/flo-core
- cargo test
- cd ../..
- cd crates/osd-utils
- cargo test
- cd ../..
simplebgc:
image: rust
script:
- export RUSTFLAGS="-D warnings"
- cd crates/simplebgc
- cargo test
trinamic:
image: rust
script:
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y libudev-dev
- export RUSTFLAGS="-D warnings"
- cd crates/trinamic
- cargo test