8
8
name : Loom
9
9
10
10
env :
11
- RUSTFLAGS : -Dwarnings
11
+ RUSTFLAGS : -Dwarnings --cfg loom --cfg tokio_unstable -C debug_assertions
12
+ LOOM_MAX_PREEMPTIONS : 2
13
+ LOOM_MAX_BRANCHES : 10000
12
14
RUST_BACKTRACE : 1
13
15
# Change to specific Rust release to pin
14
16
rust_stable : stable
@@ -17,26 +19,91 @@ permissions:
17
19
contents : read
18
20
19
21
jobs :
20
- loom :
21
- name : loom
22
+ loom-sync :
23
+ name : loom tokio::sync
22
24
# base_ref is null when it's not a pull request
23
- if : github.repository_owner == 'tokio-rs' && (contains(github.event.pull_request.labels.*.name, 'R-loom') || (github.base_ref == null))
25
+ if : github.repository_owner == 'tokio-rs' && (contains(github.event.pull_request.labels.*.name, 'R-loom-sync') || (github.base_ref == null))
26
+ runs-on : ubuntu-latest
27
+ steps :
28
+ - uses : actions/checkout@v3
29
+ - name : Install Rust ${{ env.rust_stable }}
30
+ uses : dtolnay/rust-toolchain@master
31
+ with :
32
+ toolchain : ${{ env.rust_stable }}
33
+ - uses : Swatinem/rust-cache@v2
34
+ - name : run tests
35
+ run : cargo test --lib --release --features full -- --nocapture sync::tests
36
+ working-directory : tokio
37
+
38
+ loom-time-driver :
39
+ name : loom time driver
40
+ # base_ref is null when it's not a pull request
41
+ if : github.repository_owner == 'tokio-rs' && (contains(github.event.pull_request.labels.*.name, 'R-loom-time-driver') || (github.base_ref == null))
42
+ runs-on : ubuntu-latest
43
+ steps :
44
+ - uses : actions/checkout@v3
45
+ - name : Install Rust ${{ env.rust_stable }}
46
+ uses : dtolnay/rust-toolchain@master
47
+ with :
48
+ toolchain : ${{ env.rust_stable }}
49
+ - uses : Swatinem/rust-cache@v2
50
+ - name : run tests
51
+ run : cargo test --lib --release --features full -- --nocapture runtime::time::tests
52
+ working-directory : tokio
53
+
54
+ loom-current-thread :
55
+ name : loom current-thread scheduler
56
+ # base_ref is null when it's not a pull request
57
+ if : github.repository_owner == 'tokio-rs' && (contains(github.event.pull_request.labels.*.name, 'R-loom-current-thread') || (github.base_ref == null))
58
+ runs-on : ubuntu-latest
59
+ steps :
60
+ - uses : actions/checkout@v3
61
+ - name : Install Rust ${{ env.rust_stable }}
62
+ uses : dtolnay/rust-toolchain@master
63
+ with :
64
+ toolchain : ${{ env.rust_stable }}
65
+ - uses : Swatinem/rust-cache@v2
66
+ - name : run tests
67
+ run : cargo test --lib --release --features full -- --nocapture loom_current_thread
68
+ working-directory : tokio
69
+
70
+ loom-multi-thread :
71
+ name : loom multi-thread scheduler
72
+ # base_ref is null when it's not a pull request
73
+ if : github.repository_owner == 'tokio-rs' && (contains(github.event.pull_request.labels.*.name, 'R-loom-multi-thread') || (github.base_ref == null))
74
+ runs-on : ubuntu-latest
75
+ strategy :
76
+ matrix :
77
+ include :
78
+ - scope : loom_multi_thread::group_a
79
+ - scope : loom_multi_thread::group_b
80
+ - scope : loom_multi_thread::group_c
81
+ - scope : loom_multi_thread::group_d
82
+ steps :
83
+ - uses : actions/checkout@v3
84
+ - name : Install Rust ${{ env.rust_stable }}
85
+ uses : dtolnay/rust-toolchain@master
86
+ with :
87
+ toolchain : ${{ env.rust_stable }}
88
+ - uses : Swatinem/rust-cache@v2
89
+ - name : loom ${{ matrix.scope }}
90
+ run : cargo test --lib --release --features full -- $SCOPE
91
+ working-directory : tokio
92
+ env :
93
+ SCOPE : ${{ matrix.scope }}
94
+
95
+ loom-multi-thread-alt :
96
+ name : loom ALT multi-thread scheduler
97
+ # base_ref is null when it's not a pull request
98
+ if : github.repository_owner == 'tokio-rs' && (contains(github.event.pull_request.labels.*.name, 'R-loom-multi-thread-alt') || (github.base_ref == null))
24
99
runs-on : ubuntu-latest
25
100
strategy :
26
101
matrix :
27
102
include :
28
- - scope : --skip loom_pool
29
- max_preemptions : 2
30
- - scope : loom_pool::group_a
31
- max_preemptions : 2
32
- - scope : loom_pool::group_b
33
- max_preemptions : 2
34
- - scope : loom_pool::group_c
35
- max_preemptions : 2
36
- - scope : loom_pool::group_d
37
- max_preemptions : 2
38
- - scope : time::driver
39
- max_preemptions : 2
103
+ - scope : loom_multi_thread_alt::group_a
104
+ - scope : loom_multi_thread_alt::group_b
105
+ - scope : loom_multi_thread_alt::group_c
106
+ - scope : loom_multi_thread_alt::group_d
40
107
steps :
41
108
- uses : actions/checkout@v3
42
109
- name : Install Rust ${{ env.rust_stable }}
@@ -45,10 +112,9 @@ jobs:
45
112
toolchain : ${{ env.rust_stable }}
46
113
- uses : Swatinem/rust-cache@v2
47
114
- name : loom ${{ matrix.scope }}
48
- run : cargo test --lib --release --features full -- --nocapture $SCOPE
115
+ run : cargo test --lib --release --features full -- $SCOPE
49
116
working-directory : tokio
50
117
env :
51
- RUSTFLAGS : --cfg loom --cfg tokio_unstable -Dwarnings -C debug-assertions
52
- LOOM_MAX_PREEMPTIONS : ${{ matrix.max_preemptions }}
53
- LOOM_MAX_BRANCHES : 10000
54
118
SCOPE : ${{ matrix.scope }}
119
+ # TODO: remove this before stabilizing
120
+ LOOM_MAX_PREEMPTIONS : 1
0 commit comments