changes #3286
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: Rust | |
| on: [push] | |
| jobs: | |
| build: | |
| runs-on: [ lq_run ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set Version ENV | |
| run: echo "VERSION=$(cat src/VERSION_STRING)" >> "$GITHUB_ENV" | |
| - name: Check env var | |
| run: | | |
| echo ${{ env.VERSION }} | |
| - name: Install dependencies | |
| run: | | |
| sudo /bin/apt-get update | |
| sudo /bin/apt-get install --no-install-recommends \ | |
| python3-pip clang gcc gcc-multilib llvm libelf-dev graphviz esbuild \ | |
| pkg-config libbpf-dev mold unzip linux-tools-generic | |
| BPFTOOL_BIN="$(find /usr/lib/linux-tools -name bpftool | sort -V | tail -n1)" | |
| test -n "${BPFTOOL_BIN}" | |
| BPFTOOL_BIN="$(readlink -f "${BPFTOOL_BIN}")" | |
| sudo install -m 0755 "${BPFTOOL_BIN}" /usr/local/bin/bpftool | |
| command -v bpftool | |
| bpftool version | |
| - name: Build | |
| run: pushd src/rust; cargo build --verbose --all; popd | |
| - name: Run tests | |
| run: pushd src/rust; cargo test --verbose --all; popd | |
| - name: Build .deb file | |
| run: ./build_dpkg.sh --nostamp | |
| working-directory: src/ | |
| - name: Archive .deb file | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: libreqos_${{ env.VERSION }}.-1_amd64.deb | |
| path: src/dist/libreqos_${{ env.VERSION }}.-1_amd64.deb | |
| audit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install tools | |
| run: pushd src/rust; cargo install cargo-audit; popd | |
| - name: Audit for CVEs | |
| run: cd src/rust; cargo audit -c always |