-
Notifications
You must be signed in to change notification settings - Fork 13
81 lines (60 loc) · 1.9 KB
/
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
name: Build & Test
permissions: {}
on:
# Run on all pull requests
pull_request:
# Run if manually requested
workflow_dispatch:
# Run whenever these branches are updated.
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
# Incremental compilation is slower and not useful here.
CARGO_INCREMENTAL: 0
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
# Ensure we have an up-to-date toolchain
run: |
rustup toolchain install stable --profile=minimal
rustup default stable
- run: cargo test
- run: cargo test --no-default-features
- run: cargo test --all-features
- run: cargo update
# Check for breakage caused by dependencies.
- name: cargo test --all-features (after update)
run: cargo test --all-features
lint:
runs-on: ubuntu-latest
# Cause all warnings to turn into errors, failing this job.
env:
RUSTFLAGS: '-Dwarnings'
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
# Ensure we have an up-to-date toolchain
run: |
rustup toolchain install stable --profile=minimal --component=clippy
rustup default stable
# This could be upgraded to `cargo clippy` if desired.
- run: cargo check
# Only rustdoc produces "broken intra-doc link" warnings.
- run: cargo doc
# Detect breaking changes (e.g. removing an item or trait implementation)
# not accompanied by major version bumps, vs. the last crates.io release.
semver:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# This will cache the build of `cargo-semver-checks` itself.
# We don't use it for other jobs because `hexasphere` itself is quick to build.
- uses: Swatinem/rust-cache@v2.7.3
- uses: obi1kenobi/cargo-semver-checks-action@v2.3
with:
package: "hexasphere"