File tree 1 file changed +34
-0
lines changed
1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Strip binaries
2
+
3
+ needs :
4
+ packages :
5
+ - binutils
6
+ - scanelf
7
+
8
+ inputs :
9
+ opts :
10
+ description : |
11
+ The option flags to pass to the strip command.
12
+ default : -g
13
+
14
+ pipeline :
15
+ - working-directory : ${{targets.contextdir}}
16
+ runs : |
17
+ scanelf --recursive --nobanner --etype "ET_DYN,ET_EXEC" \
18
+ --format "%I %a" . \
19
+ | while read osabi arch filename; do
20
+
21
+ # Do not attempt to strip foreign arch binaries
22
+ case "${{build.arch}}" in
23
+ x86_64)
24
+ [ "$arch" = "EM_X86_64" ] || continue
25
+ ;;
26
+ aarch64)
27
+ [ "$arch" = "EM_AARCH64" ] || continue
28
+ ;;
29
+ esac
30
+
31
+ [ "$osabi" != "STANDALONE" ] || continue
32
+ # scanelf may have picked up a temp file so verify that file still exists
33
+ strip ${{inputs.opts}} "${filename}" || [ ! -e "$filename" ]
34
+ done
You can’t perform that action at this time.
0 commit comments