|
| 1 | +name: rustls-libssl |
| 2 | + |
| 3 | +permissions: |
| 4 | + contents: read |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + pull_request: |
| 9 | + merge_group: |
| 10 | + schedule: |
| 11 | + - cron: '15 12 * * 3' |
| 12 | + |
| 13 | +defaults: |
| 14 | + run: |
| 15 | + working-directory: rustls-libssl |
| 16 | + |
| 17 | +jobs: |
| 18 | + build: |
| 19 | + name: Build+test |
| 20 | + runs-on: ${{ matrix.os }} |
| 21 | + strategy: |
| 22 | + matrix: |
| 23 | + rust: |
| 24 | + - stable |
| 25 | + - beta |
| 26 | + - nightly |
| 27 | + os: [ubuntu-latest] |
| 28 | + steps: |
| 29 | + - name: Checkout sources |
| 30 | + uses: actions/checkout@v4 |
| 31 | + with: |
| 32 | + persist-credentials: false |
| 33 | + |
| 34 | + - name: Install build dependencies |
| 35 | + run: sudo apt-get update && sudo apt-get install -y openssl libssl3 libssl-dev lld |
| 36 | + |
| 37 | + - name: Install ${{ matrix.rust }} toolchain |
| 38 | + uses: dtolnay/rust-toolchain@master |
| 39 | + with: |
| 40 | + toolchain: ${{ matrix.rust }} |
| 41 | + |
| 42 | + - run: make PROFILE=release test |
| 43 | + |
| 44 | + valgrind: |
| 45 | + name: Valgrind |
| 46 | + runs-on: ubuntu-latest |
| 47 | + steps: |
| 48 | + - uses: actions/checkout@v4 |
| 49 | + with: |
| 50 | + persist-credentials: false |
| 51 | + - name: Install valgrind |
| 52 | + run: sudo apt-get update && sudo apt-get install -y valgrind |
| 53 | + - name: Install build dependencies |
| 54 | + run: sudo apt-get update && sudo apt-get install -y openssl libssl3 libssl-dev lld |
| 55 | + - run: export VALGRIND="valgrind -q" |
| 56 | + - run: make test |
| 57 | + |
| 58 | + docs: |
| 59 | + name: Check for documentation errors |
| 60 | + runs-on: ubuntu-latest |
| 61 | + steps: |
| 62 | + - name: Checkout sources |
| 63 | + uses: actions/checkout@v4 |
| 64 | + with: |
| 65 | + persist-credentials: false |
| 66 | + |
| 67 | + - name: Install build dependencies |
| 68 | + run: sudo apt-get update && sudo apt-get install -y openssl libssl3 libssl-dev lld |
| 69 | + |
| 70 | + - name: Install rust toolchain |
| 71 | + uses: dtolnay/rust-toolchain@nightly |
| 72 | + |
| 73 | + - name: cargo doc (all features) |
| 74 | + run: cargo doc --all-features --no-deps --workspace |
| 75 | + env: |
| 76 | + RUSTDOCFLAGS: -Dwarnings |
| 77 | + |
| 78 | + format: |
| 79 | + name: Format |
| 80 | + runs-on: ubuntu-latest |
| 81 | + steps: |
| 82 | + - name: Checkout sources |
| 83 | + uses: actions/checkout@v4 |
| 84 | + with: |
| 85 | + persist-credentials: false |
| 86 | + - name: Install rust toolchain |
| 87 | + uses: dtolnay/rust-toolchain@master |
| 88 | + with: |
| 89 | + toolchain: 1.67.1 |
| 90 | + components: rustfmt |
| 91 | + - name: Check Rust formatting |
| 92 | + run: cargo fmt --all -- --check |
| 93 | + - name: Check src/entry.rs formatting |
| 94 | + run: ./admin/format --all -- --check |
| 95 | + - name: Check C formatting |
| 96 | + run: make format-check |
| 97 | + |
| 98 | + clippy: |
| 99 | + name: Clippy |
| 100 | + runs-on: ubuntu-latest |
| 101 | + steps: |
| 102 | + - name: Checkout sources |
| 103 | + uses: actions/checkout@v4 |
| 104 | + with: |
| 105 | + persist-credentials: false |
| 106 | + - name: Install rust toolchain |
| 107 | + uses: dtolnay/rust-toolchain@stable |
| 108 | + with: |
| 109 | + components: clippy |
| 110 | + - name: Check clippy |
| 111 | + # We allow unknown lints here because sometimes the nightly job |
| 112 | + # (below) will have a new lint that we want to suppress. |
| 113 | + # If we suppress (e.g. #![allow(clippy::arc_with_non_send_sync)]), |
| 114 | + # we would get an unknown-lint error from older clippy versions. |
| 115 | + run: cargo clippy --locked --workspace -- -D warnings -A unknown-lints |
| 116 | + |
| 117 | + clippy-nightly-optional: |
| 118 | + name: Clippy nightly (optional) |
| 119 | + runs-on: ubuntu-latest |
| 120 | + steps: |
| 121 | + - name: Checkout sources |
| 122 | + uses: actions/checkout@v4 |
| 123 | + with: |
| 124 | + persist-credentials: false |
| 125 | + - name: Install rust toolchain |
| 126 | + uses: dtolnay/rust-toolchain@nightly |
| 127 | + with: |
| 128 | + components: clippy |
| 129 | + - name: Check clippy |
| 130 | + run: cargo clippy --locked --workspace -- -D warnings |
| 131 | + |
| 132 | + clang-tidy: |
| 133 | + name: Clang Tidy |
| 134 | + runs-on: ubuntu-latest |
| 135 | + steps: |
| 136 | + - name: Checkout sources |
| 137 | + uses: actions/checkout@v4 |
| 138 | + with: |
| 139 | + persist-credentials: false |
| 140 | + - name: Clang tidy |
| 141 | + run: clang-tidy tests/*.c -- -I src/ |
| 142 | + |
| 143 | + miri: |
| 144 | + name: Miri |
| 145 | + runs-on: ubuntu-latest |
| 146 | + steps: |
| 147 | + - name: Checkout sources |
| 148 | + uses: actions/checkout@v4 |
| 149 | + with: |
| 150 | + persist-credentials: false |
| 151 | + |
| 152 | + - name: Install nightly Rust |
| 153 | + uses: dtolnay/rust-toolchain@nightly |
| 154 | + - run: rustup override set "nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)" |
| 155 | + - run: rustup component add miri |
| 156 | + - run: cargo miri test |
0 commit comments