Document crates used for contains and byte regex operators (#103) #70
This file contains 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: rustdoc | |
on: | |
push: | |
branches: [ main ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
rustdoc: | |
env: | |
DPDK_VERSION: "20.11" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Rust stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.85.0 | |
override: true | |
components: rustfmt, clippy | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.11 | |
- name: Install pip | |
run: | | |
python -m pip install --upgrade pip | |
- name: Install pyelftools | |
run: | | |
pip3 install pyelftools | |
- name: Install libpcap (Linux) | |
run: | | |
sudo apt-get update | |
sudo apt-get install libpcap-dev | |
- name: Cache DPDK | |
id: cache-dpdk | |
uses: actions/cache@v4 | |
with: | |
path: dpdk-$DPDK_VERSION | |
key: ${{ runner.os }}-dpdk-$DPDK_VERSION | |
- name: Export enviroment variables | |
run: | | |
echo "PKG_CONFIG_PATH=$(pwd)/dpdk-$DPDK_VERSION/install/lib/x86_64-linux-gnu/pkgconfig/" >> $GITHUB_ENV | |
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(pwd)/dpdk-$DPDK_VERSION/install/lib/x86_64-linux-gnu/" >> $GITHUB_ENV | |
echo "DPDK_PATH=$(pwd)/dpdk-$DPDK_VERSION/install/" >> $GITHUB_ENV | |
- name: Retrive or compile DPDK | |
if: steps.cache-dpdk.outputs.cache-hit != 'true' | |
run: | | |
echo "Compiling DPDK..." ; | |
if [ ! -e "dpdk-$DPDK_VERSION" ] || ! pkg-config --exists libdpdk ; then | |
wget http://fast.dpdk.org/rel/dpdk-$DPDK_VERSION.tar.gz && | |
tar -zxf dpdk-$DPDK_VERSION.tar.gz && | |
cd dpdk-$DPDK_VERSION && | |
pip3 install meson ninja && | |
meson -Dprefix=$(pwd)/install/ build && | |
cd build && | |
ninja && | |
ninja install && | |
cd .. && | |
cd .. ; | |
fi | |
- name: Build Documentation (v0.1.0) | |
run: git fetch --all --tags && git checkout v0.1.0 && cargo doc --lib --no-deps | |
- name: Move Documentation (v0.1.0) | |
run: | | |
mkdir -p docs/v0.1.0 | |
cp -r target/doc/* docs/v0.1.0/ | |
- name: Build Documentation | |
run: git checkout main && cargo doc --lib --no-deps | |
- name: Move Documentation | |
run: | | |
cp -r target/doc/* docs/ | |
- name: Deploy Documentation | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: gh-pages | |
publish_dir: ./docs | |
force_orphan: true |