Skip to content

Commit

Permalink
feat: add ci to check dynamic libs
Browse files Browse the repository at this point in the history
  • Loading branch information
jiumos committed Oct 17, 2024
1 parent 2e6cec2 commit 852f481
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 1 deletion.
52 changes: 52 additions & 0 deletions .github/workflows/agent-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,32 @@ jobs:
build-args: |
GITHUB_REF_NAME=${{ github.ref_name }}
- name: Check dynamic dependencies
run: |
required_libs=()
in_arm_section=false
while IFS= read -r line; do
if [[ "$line" =~ ^\#\ X86\ Dynamic\ Libraries ]]; then
in_arm_section=true
continue
fi
if [[ "$line" =~ ^\#\ ]] && [[ "$in_arm_section" = true ]]; then
break
fi
if [[ "$in_arm_section" = true ]] && [[ "$line" =~ \*\*([^\*]+)\*\* ]]; then
required_libs+=("${BASH_REMATCH[1]}")
fi
done < README.md
dynamic_libs=$(ldd deepflow-agent | awk '{print $1}' | xargs -n1 basename)
for lib in $dynamic_libs; do
if [[ ! " ${required_libs[@]} " =~ " ${lib} " ]]; then
echo "Warning: Do not introduce any additional dynamic library dependencies!: ${lib}"
exit 1
fi
done
- name: Package code build results
run: |
tar cvf agent-artifact-amd64.tar agent/output/target/release/deepflow-agent agent/output/target/release/deepflow-agent-ctl agent/output/src/ebpf/deepflow-ebpfctl
Expand Down Expand Up @@ -196,6 +222,32 @@ jobs:
build-args: |
GITHUB_REF_NAME=${{ github.ref_name }}
- name: Check dynamic dependencies
run: |
required_libs=()
in_arm_section=false
while IFS= read -r line; do
if [[ "$line" =~ ^\#\ ARM\ Dynamic\ Libraries ]]; then
in_arm_section=true
continue
fi
if [[ "$line" =~ ^\#\ ]] && [[ "$in_arm_section" = true ]]; then
break
fi
if [[ "$in_arm_section" = true ]] && [[ "$line" =~ \*\*([^\*]+)\*\* ]]; then
required_libs+=("${BASH_REMATCH[1]}")
fi
done < README.md
dynamic_libs=$(ldd deepflow-agent | awk '{print $1}' | xargs -n1 basename)
for lib in $dynamic_libs; do
if [[ ! " ${required_libs[@]} " =~ " ${lib} " ]]; then
echo "Warning: Do not introduce any additional dynamic library dependencies!: ${lib}"
exit 1
fi
done
- name: Package code build results
run: |
tar cvf agent-artifact-arm64.tar agent/output/target/release/deepflow-agent agent/output/target/release/deepflow-agent-ctl agent/output/src/ebpf/deepflow-ebpfctl
Expand Down
60 changes: 59 additions & 1 deletion agent/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,61 @@
# trident-rs

trident in rust
trident in rust

# X86 Dynamic Libraries

This project requires the following dynamic libraries:

1. **linux-vdso.so.1**

2. **libpthread.so.0**

3. **libz.so.1**

4. **libstdc++.so.6**

5. **libgcc_s.so.1**

6. **librt.so.1**

7. **libm.so.6**

8. **libdl.so.2**

9. **libc.so.6**

10. **ld-linux-x86-64.so.2**

# ARM Dynamic Libraries

This project requires the following dynamic libraries:

1. **linux-vdso.so.1**

2. **libpthread.so.0**

3. **libz.so.1**

4. **libstdc++.so.6**

5. **libpcap.so.1**

6. **libgcc_s.so.1**

7. **librt.so.1**

8. **libm.so.6**

9. **libdl.so.2**

10. **libc.so.6**

11. **ld-linux-aarch64.so.1**

12. **libibverbs.so.1**

13. **libnl-route-3.so.200**

14. **libnl-3.so.200**

# other

0 comments on commit 852f481

Please sign in to comment.