Skip to content

Commit 0d5d6d8

Browse files
soumeh01brondani
authored andcommitted
Use appropriate strip tool based on architecture and target
1 parent 8b7d810 commit 0d5d6d8

3 files changed

Lines changed: 45 additions & 3 deletions

File tree

.github/workflows/buildmgr.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,28 @@ jobs:
8282
target: cbuildgen
8383
arch: ${{ matrix.arch }}
8484

85+
- name: Install strip tools
86+
if: |
87+
github.event_name == 'release' &&
88+
matrix.arch == 'arm64' &&
89+
startsWith(matrix.runs_on, 'ubuntu')
90+
run: |
91+
sudo apt-get update
92+
sudo apt-get install binutils-aarch64-linux-gnu
93+
8594
- name: Strip projmgr release binary
8695
if: |
8796
github.event_name == 'release' &&
8897
(startsWith(matrix.runs_on, 'macos') || startsWith(matrix.runs_on, 'ubuntu'))
8998
run: |
9099
binary_path="./build/tools/buildmgr/cbuildgen/${{ matrix.target }}-${{ matrix.arch }}/Release/cbuildgen${{ matrix.binary_extension }}"
91100
echo "Stripping binary at: $binary_path"
92-
strip "$binary_path"
101+
# Use appropriate strip tool based on architecture and target
102+
if [[ "${{ matrix.arch }}" == "arm64" && "${{ matrix.target }}" == "linux" ]]; then
103+
aarch64-linux-gnu-strip "$binary_path"
104+
else
105+
strip "$binary_path"
106+
fi
93107
94108
- name: Archive cbuildgen
95109
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2

.github/workflows/packgen.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,28 @@ jobs:
7575
target: packgen
7676
arch: ${{ matrix.arch }}
7777

78+
- name: Install strip tools
79+
if: |
80+
github.event_name == 'release' &&
81+
matrix.arch == 'arm64' &&
82+
startsWith(matrix.runs_on, 'ubuntu')
83+
run: |
84+
sudo apt-get update
85+
sudo apt-get install binutils-aarch64-linux-gnu
86+
7887
- name: Strip packgen release binary
7988
if: |
8089
github.event_name == 'release' &&
8190
(startsWith(matrix.runs_on, 'macos') || startsWith(matrix.runs_on, 'ubuntu'))
8291
run: |
8392
binary_path="./build/tools/packgen/${{ matrix.target }}-${{ matrix.arch }}/Release/${{ matrix.binary }}"
8493
echo "Stripping binary at: $binary_path"
85-
strip "$binary_path"
94+
# Use appropriate strip tool based on architecture and target
95+
if [[ "${{ matrix.arch }}" == "arm64" && "${{ matrix.target }}" == "linux" ]]; then
96+
aarch64-linux-gnu-strip "$binary_path"
97+
else
98+
strip "$binary_path"
99+
fi
86100
87101
- name: Archive packgen
88102
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2

.github/workflows/projmgr.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,28 @@ jobs:
8080
target: projmgr
8181
arch: ${{ matrix.arch }}
8282

83+
- name: Install strip tools
84+
if: |
85+
github.event_name == 'release' &&
86+
matrix.arch == 'arm64' &&
87+
startsWith(matrix.runs_on, 'ubuntu')
88+
run: |
89+
sudo apt-get update
90+
sudo apt-get install binutils-aarch64-linux-gnu
91+
8392
- name: Strip projmgr release binary
8493
if: |
8594
github.event_name == 'release' &&
8695
(startsWith(matrix.runs_on, 'macos') || startsWith(matrix.runs_on, 'ubuntu'))
8796
run: |
8897
binary_path="./build/tools/projmgr/${{ matrix.target }}-${{ matrix.arch }}/Release/${{ matrix.binary }}"
8998
echo "Stripping binary at: $binary_path"
90-
strip "$binary_path"
99+
# Use appropriate strip tool based on architecture and target
100+
if [[ "${{ matrix.arch }}" == "arm64" && "${{ matrix.target }}" == "linux" ]]; then
101+
aarch64-linux-gnu-strip "$binary_path"
102+
else
103+
strip "$binary_path"
104+
fi
91105
92106
- name: Archive projmgr
93107
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2

0 commit comments

Comments
 (0)