lightswitch 0.7.0

CPU profiler as a library for Linux suitable for on-demand and continuous profiling
name: ci
on:
    pull_request:
    push:
        branches:
            - main

jobs:
    ci:
        runs-on: ubuntu-22.04
        permissions:
            id-token: write
            contents: read
        steps:
            - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
            - uses: DeterminateSystems/nix-installer-action@3138316df39ed29be04236d7ffc686fa525866aa # v23
            - uses: DeterminateSystems/flakehub-cache-action@0975873945367f5239ebb5f49c133bf3543a08f6 # v2
            - name: Show nix version
              run: nix --version
            - name: Set up nix dev env
              run: nix develop --command echo 0
            - name: Set nix rustc env var
              run: echo "NIX_RUSTC_VERSION=$(nix develop --ignore-environment --command rustc --version --verbose | tr -d '\n')" >> $GITHUB_ENV
            - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
              with:
                  key: ${{ env.NIX_RUSTC_VERSION }}
            - name: Run `cargo check`
              run: nix develop --ignore-environment --command cargo check
            - name: Run `cargo clippy`
              run: nix develop --command cargo clippy --workspace --all-targets -- -D warnings
            - name: Run `cargo test`
              run: nix develop --command cargo test --workspace
            - name: Run `cargo fmt`
              run: nix develop --command cargo fmt --check
            - name: Run `cargo rustdoc`
              run: nix develop --command cargo rustdoc --all-features -- -Zunstable-options --check -Dwarnings
            - name: Run `nix fmt`
              run: nix fmt -- --check .
            - name: Ensure C code is formatted
              run: nix develop --command just c-fmt && git diff --exit-code
            - name: Run `cargo shear`
              run: nix develop --command cargo shear

    ci-arm:
        runs-on: ubuntu-22.04-arm
        permissions:
            id-token: write
            contents: read
        steps:
            - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
            - uses: DeterminateSystems/nix-installer-action@3138316df39ed29be04236d7ffc686fa525866aa # v23
            - uses: DeterminateSystems/flakehub-cache-action@0975873945367f5239ebb5f49c133bf3543a08f6 # v2
            - name: Set up nix dev env
              run: nix develop --command echo 0
            - name: Set nix rustc env var
              run: echo "NIX_RUSTC_VERSION=$(nix develop --ignore-environment --command rustc --version --verbose | tr -d '\n')" >> $GITHUB_ENV
            - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
              with:
                  key: ${{ env.NIX_RUSTC_VERSION }}
            - name: Run `cargo check`
              run: nix develop --ignore-environment --command cargo check
            - name: Run `cargo test`
              run: nix develop --command cargo test --workspace