File tree Expand file tree Collapse file tree 3 files changed +77
-33
lines changed Expand file tree Collapse file tree 3 files changed +77
-33
lines changed Original file line number Diff line number Diff line change
1
+ name : Documentation
2
+
3
+ on :
4
+ push :
5
+ branches : [master]
6
+ tags : ["*"]
7
+ pull_request :
8
+ # Check all PR
9
+
10
+ jobs :
11
+ build-and-publish :
12
+ runs-on : ubuntu-18.04
13
+ steps :
14
+ - uses : actions/checkout@v2
15
+ with :
16
+ submodules : true
17
+ - name : setup rust
18
+ uses : actions-rs/toolchain@v1
19
+ with :
20
+ profile : minimal
21
+ toolchain : stable
22
+ - name : build documentation
23
+ run : |
24
+ cd example
25
+ cargo doc --no-deps
26
+ - name : put documentation in the website
27
+ run : |
28
+ git clone https://github.com/$GITHUB_REPOSITORY --branch gh-pages gh-pages
29
+ rm -rf gh-pages/.git
30
+ cd gh-pages
31
+
32
+ REF_KIND=$(echo $GITHUB_REF | cut -d / -f2)
33
+ if [[ "$REF_KIND" == "tags" ]]; then
34
+ TAG=${GITHUB_REF#refs/tags/}
35
+ mv ../target/doc/ $TAG
36
+ cp ../example/index.html $TAG/index.html
37
+ else
38
+ rm -rf latest
39
+ mv ../target/doc/ latest
40
+ cp ../example/index.html latest/index.html
41
+ fi
42
+ - name : deploy to gh-pages
43
+ if : github.event_name == 'push'
44
+ uses : peaceiris/actions-gh-pages@v3
45
+ with :
46
+ github_token : ${{ secrets.GITHUB_TOKEN }}
47
+ publish_dir : ./gh-pages/
48
+ force_orphan : true
Original file line number Diff line number Diff line change
1
+ name : Test
2
+
3
+ on :
4
+ push :
5
+ branches : [master]
6
+ pull_request :
7
+ # Check all PR
8
+
9
+ jobs :
10
+ tests :
11
+ runs-on : ubuntu-18.04
12
+ strategy :
13
+ matrix :
14
+ rust-version : ["1.31", stable, beta, nightly]
15
+ steps :
16
+ - uses : actions/checkout@v2
17
+ with :
18
+ submodules : true
19
+ - name : setup rust
20
+ uses : actions-rs/toolchain@v1
21
+ with :
22
+ profile : minimal
23
+ toolchain : ${{ matrix.rust-version }}
24
+ - name : run tests in debug mode
25
+ run : cargo test
26
+ - name : run tests in release mode
27
+ run : cargo test --release
28
+ - name : check that benchmarks still compile
29
+ run : cargo bench --no-run
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments