|
| 1 | +name: CI |
| 2 | +on: |
| 3 | + pull_request: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + |
| 8 | +env: |
| 9 | + RUST_LOG: info |
| 10 | + RUST_BACKTRACE: 1 |
| 11 | + |
| 12 | +jobs: |
| 13 | + test-versions: |
| 14 | + name: Test Rust ${{ matrix.rust }} |
| 15 | + runs-on: ubuntu-latest |
| 16 | + strategy: |
| 17 | + fail-fast: false |
| 18 | + matrix: |
| 19 | + rust: [stable, beta, nightly] |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v2 |
| 22 | + - uses: hecrj/setup-rust-action@v1 |
| 23 | + with: |
| 24 | + rust-version: ${{ matrix.rust }} |
| 25 | + - run: cargo test --verbose --workspace |
| 26 | + cargo-check: |
| 27 | + name: Check for warnings |
| 28 | + runs-on: ubuntu-latest |
| 29 | + env: |
| 30 | + RUSTFLAGS: -Dwarnings |
| 31 | + steps: |
| 32 | + - uses: actions/checkout@v2 |
| 33 | + - uses: hecrj/setup-rust-action@v1 |
| 34 | + - run: cargo check --workspace --all-targets --verbose |
| 35 | + clippy: |
| 36 | + name: Lint with Clippy |
| 37 | + runs-on: ubuntu-latest |
| 38 | + env: |
| 39 | + RUSTFLAGS: -Dwarnings |
| 40 | + steps: |
| 41 | + - uses: actions/checkout@v2 |
| 42 | + - uses: hecrj/setup-rust-action@v1 |
| 43 | + with: |
| 44 | + components: clippy |
| 45 | + - run: cargo clippy --workspace --all-targets --verbose |
| 46 | + rustfmt: |
| 47 | + name: Verify code formatting |
| 48 | + runs-on: ubuntu-latest |
| 49 | + steps: |
| 50 | + - uses: actions/checkout@v2 |
| 51 | + - uses: hecrj/setup-rust-action@v1 |
| 52 | + with: |
| 53 | + components: rustfmt |
| 54 | + - run: cargo fmt --all -- --check |
| 55 | + check-rustdoc-links: |
| 56 | + name: Check intra-doc links |
| 57 | + runs-on: ubuntu-latest |
| 58 | + steps: |
| 59 | + - uses: actions/checkout@v2 |
| 60 | + - uses: hecrj/setup-rust-action@v1 |
| 61 | + with: |
| 62 | + rust-version: nightly |
| 63 | + - run: cargo rustdoc -- -D warnings |
| 64 | + # code-coverage: |
| 65 | + # name: Run code coverage |
| 66 | + # runs-on: ubuntu-latest |
| 67 | + # env: |
| 68 | + # RUSTFLAGS: -Zinstrument-coverage |
| 69 | + # steps: |
| 70 | + # - uses: actions/checkout@v2 |
| 71 | + # - uses: hecrj/setup-rust-action@v1 |
| 72 | + # with: |
| 73 | + # rust-version: nightly |
| 74 | + # - name: Cache LLVM and Clang |
| 75 | + # id: cache-llvm |
| 76 | + # uses: actions/cache@v2 |
| 77 | + # with: |
| 78 | + # path: ${{ runner.temp }}/llvm |
| 79 | + # key: llvm-10.0 |
| 80 | + # - name: Install LLVM and Clang |
| 81 | + # uses: KyleMayes/install-llvm-action@v1 |
| 82 | + # with: |
| 83 | + # version: "10.0" |
| 84 | + # directory: ${{ runner.temp }}/llvm |
| 85 | + # cached: ${{ steps.cache-llvm.outputs.cache-hit }} |
| 86 | + # - run: sudo apt-get install -y libtinfo-dev libtinfo5 build-essential |
| 87 | + # - run: wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - |
| 88 | + # - run: cargo install rustfilt |
| 89 | + # - run: echo "PATH=/home/runner/.cargo/bin:$PATH" >> $GITHUB_ENV |
| 90 | + # - run: ./codecov.sh --check |
0 commit comments