chore: bump MSRV to 1.85 and update outdated dependencies #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| PKG_CONFIG_PATH: /usr/local/lib/pkgconfig | |
| LD_LIBRARY_PATH: /usr/local/lib | |
| jobs: | |
| fmt: | |
| name: Formatting | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - run: cargo fmt --all --check | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Free disk space | |
| run: | | |
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL | |
| sudo docker image prune --all --force | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo-registry- | |
| - uses: actions/cache@v5 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo-clippy- | |
| - name: Install system deps | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler build-essential libtool autoconf automake \ | |
| pkg-config libcurl4-openssl-dev libpcre3-dev libpcre2-dev libyajl-dev libxml2-dev | |
| - name: Cache libmodsecurity | |
| id: cache-modsec | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| /usr/local/lib/libmodsecurity* | |
| /usr/local/lib/pkgconfig/modsecurity.pc | |
| /usr/local/include/modsecurity | |
| key: ${{ runner.os }}-libmodsecurity-3.0.14-v2 | |
| - name: Build libmodsecurity from source | |
| if: steps.cache-modsec.outputs.cache-hit != 'true' | |
| run: | | |
| git clone --depth 1 --branch v3.0.14 https://github.com/owasp-modsecurity/ModSecurity.git /tmp/modsecurity | |
| cd /tmp/modsecurity | |
| git submodule init && git submodule update | |
| ./build.sh | |
| ./configure --prefix=/usr/local --without-lmdb | |
| make -j$(nproc) | |
| sudo make install | |
| - name: Update linker cache | |
| run: sudo ldconfig | |
| - run: cargo clippy --workspace --all-targets -- -D warnings | |
| test: | |
| name: Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Free disk space | |
| run: | | |
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL | |
| sudo docker image prune --all --force | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo-registry- | |
| - uses: actions/cache@v5 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo-test- | |
| - name: Install system deps | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler build-essential libtool autoconf automake \ | |
| pkg-config libcurl4-openssl-dev libpcre3-dev libpcre2-dev libyajl-dev libxml2-dev | |
| - name: Cache libmodsecurity | |
| id: cache-modsec | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| /usr/local/lib/libmodsecurity* | |
| /usr/local/lib/pkgconfig/modsecurity.pc | |
| /usr/local/include/modsecurity | |
| key: ${{ runner.os }}-libmodsecurity-3.0.14-v2 | |
| - name: Build libmodsecurity from source | |
| if: steps.cache-modsec.outputs.cache-hit != 'true' | |
| run: | | |
| git clone --depth 1 --branch v3.0.14 https://github.com/owasp-modsecurity/ModSecurity.git /tmp/modsecurity | |
| cd /tmp/modsecurity | |
| git submodule init && git submodule update | |
| ./build.sh | |
| ./configure --prefix=/usr/local --without-lmdb | |
| make -j$(nproc) | |
| sudo make install | |
| - name: Update linker cache | |
| run: sudo ldconfig | |
| - run: cargo test --workspace |