-
Notifications
You must be signed in to change notification settings - Fork 40
75 lines (70 loc) · 2.11 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
name: CI
on: [push, pull_request]
# env:
# RUSTFLAGS: -Dwarnings
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.39.0
- stable
- beta
- nightly
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
- name: cargo test
run: cargo test
- name: cargo doc
run: cargo doc --no-deps
style:
name: Style
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
component:
- rustfmt
steps:
- uses: actions/checkout@master
- name: Install Rust
shell: bash
run: rustup update stable && rustup default stable
- name: Install component
shell: bash
run: rustup component add ${{ matrix.component }}
- name: cargo fmt
if: matrix.component == 'rustfmt'
run: cargo fmt -- --check
publish_docs:
name: Publish Documentation
needs: [style, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update stable && rustup default stable
- name: Build documentation
run: cargo doc --no-deps --all-features
- name: Publish documentation
run: |
cd target/doc
git init
git add .
git -c user.name='ci' -c user.email='ci' commit -m 'Deploy futures-timer API documentation'
git push -f -q https://git:${{ secrets.github_token }}@github.com/${{ github.repository }} HEAD:gh-pages
if: github.event_name == 'push' && github.event.ref == 'refs/heads/master' && github.repository == 'async-rs/futures-timer'
check_wasm:
name: Check Wasm
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust and add wasm target
run: rustup update stable && rustup target add wasm32-unknown-unknown
- name: cargo check
run: cargo check --target wasm32-unknown-unknown --features wasm-bindgen