Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .github/workflows/clippy-check.yml

This file was deleted.

98 changes: 50 additions & 48 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
on: [push, pull_request]

name: Continuous integration

on:
push:
pull_request:
merge_group:
schedule:
- cron: '0 18 * * *'

jobs:
pre_commit:
timeout-minutes: 5
name: prek
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
# tools used in pre-commit hooks
- id: cargo-rdme
uses: rusticata/ci-action-rdme@v1
# /tools
- id: prek
uses: rusticata/ci-action-prek@v1

check:
name: Check
runs-on: ubuntu-latest
Expand All @@ -13,77 +31,61 @@ jobs:
- 1.63.0
- nightly
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v5
- name: Install ${{ matrix.rust }} toolchain
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Cargo update
run: cargo update
- uses: actions-rs/cargo@v1
with:
command: check
- run: RUSTFLAGS="-D warnings" cargo check

test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
- uses: actions/checkout@v5
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- run: cargo test

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v5
- name: Install stable rustfmt
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
components: rustfmt
- run: cargo fmt --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
- uses: actions/checkout@v5
- name: Install nightly clippy
uses: dtolnay/rust-toolchain@nightly
with:
command: clippy
args: -- -D warnings
components: clippy
- run: cargo clippy -- -D warnings

readme:
name: Check if README is up to date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- id: cargo-rdme
uses: rusticata/ci-action-rdme@v1

doc:
name: Build documentation
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: --cfg docsrs
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
with:
command: doc
args: --workspace --no-deps --all-features
- uses: actions/checkout@v5
- name: Install nightly rust
uses: dtolnay/rust-toolchain@nightly
- run: cargo doc --workspace --no-deps --all-features
2 changes: 1 addition & 1 deletion .github/workflows/security-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v5
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
40 changes: 40 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
fail_fast: true

exclude: |
(?x)^(
.*/(assets)/.*|
)$

repos:
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
entry: cargo fmt --
language: system
types: [rust]
pass_filenames: false # This makes it a lot faster

- id: cargo-clippy
name: cargo clippy
language: system
types: [rust]
pass_filenames: false
entry: cargo clippy --all-targets --all-features -- -D warnings

- id: cargo-rdme
name: cargo rdme
language: system
types: [rust]
pass_filenames: false
entry: cargo rdme -c
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# ipsec-parser

![Maintenance](https://img.shields.io/badge/maintenance-activly--developed-brightgreen.svg)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE-MIT)
[![Apache License 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](./LICENSE-APACHE)
[![Build Status](https://travis-ci.org/rusticata/ipsec-parser.svg?branch=master)](https://travis-ci.org/rusticata/ipsec-parser)

<!-- cargo-sync-readme start -->
<!-- cargo-rdme start -->

# IPsec parsers

Expand Down Expand Up @@ -60,7 +59,7 @@ fn test_ikev2_init_resp() {
}
```

<!-- cargo-sync-readme end -->
<!-- cargo-rdme end -->

## Changelog

Expand Down