-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (34 loc) · 1.08 KB
/
ci.yml
File metadata and controls
43 lines (34 loc) · 1.08 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
name: Rust CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
rust-version: ["1.66.1", "nightly"]
steps:
- uses: actions/checkout@v2
- name: Cache Rust dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/
~/target/
key: ${{ runner.os }}-rust-${{ matrix.rust-version }}
restore-keys: |
${{ runner.os }}-rust-
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust-version }}
- name: Build and test with cargo
run: RUST_LOG=debug ROSRUST_MSG_PATH=`realpath examples/chatter/msgs` cargo test --features=doctest
continue-on-error: ${{ matrix.rust-version == 'nightly' }}
- name: Build example chatter
run: RUST_LOG=debug ROSRUST_MSG_PATH=`realpath examples/chatter/msgs` cargo build --example chatter --release
continue-on-error: ${{ matrix.rust-version == 'nightly' }}