bpflint 0.2.0

Linting functionality for BPF C programs.
Documentation
name: Build bpflinter

on:
  workflow_call:
    inputs:
      upload-release:
        description: 'The release to upload artifacts to, if any'
        default: ''
        required: false
        type: string
  workflow_dispatch:

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    strategy:
      matrix:
        target: [
          x86_64-unknown-linux-musl,
        ]
    steps:
      - uses: actions/checkout@v5
      - uses: taiki-e/setup-cross-toolchain-action@v1
        with:
          target: ${{ matrix.target }}
      - run: |
          CARGO_PROFILE_RELEASE_DEBUG=false CARGO_PROFILE_RELEASE_STRIP=true cargo install --path=cli --root=. --target ${{ matrix.target }}
      - uses: actions/upload-artifact@v4
        with:
          name: bpflinter-${{ matrix.target }}
          path: bin/bpflinter
      - if: ${{ inputs.upload-release != '' }}
        name: Upload release asset
        env:
          GH_TOKEN: ${{ github.token }}
        run: |
          mv bin/bpflinter bpflinter-${{ matrix.target }}
          gh release upload ${{ inputs.upload-release }} bpflinter-${{ matrix.target }}