Skip to content

Commit b0a8fcc

Browse files
committed
feat: update actions yaml
1 parent b87a9e7 commit b0a8fcc

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

.github/workflows/cmake-single-platform.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,20 @@ jobs:
7272
run: |
7373
mkdir -p ${{env.ARTIFACT_DIR}}/${{ matrix.os }}-${{ matrix.arch }}
7474
cd build-${{ matrix.arch }}
75-
if [ -f "pHash_demo" ] || [ -f "phash_demo" ] || [ -f "libpHash.a" ] || [ -f "libphash.a" ]; then
76-
[ -f "pHash_demo" ] && cp pHash_demo ../${{env.ARTIFACT_DIR}}/${{ matrix.os }}-${{ matrix.arch }}/
77-
[ -f "phash_demo" ] && cp phash_demo ../${{env.ARTIFACT_DIR}}/${{ matrix.os }}-${{ matrix.arch }}/
78-
[ -f "libpHash.a" ] && cp libpHash.a ../${{env.ARTIFACT_DIR}}/${{ matrix.os }}-${{ matrix.arch }}/
79-
[ -f "libphash.a" ] && cp libphash.a ../${{env.ARTIFACT_DIR}}/${{ matrix.os }}-${{ matrix.arch }}/
80-
else
81-
echo "No artifacts found in $(pwd)"
75+
# Copy all possible artifact variations
76+
for file in pHash_demo phash_demo libpHash.a libphash.a *.h; do
77+
if [ -f "$file" ]; then
78+
cp "$file" ../${{env.ARTIFACT_DIR}}/${{ matrix.os }}-${{ matrix.arch }}/
79+
fi
80+
done
81+
# Also check in subdirectories
82+
if [ -d "src" ]; then
83+
find src -type f -name "*.a" -o -name "*.h" -exec cp {} ../${{env.ARTIFACT_DIR}}/${{ matrix.os }}-${{ matrix.arch }}/ \;
84+
fi
85+
# Verify if any files were copied
86+
if [ ! "$(ls -A ../${{env.ARTIFACT_DIR}}/${{ matrix.os }}-${{ matrix.arch }})" ]; then
87+
echo "No artifacts found in $(pwd) or its subdirectories"
88+
ls -la
8289
exit 1
8390
fi
8491

0 commit comments

Comments
 (0)