Skip to content

Commit e106b8f

Browse files
Fixed CI MacOS executable and dynamic library file find
1 parent 238add1 commit e106b8f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.github/workflows/build-artifacts.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,21 @@ jobs:
5454
with:
5555
subject-path: '"workspace/*.dll","workspace/*.exe"'
5656

57-
- name: Find ELF files - MacOS and Linux
57+
- name: Find executable and dynamic library files - MacOS and Linux
5858
if: runner.os != 'Windows' && github.event_name != 'pull_request'
59-
id: find-elf-files
59+
id: find-executable-files
6060
working-directory: ${{github.workspace}}
6161
run: |
6262
chmod +x ./CIUtils/find-executable.sh
63-
ELF_FILES=$(./CIUtils/find-executable.sh "workspace/")
64-
echo "Found ELF files: $ELF_FILES"
65-
echo "elf_files=$ELF_FILES" >> $GITHUB_OUTPUT
63+
EXEC_FILES=$(./CIUtils/find-executable.sh "workspace/")
64+
echo "Found executable and dynamic library files: $EXEC_FILES"
65+
echo "exec_files=$EXEC_FILES" >> $GITHUB_OUTPUT
6666
6767
- name: Generate artifact attestation - MacOS and Linux
6868
if: runner.os != 'Windows' && github.event_name != 'pull_request'
6969
uses: actions/attest-build-provenance@v1
7070
with:
71-
subject-path: '"workspace/*.dll",${{ steps.find-elf-files.outputs.elf_files }}'
71+
subject-path: '"workspace/*.dll",${{ steps.find-executable-files.outputs.exec_files }}'
7272

7373
- name: Get short SHA
7474
uses: benjlevesque/[email protected]

CIUtils/find-executable.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ fi
99
# Directory to search
1010
directory=$1
1111

12-
# Find ELF files in the specified directory
13-
files=$(find "$directory" -type f -exec sh -c 'file -b "$1" | grep -q "ELF" && echo "$1"' _ {} \;)
12+
# Find ELF, Mach-O and Universal Binary files in the specified directory
13+
files=$(find "$directory" -type f -exec sh -c 'file -b "$1" | grep -q "ELF|Mach-O|universal binary" && echo "$1"' _ {} \;)
1414

1515
# Initialize an empty string for the output
1616
output=""

0 commit comments

Comments
 (0)