|  | 
|  | 1 | +name: Continuous integration | 
|  | 2 | + | 
|  | 3 | +on: | 
|  | 4 | + push: | 
|  | 5 | + branches: [ master ] | 
|  | 6 | + pull_request: | 
|  | 7 | + branches: [ master ] | 
|  | 8 | + | 
|  | 9 | +env: | 
|  | 10 | + CARGO_TERM_COLOR: always | 
|  | 11 | + RUSTFLAGS: "-D warnings" | 
|  | 12 | + | 
|  | 13 | +jobs: | 
|  | 14 | + | 
|  | 15 | + test: | 
|  | 16 | + runs-on: ubuntu-latest | 
|  | 17 | + strategy: | 
|  | 18 | + matrix: | 
|  | 19 | + rust: | 
|  | 20 | + - stable | 
|  | 21 | + - beta | 
|  | 22 | + - nightly | 
|  | 23 | + - 1.49.0 # MSRV | 
|  | 24 | + steps: | 
|  | 25 | + - uses: actions/checkout@v2 | 
|  | 26 | + - uses: actions-rs/toolchain@v1 | 
|  | 27 | + with: | 
|  | 28 | + profile: minimal | 
|  | 29 | + toolchain: ${{ matrix.rust }} | 
|  | 30 | + override: true | 
|  | 31 | + - name: Build | 
|  | 32 | + run: cargo build --verbose | 
|  | 33 | + - name: Run tests | 
|  | 34 | + run: cargo test --verbose | 
|  | 35 | + | 
|  | 36 | + cross_test: | 
|  | 37 | + runs-on: ubuntu-latest | 
|  | 38 | + strategy: | 
|  | 39 | + matrix: | 
|  | 40 | + include: | 
|  | 41 | + # 64-bit, big-endian | 
|  | 42 | + - rust: stable | 
|  | 43 | + target: mips64-unknown-linux-gnuabi64 | 
|  | 44 | + # 32-bit, big-endian | 
|  | 45 | + - rust: stable | 
|  | 46 | + target: mips-unknown-linux-gnu | 
|  | 47 | + # 32-bit, little-endian | 
|  | 48 | + - rust: stable | 
|  | 49 | + target: i686-unknown-linux-gnu | 
|  | 50 | + steps: | 
|  | 51 | + - uses: actions/checkout@v2 | 
|  | 52 | + - uses: actions-rs/toolchain@v1 | 
|  | 53 | + with: | 
|  | 54 | + profile: minimal | 
|  | 55 | + toolchain: ${{ matrix.rust }} | 
|  | 56 | + target: ${{ matrix.target }} | 
|  | 57 | + override: true | 
|  | 58 | + - name: Install cross | 
|  | 59 | + run: cargo install cross -f | 
|  | 60 | + - name: Build | 
|  | 61 | + run: cross build --verbose --target=${{ matrix.target }} | 
|  | 62 | + - name: Run tests | 
|  | 63 | + run: cross test --verbose --target=${{ matrix.target }} | 
|  | 64 | + | 
|  | 65 | + format: | 
|  | 66 | + runs-on: ubuntu-latest | 
|  | 67 | + strategy: | 
|  | 68 | + matrix: | 
|  | 69 | + rust: | 
|  | 70 | + - stable | 
|  | 71 | + steps: | 
|  | 72 | + - uses: actions/checkout@v2 | 
|  | 73 | + - uses: actions-rs/toolchain@v1 | 
|  | 74 | + with: | 
|  | 75 | + profile: minimal | 
|  | 76 | + toolchain: ${{ matrix.rust }} | 
|  | 77 | + override: true | 
|  | 78 | + components: rustfmt | 
|  | 79 | + - name: Rustfmt | 
|  | 80 | + run: cargo fmt -- --check | 
|  | 81 | + | 
|  | 82 | + coverage: | 
|  | 83 | + runs-on: ubuntu-latest | 
|  | 84 | + strategy: | 
|  | 85 | + matrix: | 
|  | 86 | + rust: | 
|  | 87 | + - nightly | 
|  | 88 | + steps: | 
|  | 89 | + - uses: actions/checkout@v2 | 
|  | 90 | + - uses: actions-rs/toolchain@v1 | 
|  | 91 | + with: | 
|  | 92 | + profile: minimal | 
|  | 93 | + toolchain: ${{ matrix.rust }} | 
|  | 94 | + override: true | 
|  | 95 | + - name: Install tarpaulin | 
|  | 96 | + run: cargo install cargo-tarpaulin -f | 
|  | 97 | + - name: Generate code coverage | 
|  | 98 | + run: cargo tarpaulin --verbose --all-features --workspace --timeout 120 --out Xml | 
|  | 99 | + - name: Upload to codecov.io | 
|  | 100 | + uses: codecov/codecov-action@v1 | 
|  | 101 | + with: | 
|  | 102 | + fail_ci_if_error: true | 
0 commit comments