|
| 1 | +name: Tests |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: 0.1 |
| 6 | + pull_request: |
| 7 | + branches: 0.1 |
| 8 | + schedule: |
| 9 | + - cron: "0 12 * * 1" |
| 10 | + |
| 11 | +env: |
| 12 | + CARGO_INCREMENTAL: 0 |
| 13 | + RUSTFLAGS: "-Dwarnings" |
| 14 | + |
| 15 | +jobs: |
| 16 | + check-doc: |
| 17 | + name: Doc deadlinks |
| 18 | + runs-on: ubuntu-latest |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v2 |
| 21 | + - name: Install toolchain |
| 22 | + uses: actions-rs/toolchain@v1 |
| 23 | + with: |
| 24 | + profile: minimal |
| 25 | + toolchain: nightly |
| 26 | + override: true |
| 27 | + - run: cargo install cargo-deadlinks |
| 28 | + - run: cargo deadlinks -- --features custom |
| 29 | + |
| 30 | + # main-tests: |
| 31 | + # name: Main tests |
| 32 | + # runs-on: ${{ matrix.os }} |
| 33 | + # strategy: |
| 34 | + # matrix: |
| 35 | + # os: [ubuntu-latest, macos-latest, windows-latest] |
| 36 | + # toolchain: [nightly, beta, stable, 1.34] |
| 37 | + # steps: |
| 38 | + # - uses: actions/checkout@v2 |
| 39 | + # - name: Install toolchain |
| 40 | + # uses: actions-rs/toolchain@v1 |
| 41 | + # with: |
| 42 | + # profile: minimal |
| 43 | + # toolchain: ${{ matrix.toolchain }} |
| 44 | + # override: true |
| 45 | + # - run: cargo test |
| 46 | + # - run: cargo test --features std |
| 47 | + # - if: ${{ matrix.toolchain == 'nightly' }} |
| 48 | + # run: cargo build --benches |
| 49 | + |
| 50 | + # linux-tests: |
| 51 | + # name: Additional Linux targets |
| 52 | + # runs-on: ubuntu-latest |
| 53 | + # strategy: |
| 54 | + # matrix: |
| 55 | + # target: [ |
| 56 | + # x86_64-unknown-linux-musl, |
| 57 | + # i686-unknown-linux-gnu, |
| 58 | + # i686-unknown-linux-musl, |
| 59 | + # ] |
| 60 | + # steps: |
| 61 | + # - uses: actions/checkout@v2 |
| 62 | + # - name: Install toolchain |
| 63 | + # uses: actions-rs/toolchain@v1 |
| 64 | + # with: |
| 65 | + # profile: minimal |
| 66 | + # target: ${{ matrix.target }} |
| 67 | + # toolchain: stable |
| 68 | + # override: true |
| 69 | + # # update is needed to fix the 404 error on install, see: |
| 70 | + # # https://github.com/actions/virtual-environments/issues/675 |
| 71 | + # - run: sudo apt-get update |
| 72 | + # - run: sudo apt-get install gcc-multilib |
| 73 | + # - run: cargo test --target ${{ matrix.target }} |
| 74 | + |
| 75 | + # windows-tests: |
| 76 | + # name: Additional Windows targets |
| 77 | + # runs-on: windows-latest |
| 78 | + # strategy: |
| 79 | + # matrix: |
| 80 | + # toolchain: [ |
| 81 | + # stable-x86_64-gnu, |
| 82 | + # stable-i686-gnu, |
| 83 | + # stable-i686-msvc, |
| 84 | + # ] |
| 85 | + # steps: |
| 86 | + # - uses: actions/checkout@v2 |
| 87 | + # - name: Install toolchain |
| 88 | + # uses: actions-rs/toolchain@v1 |
| 89 | + # with: |
| 90 | + # profile: minimal |
| 91 | + # toolchain: ${{ matrix.toolchain }} |
| 92 | + # override: true |
| 93 | + # - run: cargo test |
| 94 | + |
| 95 | + # cross-tests: |
| 96 | + # name: Cross tests |
| 97 | + # runs-on: ${{ matrix.os }} |
| 98 | + # strategy: |
| 99 | + # matrix: |
| 100 | + # include: |
| 101 | + # - os: ubuntu-latest |
| 102 | + # target: mips-unknown-linux-gnu |
| 103 | + # toolchain: stable |
| 104 | + # steps: |
| 105 | + # - uses: actions/checkout@v2 |
| 106 | + # - name: Install toolchain |
| 107 | + # uses: actions-rs/toolchain@v1 |
| 108 | + # with: |
| 109 | + # profile: minimal |
| 110 | + # target: ${{ matrix.target }} |
| 111 | + # toolchain: ${{ matrix.toolchain }} |
| 112 | + # override: true |
| 113 | + # - name: Cache cargo plugins |
| 114 | + # uses: actions/cache@v1 |
| 115 | + # with: |
| 116 | + # path: ~/.cargo/bin/ |
| 117 | + # key: ${{ runner.os }}-cargo-plugins |
| 118 | + # - name: Install cross |
| 119 | + # run: cargo install cross || true |
| 120 | + # - name: Test |
| 121 | + # run: cross test --no-fail-fast --target ${{ matrix.target }} |
| 122 | + |
| 123 | + # build: |
| 124 | + # name: Build-only |
| 125 | + # runs-on: ubuntu-latest |
| 126 | + # strategy: |
| 127 | + # matrix: |
| 128 | + # target: [ |
| 129 | + # x86_64-sun-solaris, |
| 130 | + # x86_64-unknown-freebsd, |
| 131 | + # x86_64-fuchsia, |
| 132 | + # x86_64-unknown-netbsd, |
| 133 | + # x86_64-unknown-redox, |
| 134 | + # x86_64-fortanix-unknown-sgx, |
| 135 | + # ] |
| 136 | + # steps: |
| 137 | + # - uses: actions/checkout@v2 |
| 138 | + # - name: Install toolchain |
| 139 | + # uses: actions-rs/toolchain@v1 |
| 140 | + # with: |
| 141 | + # profile: minimal |
| 142 | + # target: ${{ matrix.target }} |
| 143 | + # toolchain: nightly |
| 144 | + # override: true |
| 145 | + # - name: Build |
| 146 | + # run: cargo build --target ${{ matrix.target }} |
| 147 | + |
| 148 | + # build-rdrand: |
| 149 | + # name: Build-only RDRAND |
| 150 | + # runs-on: ubuntu-latest |
| 151 | + # steps: |
| 152 | + # - uses: actions/checkout@v2 |
| 153 | + # - name: Install toolchain |
| 154 | + # uses: actions-rs/toolchain@v1 |
| 155 | + # with: |
| 156 | + # profile: minimal |
| 157 | + # toolchain: nightly |
| 158 | + # components: rust-src |
| 159 | + # override: true |
| 160 | + # - name: UEFI |
| 161 | + # run: cargo build -Z build-std=core --features=rdrand --target x86_64-unknown-uefi |
| 162 | + # - name: Hermit |
| 163 | + # run: cargo build -Z build-std=core --features=rdrand --target x86_64-unknown-hermit |
| 164 | + # - name: L4Re |
| 165 | + # run: cargo build -Z build-std=core --features=rdrand --target x86_64-unknown-l4re-uclibc |
| 166 | + # - name: VxWorks |
| 167 | + # run: cargo build -Z build-std=core --features=rdrand --target x86_64-wrs-vxworks |
| 168 | + |
| 169 | + clippy-fmt: |
| 170 | + name: Clippy + rustfmt |
| 171 | + runs-on: ubuntu-latest |
| 172 | + steps: |
| 173 | + - uses: actions/checkout@v1 |
| 174 | + - uses: actions-rs/toolchain@v1 |
| 175 | + with: |
| 176 | + profile: minimal |
| 177 | + # https://github.com/rust-lang/rust-clippy/pull/6379 added MSRV |
| 178 | + # support, so we need to use nightly until this is on stable. |
| 179 | + toolchain: nightly |
| 180 | + components: rustfmt, clippy |
| 181 | + override: true |
| 182 | + - name: clippy |
| 183 | + run: cargo clippy --all |
| 184 | + - name: fmt |
| 185 | + run: cargo fmt --all -- --check |
0 commit comments