File tree Expand file tree Collapse file tree 4 files changed +54
-13
lines changed Expand file tree Collapse file tree 4 files changed +54
-13
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy Book
1
2
on :
3
+ pull_request :
2
4
push :
3
5
branches :
4
6
- main
5
7
6
8
jobs :
7
- ci :
8
- name : CI
9
+ build-book :
10
+ name : Build Book
9
11
runs-on : ubuntu-latest
12
+ permissions :
13
+ contents : write
10
14
steps :
11
- - uses : actions/checkout@v3
12
- - uses : XAMPPRocky/deploy-mdbook@v1
15
+ - name : Checkout
16
+ uses : actions/checkout@v3
17
+
18
+ - name : Install mdbook
19
+ run : cargo install mdbook --version "^0.4" --locked
20
+
21
+ - name : Run mdbook
22
+ run : mdbook build
23
+
24
+ - name : Upload book
25
+ uses : actions/upload-pages-artifact@v2
26
+ with :
27
+ path : book/
28
+ retention-days : " 3"
29
+
30
+ - name : Deploy Book
31
+ uses : JamesIves/github-pages-deploy-action@v4
32
+ if : ${{ github.event_name == 'push' && startsWith('refs/heads/main', github.ref) }}
13
33
with :
14
- token : ${{ secrets.GITHUB_TOKEN }}
34
+ branch : gh-pages
35
+ folder : book/
36
+ single-commit : true
Original file line number Diff line number Diff line change
1
+ # Run a job to ensure formatting is OK
2
+ name : Format Check
3
+ on :
4
+ pull_request :
5
+ push :
6
+ branches :
7
+ - main
8
+
9
+ jobs :
10
+ format-check :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Checkout
14
+ uses : actions/checkout@v3
15
+
16
+ - name : Run Rust Format
17
+ run : cargo fmt --check
Original file line number Diff line number Diff line change @@ -56,8 +56,7 @@ impl From<Mode> for ui_test::Mode {
56
56
match mode {
57
57
Mode :: Pass | Mode :: CargoPass => ui_test:: Mode :: Pass ,
58
58
Mode :: Run => ui_test:: Mode :: Run { exit_code : 0 } ,
59
- Mode :: FixMe |
60
- Mode :: Fail => ui_test:: Mode :: Fail {
59
+ Mode :: FixMe | Mode :: Fail => ui_test:: Mode :: Fail {
61
60
require_patterns : false ,
62
61
rustfix : RustfixMode :: Disabled ,
63
62
} ,
Original file line number Diff line number Diff line change @@ -38,13 +38,16 @@ type TestResult = Result<(), String>;
38
38
/// `cargo rustc --check-smir`.
39
39
fn main ( ) -> ExitCode {
40
40
let args = std:: env:: args ( ) ;
41
- let ( smir_args, rustc_args) : ( Vec < String > , _ ) = args. partition
42
- ( |arg| arg
43
- . starts_with
44
- ( "--smir" ) ) ;
41
+ let ( smir_args, rustc_args) : ( Vec < String > , _ ) = args. partition ( |arg| arg. starts_with ( "--smir" ) ) ;
45
42
let callback = if smir_args. contains ( & CHECK_ARG . to_string ( ) ) {
46
- VERBOSE . store ( smir_args. contains ( & VERBOSE_ARG . to_string ( ) ) , Ordering :: Relaxed ) ;
47
- FIXME_CHECKS . store ( smir_args. contains ( & FIXME_ARG . to_string ( ) ) , Ordering :: Relaxed ) ;
43
+ VERBOSE . store (
44
+ smir_args. contains ( & VERBOSE_ARG . to_string ( ) ) ,
45
+ Ordering :: Relaxed ,
46
+ ) ;
47
+ FIXME_CHECKS . store (
48
+ smir_args. contains ( & FIXME_ARG . to_string ( ) ) ,
49
+ Ordering :: Relaxed ,
50
+ ) ;
48
51
test_stable_mir
49
52
} else {
50
53
|_: TyCtxt | ControlFlow :: < ( ) > :: Continue ( ( ) )
You can’t perform that action at this time.
0 commit comments