Skip to content

Commit

Permalink
Fixed CI MacOS executable and dynamic library file find
Browse files Browse the repository at this point in the history
  • Loading branch information
FangCunWuChang committed Jul 31, 2024
1 parent 238add1 commit e106b8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,21 @@ jobs:
with:
subject-path: '"workspace/*.dll","workspace/*.exe"'

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

- name: Get short SHA
uses: benjlevesque/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions CIUtils/find-executable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ fi
# Directory to search
directory=$1

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

# Initialize an empty string for the output
output=""
Expand Down

0 comments on commit e106b8f

Please sign in to comment.