-
Notifications
You must be signed in to change notification settings - Fork 110
93 lines (85 loc) · 2.3 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
82
83
84
85
86
87
88
89
90
91
92
93
name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
schedule:
- cron: '0 2 * * 0'
env:
RUSTFLAGS: -Dwarnings
RUST_BACKTRACE: 1
defaults:
run:
shell: bash
jobs:
# Check formatting
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable && rustup default stable
- name: Check formatting
run: cargo fmt --all --check
# This represents the minimum Rust version supported by
# Loom. Updating this should be done in a dedicated PR.
#
# Tests are not run as tests may require newer versions of
# rust.
minrust:
name: minrust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Check
run: cargo hack check --all-features --rust-version
# Minimal dependency versions
minimal-dependency-versions:
name: minimal dependency versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable && rustup default stable
- name: Install nightly Rust
run: rustup update nightly
- name: Set all dependencies to lowest allowed versions
run: cargo +nightly update -Z minimal-versions
- name: Test
run: cargo test
- name: Check --features checkpoint
run: cargo check --features checkpoint
- name: Test --features futures
run: cargo test --features futures
# Stable
stable:
name: stable
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable && rustup default stable
- name: Test
run: cargo test
- name: Check --features checkpoint
run: cargo check --features checkpoint
- name: Test --features futures
run: cargo test --features futures
# check docs
docs:
name: build docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update nightly && rustup default nightly
- name: cargo doc
run: cargo doc --no-deps --all-features
env:
RUSTDOCFLAGS: "--cfg docsrs -Dwarnings"